![](/hapi-fhir/images/logos/raccoon-forwards.png)
001package org.hl7.fhir.convertors.advisors.impl; 002 003import java.util.Arrays; 004import java.util.List; 005 006import javax.annotation.Nonnull; 007 008import org.hl7.fhir.convertors.advisors.interfaces.BaseAdvisor50; 009import org.hl7.fhir.exceptions.FHIRException; 010 011public class BaseAdvisor_40_50 extends BaseAdvisor50<org.hl7.fhir.r4.model.Extension> { 012 013 private static final List<String> TestScriptIgnoredUrls = Arrays.asList("http://hl7.org/fhir/5.0/StructureDefinition/extension-TestScript.scope"); 014 private boolean produceIllegalParameters = false; 015 016 public BaseAdvisor_40_50() { 017 018 } 019 020 public BaseAdvisor_40_50(Boolean failFast) { 021 this.failFast = failFast; 022 } 023 024 public BaseAdvisor_40_50(Boolean failFast, Boolean produceIllegalParameters) { 025 this.failFast = failFast; 026 this.produceIllegalParameters = produceIllegalParameters; 027 } 028 029 030 @Override 031 public boolean ignoreExtension(@Nonnull String path, 032 @Nonnull String url) throws FHIRException { 033 final List<String> paths = Arrays.asList(path.split(",")); 034 final String lastPath = paths.get(paths.size() - 1); 035 if ((lastPath.equals("TestScript")) && (TestScriptIgnoredUrls.contains(url))) { 036 return true; 037 } 038 else 039 return false; 040 } 041 042 public boolean produceIllegalParameters() { 043 return produceIllegalParameters; 044 } 045}