001package org.hl7.fhir.convertors.advisors.impl;
002
003import java.util.ArrayList;
004import java.util.Collections;
005import java.util.List;
006
007import javax.annotation.Nonnull;
008
009import org.hl7.fhir.convertors.advisors.interfaces.BaseAdvisor50;
010import org.hl7.fhir.r5.model.DataType;
011import org.hl7.fhir.r5.model.Expression;
012
013public class BaseAdvisor_10_50 extends BaseAdvisor50<org.hl7.fhir.dstu2.model.Extension> {
014
015  private final List<Class<?>> ignoredExtensionTypes = new ArrayList<>(Collections.singletonList(Expression.class));
016
017  public BaseAdvisor_10_50() {
018  }
019
020  public BaseAdvisor_10_50(Boolean failFast) {
021    this.failFast = failFast;
022  }
023
024  public boolean ignoreExtension(@Nonnull String path,
025                                 @Nonnull String url) {
026    // no globally ignored extensions here.
027    return false;
028  }
029
030  public boolean ignoreType(@Nonnull String path,
031                            @Nonnull DataType type) {
032    return ignoredExtensionTypes.contains(type.getClass());
033  }
034}