Package com.ibm.fhir.model.type
Class ElementDefinition.Slicing
- java.lang.Object
-
- com.ibm.fhir.model.visitor.AbstractVisitable
-
- com.ibm.fhir.model.type.Element
-
- com.ibm.fhir.model.type.BackboneElement
-
- com.ibm.fhir.model.type.ElementDefinition.Slicing
-
- All Implemented Interfaces:
Visitable
- Enclosing class:
- ElementDefinition
public static class ElementDefinition.Slicing extends BackboneElement
Indicates that the element is sliced into a set of alternative definitions (i.e. in a structure definition, there are multiple different constraints on a single element in the base resource). Slicing can be used in any resource that has cardinality ..* on the base resource, or any resource with a choice of types. The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classElementDefinition.Slicing.Builderstatic classElementDefinition.Slicing.DiscriminatorDesignates which child elements are used to discriminate between the slices when processing an instance.
-
Field Summary
-
Fields inherited from class com.ibm.fhir.model.type.BackboneElement
modifierExtension
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(String elementName, int elementIndex, Visitor visitor)Accept a Visitor and invoke the appropriate visit methods.static ElementDefinition.Slicing.Builderbuilder()booleanequals(Object obj)StringgetDescription()A human-readable text description of how the slicing works.List<ElementDefinition.Slicing.Discriminator>getDiscriminator()Designates which child elements are used to discriminate between the slices when processing an instance.BooleangetOrdered()If the matching elements have to occur in the same order as defined in the profile.SlicingRulesgetRules()Whether additional slices are allowed or not.booleanhasChildren()inthashCode()ElementDefinition.Slicing.BuildertoBuilder()Create a new Builder from the contents of this Element-
Methods inherited from class com.ibm.fhir.model.type.BackboneElement
getModifierExtension
-
-
-
-
Method Detail
-
getDiscriminator
public List<ElementDefinition.Slicing.Discriminator> getDiscriminator()
Designates which child elements are used to discriminate between the slices when processing an instance. If one or more discriminators are provided, the value of the child elements in the instance data SHALL completely distinguish which slice the element in the resource matches based on the allowed values for those elements in each of the slices.- Returns:
- An unmodifiable list containing immutable objects of type
ElementDefinition.Slicing.Discriminatorthat may be empty.
-
getDescription
public String getDescription()
A human-readable text description of how the slicing works. If there is no discriminator, this is required to be present to provide whatever information is possible about how the slices can be differentiated.- Returns:
- An immutable object of type
Stringthat may be null.
-
getOrdered
public Boolean getOrdered()
If the matching elements have to occur in the same order as defined in the profile.- Returns:
- An immutable object of type
Booleanthat may be null.
-
getRules
public SlicingRules getRules()
Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.- Returns:
- An immutable object of type
SlicingRulesthat is non-null.
-
hasChildren
public boolean hasChildren()
- Overrides:
hasChildrenin classBackboneElement
-
accept
public void accept(String elementName, int elementIndex, Visitor visitor)
Description copied from interface:VisitableAccept a Visitor and invoke the appropriate visit methods. A typical implementation would look like this:if (visitor.preVisit(this)) { visitor.visitStart(elementName, elementIndex, this); if (visitor.visit(elementName, elementIndex, this)) { // visit children } visitor.visitEnd(elementName, elementIndex, this); visitor.postVisit(this); }- Specified by:
acceptin interfaceVisitable- Specified by:
acceptin classAbstractVisitable- Parameters:
elementName- the name of the element in the context of this visitelementIndex- the index of the element in a list or -1 if it is not contained within a Listvisitor- the visitor to use
-
toBuilder
public ElementDefinition.Slicing.Builder toBuilder()
Description copied from class:ElementCreate a new Builder from the contents of this Element- Specified by:
toBuilderin classBackboneElement
-
builder
public static ElementDefinition.Slicing.Builder builder()
-
-