Class ResourceValidationTracker
- java.lang.Object
-
- org.hl7.fhir.validation.instance.utils.ResourceValidationTracker
-
public class ResourceValidationTracker extends Object
The validator keeps one of these classes for each resource it validates (e.g. when chasing references)It keeps track of the state of resource validation - a given resrouce may be validated agaisnt multiple profiles during a single validation, and it may be valid against some, and invalid against others.
We don't want to keep doing the same validation, so we remember the outcomes for each combination of resource + profile
Additionally, profile validation may be circular - e.g. a Patient profile that applies the same profile to linked patients, and 2 patient resources that link to each other. So this class also tracks validation in process.
If the validator comes back to the same point, and validates the same instance against the same profile while it's already validating, it assumes it's valid - it cannot have new errors that wouldn't already be found in the first iteration - in other words, there's no errors
- Author:
- graha
-
-
Constructor Summary
Constructors Constructor Description ResourceValidationTracker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.hl7.fhir.utilities.validation.ValidationMessage>getOutcomes(org.hl7.fhir.r5.model.StructureDefinition sd)voidstartValidating(org.hl7.fhir.r5.model.StructureDefinition sd)voidstoreOutcomes(org.hl7.fhir.r5.model.StructureDefinition sd, List<org.hl7.fhir.utilities.validation.ValidationMessage> errors)
-
-
-
Constructor Detail
-
ResourceValidationTracker
public ResourceValidationTracker()
-
-
Method Detail
-
startValidating
public void startValidating(org.hl7.fhir.r5.model.StructureDefinition sd)
-
getOutcomes
public List<org.hl7.fhir.utilities.validation.ValidationMessage> getOutcomes(org.hl7.fhir.r5.model.StructureDefinition sd)
-
storeOutcomes
public void storeOutcomes(org.hl7.fhir.r5.model.StructureDefinition sd, List<org.hl7.fhir.utilities.validation.ValidationMessage> errors)
-
-