Package ca.uhn.hl7v2.parser
Class NonStandardStructureDefinition
java.lang.Object
ca.uhn.hl7v2.parser.NonStandardStructureDefinition
- All Implemented Interfaces:
IStructureDefinition
Structure definition which defines a non-standard structure within a parent
structure.
This class is used more as a runtime placeholder than as something that would
be produced by the structure parser.
-
Constructor Summary
ConstructorsConstructorDescriptionNonStandardStructureDefinition(IStructureDefinition theParent, IStructureDefinition thePreviousSibling, String theName, int thePosition) Constructor -
Method Summary
Modifier and TypeMethodDescriptionReturns the names of any possible children that could be the first required child of this group.getName()Should only be called on a leaf node (segment).intbooleanbooleanbooleanbooleanbooleanboolean
-
Constructor Details
-
NonStandardStructureDefinition
public NonStandardStructureDefinition(IStructureDefinition theParent, IStructureDefinition thePreviousSibling, String theName, int thePosition) Constructor
-
-
Method Details
-
getAllChildNames
- Specified by:
getAllChildNamesin interfaceIStructureDefinition- Returns:
- Returns the names of all children of this structure, including first elements within child groups
-
getAllPossibleFirstChildren
Returns the names of any possible children that could be the first required child of this group. For instance, for the group below "ORC" and "OBR" would both be returned, as they are both potential first children of this group. Note that the name returned bythis.getName()is also returned.ORDER_OBSERVATION { [ ORC ] OBR [ { NTE } ] [ CTD ] OBSERVATION { [ OBX ] [ { NTE } ] } OBSERVATION [ { FT1 } ] [ { CTI } ] } ORDER_OBSERVATION- Specified by:
getAllPossibleFirstChildrenin interfaceIStructureDefinition- Returns:
- the names of any possible children that could be the first required child of this group
-
getChildren
- Specified by:
getChildrenin interfaceIStructureDefinition- Returns:
- Returns all children of this structure definition
-
getFirstChild
- Specified by:
getFirstChildin interfaceIStructureDefinition- Returns:
- structure definition of first child of null if there is no child
-
getFirstSibling
- Specified by:
getFirstSiblingin interfaceIStructureDefinition- Returns:
- Returns this structure's first sibling (in other words, its
parent's first child). Returns
nullif this is the first sibling, or if this has no parent
-
getName
- Specified by:
getNamein interfaceIStructureDefinition- Returns:
- Returns the name of this structure
-
getNameAsItAppearsInParent
- Specified by:
getNameAsItAppearsInParentin interfaceIStructureDefinition- Returns:
- The name of the segment, as it is known to it's parent. This
will differ from {
IStructureDefinition.getName()} in the case of multiple segments with the same name in a group, e.g. the two PID segments in ADT_A17, where the second one it known as PID2 to it's parent.
-
getNamesOfAllPossibleFollowingLeaves
Should only be called on a leaf node (segment). Returns the names of all valid children which may follow this one, at any level in the hierarchy (including as later siblings of parent structures to this one)- Specified by:
getNamesOfAllPossibleFollowingLeavesin interfaceIStructureDefinition- Returns:
- the names of all valid children which may follow this one
-
getNextLeaf
- Specified by:
getNextLeafin interfaceIStructureDefinition- Returns:
- Returns the next leaf (segment) after this one, within the same
group, only if one exists and this structure is also a leaf. Otherwise returns
null.
-
getNextSibling
- Specified by:
getNextSiblingin interfaceIStructureDefinition- Returns:
- Returns this structure's next sibling within it's parent, if any.
-
getParent
- Specified by:
getParentin interfaceIStructureDefinition- Returns:
- Returns the parent structure of this structure, if one exists. Otherwise, returns null.
-
getPosition
- Specified by:
getPositionin interfaceIStructureDefinition- Returns:
- Returns the index of the position of this structure within it's parent's children
-
hasChildren
- Specified by:
hasChildrenin interfaceIStructureDefinition- Returns:
- Does this structure have children (i.e. is it not a segment)
-
isFinalChildOfParent
- Specified by:
isFinalChildOfParentin interfaceIStructureDefinition- Returns:
- Returns true if this structure is the final child of it's parent.
-
isRepeating
- Specified by:
isRepeatingin interfaceIStructureDefinition- Returns:
- Returns true if this is a repeatable structure
-
isRequired
- Specified by:
isRequiredin interfaceIStructureDefinition- Returns:
- true if this a required structure within it's parent
-
isSegment
- Specified by:
isSegmentin interfaceIStructureDefinition- Returns:
- Returns true if this structure is a segment
-
isChoiceElement
- Specified by:
isChoiceElementin interfaceIStructureDefinition- Returns:
- true if this element a choice element
- See Also:
-