Class DefinitionNavigator

java.lang.Object
org.hl7.fhir.r5.utils.DefinitionNavigator

public class DefinitionNavigator extends Object
  • Constructor Details

  • Method Details

    • getNames

      public List<String> 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

      public List<DefinitionNavigator> slices() throws org.hl7.fhir.exceptions.DefinitionException
      Throws:
      org.hl7.fhir.exceptions.DefinitionException
    • children

      public List<DefinitionNavigator> children() throws org.hl7.fhir.exceptions.DefinitionException
      Throws:
      org.hl7.fhir.exceptions.DefinitionException
    • path

      public String path()
    • nameTail

      public String nameTail()
    • hasTypeChildren

      public boolean hasTypeChildren(ElementDefinition.TypeRefComponent type, Resource res) 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
      Parameters:
      res -
      Throws:
      org.hl7.fhir.exceptions.DefinitionException
    • childrenFromType

      public List<DefinitionNavigator> childrenFromType(ElementDefinition.TypeRefComponent type, Resource res) throws org.hl7.fhir.exceptions.DefinitionException
      Parameters:
      res -
      Returns:
      Throws:
      org.hl7.fhir.exceptions.DefinitionException
    • getStructure

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getId

      public String getId()
    • parent

      public Base parent()