Package org.hl7.fhir.dstu2.utils
Class DefinitionNavigator
java.lang.Object
org.hl7.fhir.dstu2.utils.DefinitionNavigator
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
DefinitionNavigator
public DefinitionNavigator(IWorkerContext context, StructureDefinition structure) throws org.hl7.fhir.exceptions.DefinitionException - Throws:
org.hl7.fhir.exceptions.DefinitionException
-
-
Method Details
-
getNames
When you walk a tree, and you walk into a typed structure, an element can simultaineously be covered by multiple types at once. Take, for example, the string label for an identifer value. It has the following paths: Patient.identifier.value.value Identifier.value.value String.value value If you started in a bundle, the list might be even longer and deeper Any of these names might be relevant. This function returns the names in an ordered list in the order above- Returns:
-
current
-
slices
- Throws:
org.hl7.fhir.exceptions.DefinitionException
-
children
- Throws:
org.hl7.fhir.exceptions.DefinitionException
-
path
-
nameTail
-
hasTypeChildren
public boolean hasTypeChildren(ElementDefinition.TypeRefComponent type) throws org.hl7.fhir.exceptions.DefinitionException if you have a typed element, the tree might end at that point. And you may or may not want to walk into the tree of that type It depends what you are doing. So this is a choice. You can ask for the children, and then, if you get no children, you can see if there are children defined for the type, and then get them you have to provide a type if there's more than one type for current() since this library doesn't know how to choose- Throws:
org.hl7.fhir.exceptions.DefinitionException
- @
-
childrenFromType
public List<DefinitionNavigator> childrenFromType(ElementDefinition.TypeRefComponent type) throws org.hl7.fhir.exceptions.DefinitionException - Returns:
- Throws:
org.hl7.fhir.exceptions.DefinitionException
- @
-