
Class PrePopulatedValidationSupport
java.lang.Object
org.hl7.fhir.common.hapi.validation.support.BaseValidationSupport
org.hl7.fhir.common.hapi.validation.support.PrePopulatedValidationSupport
- All Implemented Interfaces:
ca.uhn.fhir.context.support.IValidationSupport,ca.uhn.fhir.util.ILockable
- Direct Known Subclasses:
LocalFileValidationSupport,NpmPackageValidationSupport
public class PrePopulatedValidationSupport
extends BaseValidationSupport
implements ca.uhn.fhir.context.support.IValidationSupport, ca.uhn.fhir.util.ILockable
This class is an implementation of
IValidationSupport which may be pre-populated
with a collection of validation resources to be used by the validator.-
Nested Class Summary
Nested classes/interfaces inherited from interface ca.uhn.fhir.context.support.IValidationSupport
ca.uhn.fhir.context.support.IValidationSupport.BaseConceptProperty, ca.uhn.fhir.context.support.IValidationSupport.BooleanConceptProperty, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationIssue, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationIssueCode, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationIssueCoding, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationIssueDetails, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult, ca.uhn.fhir.context.support.IValidationSupport.CodingConceptProperty, ca.uhn.fhir.context.support.IValidationSupport.ConceptDesignation, ca.uhn.fhir.context.support.IValidationSupport.GroupConceptProperty, ca.uhn.fhir.context.support.IValidationSupport.IssueSeverity, ca.uhn.fhir.context.support.IValidationSupport.LookupCodeResult, ca.uhn.fhir.context.support.IValidationSupport.StringConceptProperty, ca.uhn.fhir.context.support.IValidationSupport.TranslateCodeRequest, ca.uhn.fhir.context.support.IValidationSupport.ValueSetExpansionOutcome -
Field Summary
Fields inherited from class org.hl7.fhir.common.hapi.validation.support.BaseValidationSupport
myCtxFields inherited from interface ca.uhn.fhir.context.support.IValidationSupport
TYPE_BOOLEAN, TYPE_CODING, TYPE_GROUP, TYPE_STRING, URL_PREFIX_STRUCTURE_DEFINITION, URL_PREFIX_VALUE_SET -
Constructor Summary
ConstructorsConstructorDescriptionPrePopulatedValidationSupport(ca.uhn.fhir.context.FhirContext theContext) ConstructorPrePopulatedValidationSupport(ca.uhn.fhir.context.FhirContext theFhirContext, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToStructureDefinitions, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToValueSets, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToCodeSystems) ConstructorPrePopulatedValidationSupport(ca.uhn.fhir.context.FhirContext theFhirContext, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToStructureDefinitions, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToValueSets, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToCodeSystems, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToSearchParameters, Map<String, byte[]> theBinaries) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddCodeSystem(org.hl7.fhir.instance.model.api.IBaseResource theCodeSystem) Add a new CodeSystem resource which will be available to the validator.voidaddResource(org.hl7.fhir.instance.model.api.IBaseResource theResource) voidaddSearchParameter(org.hl7.fhir.instance.model.api.IBaseResource theSearchParameter) voidaddStructureDefinition(org.hl7.fhir.instance.model.api.IBaseResource theStructureDefinition) Add a new StructureDefinition resource which will be available to the validator.voidaddValueSet(org.hl7.fhir.instance.model.api.IBaseResource theValueSet) Add a new ValueSet resource which will be available to the validator.intcountAll()Returns a count of all known resourcesList<org.hl7.fhir.instance.model.api.IBaseResource> <T extends org.hl7.fhir.instance.model.api.IBaseResource>
List<T> <T extends org.hl7.fhir.instance.model.api.IBaseResource>
List<T> byte[]fetchBinary(String theBinaryKey) org.hl7.fhir.instance.model.api.IBaseResourcefetchCodeSystem(String theSystem) org.hl7.fhir.instance.model.api.IBaseResourcefetchStructureDefinition(String theUrl) org.hl7.fhir.instance.model.api.IBaseResourcefetchValueSet(String theUri) getName()booleanisCodeSystemSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theSystem) booleanisValueSetSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theValueSetUrl) voidlock()Methods inherited from class org.hl7.fhir.common.hapi.validation.support.BaseValidationSupport
getFhirContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.uhn.fhir.context.support.IValidationSupport
expandValueSet, expandValueSet, fetchAllNonBaseStructureDefinitions, fetchResource, generateSnapshot, getFhirContext, invalidateCaches, isCodeableConceptValidationSuccessfulIfNotAllCodingsAreValid, isRemoteTerminologyServiceConfigured, lookupCode, lookupCode, lookupCode, translateConcept, validateCode, validateCodeInValueSet
-
Constructor Details
-
PrePopulatedValidationSupport
Constructor -
PrePopulatedValidationSupport
public PrePopulatedValidationSupport(ca.uhn.fhir.context.FhirContext theFhirContext, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToStructureDefinitions, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToValueSets, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToCodeSystems) Constructor- Parameters:
theUrlToStructureDefinitions- The StructureDefinitions to be returned by this module. Keys are the logical URL for the resource, and values are the resource itself.theUrlToValueSets- The ValueSets to be returned by this module. Keys are the logical URL for the resource, and values are the resource itself.theUrlToCodeSystems- The CodeSystems to be returned by this module. Keys are the logical URL for the resource, and values are the resource itself.
-
PrePopulatedValidationSupport
public PrePopulatedValidationSupport(ca.uhn.fhir.context.FhirContext theFhirContext, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToStructureDefinitions, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToValueSets, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToCodeSystems, Map<String, org.hl7.fhir.instance.model.api.IBaseResource> theUrlToSearchParameters, Map<String, byte[]> theBinaries) Constructor- Parameters:
theUrlToStructureDefinitions- The StructureDefinitions to be returned by this module. Keys are the logical URL for the resource, and values are the resource itself.theUrlToValueSets- The ValueSets to be returned by this module. Keys are the logical URL for the resource, and values are the resource itself.theUrlToCodeSystems- The CodeSystems to be returned by this module. Keys are the logical URL for the resource, and values are the resource itself.theBinaries- The binary files to be returned by this module. Keys are the unique filename for the binary, and values are the contents of the file as a byte array.
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceca.uhn.fhir.context.support.IValidationSupport
-
addBinary
-
addCodeSystem
Add a new CodeSystem resource which will be available to the validator. Note thatthe URL fieldin this resource must contain a value as this value will be used as the logical URL.Note that if the URL is a canonical FHIR URL (e.g. http://hl7.org/StructureDefinition/Extension), it will be stored in three ways:
- Extension
- StructureDefinition/Extension
- http://hl7.org/StructureDefinition/Extension
-
addStructureDefinition
public void addStructureDefinition(org.hl7.fhir.instance.model.api.IBaseResource theStructureDefinition) Add a new StructureDefinition resource which will be available to the validator. Note thatthe URL fieldin this resource must contain a value as this value will be used as the logical URL.Note that if the URL is a canonical FHIR URL (e.g. http://hl7.org/StructureDefinition/Extension), it will be stored in three ways:
- Extension
- StructureDefinition/Extension
- http://hl7.org/StructureDefinition/Extension
-
addSearchParameter
-
addValueSet
Add a new ValueSet resource which will be available to the validator. Note thatthe URL fieldin this resource must contain a value as this value will be used as the logical URL.Note that if the URL is a canonical FHIR URL (e.g. http://hl7.org/StructureDefinition/Extension), it will be stored in three ways:
- Extension
- StructureDefinition/Extension
- http://hl7.org/StructureDefinition/Extension
-
addResource
- Parameters:
theResource- The resource. This method delegates to the type-specific methods (e.g.addCodeSystem(IBaseResource)) and will do nothing if the resource type is not supported by this class.- Since:
- 5.5.0
-
fetchAllConformanceResources
- Specified by:
fetchAllConformanceResourcesin interfaceca.uhn.fhir.context.support.IValidationSupport
-
fetchAllSearchParameters
@Nullable public <T extends org.hl7.fhir.instance.model.api.IBaseResource> List<T> fetchAllSearchParameters()- Specified by:
fetchAllSearchParametersin interfaceca.uhn.fhir.context.support.IValidationSupport
-
fetchAllStructureDefinitions
public <T extends org.hl7.fhir.instance.model.api.IBaseResource> List<T> fetchAllStructureDefinitions()- Specified by:
fetchAllStructureDefinitionsin interfaceca.uhn.fhir.context.support.IValidationSupport
-
fetchCodeSystem
- Specified by:
fetchCodeSystemin interfaceca.uhn.fhir.context.support.IValidationSupport
-
fetchValueSet
- Specified by:
fetchValueSetin interfaceca.uhn.fhir.context.support.IValidationSupport
-
fetchStructureDefinition
- Specified by:
fetchStructureDefinitionin interfaceca.uhn.fhir.context.support.IValidationSupport
-
fetchBinary
- Specified by:
fetchBinaryin interfaceca.uhn.fhir.context.support.IValidationSupport
-
isCodeSystemSupported
public boolean isCodeSystemSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theSystem) - Specified by:
isCodeSystemSupportedin interfaceca.uhn.fhir.context.support.IValidationSupport
-
isValueSetSupported
public boolean isValueSetSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theValueSetUrl) - Specified by:
isValueSetSupportedin interfaceca.uhn.fhir.context.support.IValidationSupport
-
countAll
Returns a count of all known resources -
lock
- Specified by:
lockin interfaceca.uhn.fhir.util.ILockable
-