Class PEDefinition

java.lang.Object
org.hl7.fhir.r4.profilemodel.PEDefinition
Direct Known Subclasses:
PEDefinitionElement, PEDefinitionExtension, PEDefinitionResource, PEDefinitionSlice, PEDefinitionSubExtension, PEDefinitionTypeSlice

public abstract class PEDefinition extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • name

      public String name()
      Returns:
      The name of the element or slice in the profile (always unique amongst children)
    • path

      public String path()
      Returns:
      The path of the element or slice in the profile (name.name.name...)
    • schemaName

      public String schemaName()
      Returns:
      The name of the element in the resource (may be different to the slice name)
    • schemaNameWithType

      Returns:
      The name of the element in the resource (may be different to the slice name)
    • types

      public List<PEType> types()
      Returns:
      a list of types. There is usually at least one type; it might be Element, Type, BackboneElement or BackboneType The following elements don't have types (true primitives): Element.id. Extension.url, PrimitiveType.value
    • listTypes

      protected abstract void listTypes(List<PEType> types)
    • min

      public int min()
      Returns:
      The minimum number of repeats allowed
    • max

      public int max()
      Returns:
      the maximum number of repeats allowed
    • definition

      Returns:
      the definition of the element in the profile (fully populated) Note that the profile definition might be the same as a base definition, when the tree runs off the end of what's profiled
    • baseDefinition

      Returns:
      the definition of the element in the base specification Note that the profile definition might be the same as a base definition, when the tree runs off the end of what's profiled
    • shortDocumentation

      Returns:
      the short documentation of the definition (shown in the profile table view)
    • documentation

      Returns:
      the full definition of the element (markdown syntax)
    • children

      public List<PEDefinition> children(String typeUrl)
      Parameters:
      typeUrl - - the url of one of the types listed in types()
      Returns:
      - the list of children for the nominated type Warning: profiles and resources can be recursive; you can't iterate this tree until you get to the leaves because you will never get to a child that doesn't have children (extensions have extensions etc)
    • children

      public List<PEDefinition> children(String typeUrl, boolean allFixed)
    • children

    • children

      public List<PEDefinition> children(boolean allFixed)
    • fixedValue

      public boolean fixedValue()
      Returns:
      True if the element has a fixed value. This will always be false if fixedProps = false when the builder is created
    • makeChildren

      protected abstract void makeChildren(String typeUrl, List<PEDefinition> children, boolean allFixed)
    • toString

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

      public boolean isRecursing()
      Returns:
      true if the builder observes that this element is recursing (extensions have extensions) Note that this is unreliable and may be withdrawn if it can't be fixed
    • setRecursing

      protected void setRecursing(boolean recursing)
    • isMustHaveValue

      protected boolean isMustHaveValue()
    • setMustHaveValue

      protected void setMustHaveValue(boolean mustHaveValue)
    • isInFixedValue

      public boolean isInFixedValue()
      Returns:
      true if this property is inside an element that has an assigned fixed value
    • setInFixedValue

      protected void setInFixedValue(boolean inFixedValue)
    • fhirpath

      public abstract String fhirpath()
      This is public to support unit testing - there's no reason to use it otherwise
      Returns:
      used in the instance processor to differentiate slices
    • isList

      public boolean isList()
    • repeats

      public boolean repeats()
    • mode

    • isProfiled

      public boolean isProfiled()
      Returns:
      true if this element is profiled one way or another
    • isSlicer

      public boolean isSlicer()
    • setSlicer

      public void setSlicer(boolean isSlicer)
    • isBaseList

      public boolean isBaseList()
    • getProfile

    • isKeyElement

      public boolean isKeyElement()
    • isPrimitive

      public boolean isPrimitive()
    • isBasePrimitive

      public boolean isBasePrimitive()
    • directChildren

      public List<PEDefinition> directChildren(boolean allFixed)
    • getSlices

    • setSlices

      public void setSlices(List<PEDefinition> slices)
    • isExtension

      public boolean isExtension()