Package org.hl7.fhir.r4.profilemodel
Class PEDefinition
java.lang.Object
org.hl7.fhir.r4.profilemodel.PEDefinition
- Direct Known Subclasses:
PEDefinitionElement
,PEDefinitionExtension
,PEDefinitionResource
,PEDefinitionSlice
,PEDefinitionSubExtension
,PEDefinitionTypeSlice
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected PEBuilder
protected Map
<String, List<PEDefinition>> protected ElementDefinition
protected String
protected String
protected StructureDefinition
-
Constructor Summary
ModifierConstructorDescriptionprotected
PEDefinition
(PEBuilder builder, String name, StructureDefinition profile, ElementDefinition definition, String ppath) -
Method Summary
Modifier and TypeMethodDescriptionchildren()
children
(boolean allFixed) directChildren
(boolean allFixed) abstract String
fhirpath()
This is public to support unit testing - there's no reason to use it otherwiseboolean
boolean
boolean
boolean
boolean
boolean
boolean
isList()
protected boolean
boolean
boolean
boolean
boolean
isSlicer()
protected abstract void
protected abstract void
makeChildren
(String typeUrl, List<PEDefinition> children, boolean allFixed) int
max()
int
min()
mode()
name()
path()
boolean
repeats()
protected void
setInFixedValue
(boolean inFixedValue) protected void
setMustHaveValue
(boolean mustHaveValue) protected void
setRecursing
(boolean recursing) void
setSlicer
(boolean isSlicer) void
setSlices
(List<PEDefinition> slices) toString()
types()
-
Field Details
-
builder
-
name
-
path
-
profile
-
definition
-
types
-
children
-
-
Constructor Details
-
PEDefinition
protected PEDefinition(PEBuilder builder, String name, StructureDefinition profile, ElementDefinition definition, String ppath)
-
-
Method Details
-
name
- Returns:
- The name of the element or slice in the profile (always unique amongst children)
-
path
- Returns:
- The path of the element or slice in the profile (name.name.name...)
-
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
- 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
-
min
- Returns:
- The minimum number of repeats allowed
-
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
- 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
-
children
-
children
-
hasFixedValue
- Returns:
- True if the element has a fixed value. This will always be false if fixedProps = false when the builder is created
-
getFixedValue
-
makeChildren
-
toString
-
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
-
isMustHaveValue
-
setMustHaveValue
-
isInFixedValue
- Returns:
- true if this property is inside an element that has an assigned fixed value
-
setInFixedValue
-
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
-
repeats
-
mode
-
isProfiled
- Returns:
- true if this element is profiled one way or another
-
isSlicer
-
setSlicer
-
isBaseList
-
getProfile
-
isKeyElement
-
isPrimitive
-
isBasePrimitive
-
directChildren
-
getSlices
-
setSlices
-
isExtension
-