Package com.ibm.fhir.path
Interface FHIRPathNode
-
- All Superinterfaces:
java.lang.Comparable<FHIRPathNode>
- All Known Subinterfaces:
FHIRPathNumberValue
,FHIRPathSystemValue
,FHIRPathTemporalValue
- All Known Implementing Classes:
FHIRPathAbstractNode
,FHIRPathAbstractSystemValue
,FHIRPathAbstractTemporalValue
,FHIRPathBooleanValue
,FHIRPathDateTimeValue
,FHIRPathDateValue
,FHIRPathDecimalValue
,FHIRPathElementNode
,FHIRPathIntegerValue
,FHIRPathQuantityNode
,FHIRPathQuantityValue
,FHIRPathResourceNode
,FHIRPathStringValue
,FHIRPathTermServiceNode
,FHIRPathTimeValue
,FHIRPathTypeInfoNode
public interface FHIRPathNode extends java.lang.Comparable<FHIRPathNode>
In FHIRPath, data are represented as a tree of labeled nodes, where each node may optionally have a child system value and child nodes. Nodes need not have a unique label, and leaf nodes must have a child system value.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
FHIRPathNode.Builder
A builder interface for building FHIRPathNode instances
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
accept(FHIRPathNodeVisitor visitor)
A method for accepting aFHIRPathNodeVisitor
<T extends FHIRPathNode>
Tas(java.lang.Class<T> nodeType)
Cast this FHIRPathNode to the type specified in the parameterdefault FHIRPathElementNode
asElementNode()
Cast this FHIRPathNode to aFHIRPathElementNode
default FHIRPathResourceNode
asResourceNode()
Cast this FHIRPathNode to aFHIRPathResourceNode
default FHIRPathSystemValue
asSystemValue()
Cast this FHIRPathNode to aFHIRPathSystemValue
default FHIRPathTermServiceNode
asTermServiceNode()
Cast this FHIRPathNode to aFHIRPathTermServiceNode
default FHIRPathTypeInfoNode
asTypeInfoNode()
Cast this FHIRPathNode to aFHIRPathTypeInfoNode
java.util.Collection<FHIRPathNode>
children()
The child nodes of this FHIRPathNodejava.util.Collection<FHIRPathNode>
descendants()
A collection of descendant nodes of this FHIRPathNodeFHIRPathSystemValue
getValue()
The child system value of this FHIRPathNodeboolean
hasValue()
Indicates whether this FHIRPathNode has a child system value<T extends FHIRPathNode>
booleanis(java.lang.Class<T> nodeType)
Indicates whether this FHIRPathNode is type compatible with the parameterdefault boolean
isComparableTo(FHIRPathNode other)
Indicates whether this FHIRPathNode is comparable to the parameterdefault boolean
isElementNode()
Indicates whether this FHIRPathNode is type compatible withFHIRPathElementNode
default boolean
isResourceNode()
Indicates whether this FHIRPathNode is type compatible withFHIRPathResourceNode
default boolean
isSystemValue()
Indicates whether this FHIRPathNode is type compatible withFHIRPathSystemValue
default boolean
isTermServiceNode()
Indicates whether this FHIRPathNode is type compatible withFHIRPathTermServiceNode
default boolean
isTypeInfoNode()
Indicates whether this FHIRPathNode is type compatible withFHIRPathTypeInfoNode
java.lang.String
name()
The name (label) of this FHIRPathNodejava.lang.String
path()
The path of this FHIRPathNodejava.util.stream.Stream<FHIRPathNode>
stream()
A stream-based view of this FHIRPathNode and all of its descendantsFHIRPathType
type()
The type of this FHIRPathNode
-
-
-
Method Detail
-
name
java.lang.String name()
The name (label) of this FHIRPathNode- Returns:
- the name of this FHIRPathNode if exists, otherwise null
-
path
java.lang.String path()
The path of this FHIRPathNode- Returns:
- the path of this FHIRPathNode if exists, otherwise null
-
type
FHIRPathType type()
The type of this FHIRPathNode- Returns:
- the type of this FHIRPathNode
-
hasValue
boolean hasValue()
Indicates whether this FHIRPathNode has a child system value- Returns:
- true if this FHIRPathNode has a child system value, otherwise false
-
getValue
FHIRPathSystemValue getValue()
The child system value of this FHIRPathNode- Returns:
- the child system value of this FHIRPathNode, otherwise null
-
children
java.util.Collection<FHIRPathNode> children()
The child nodes of this FHIRPathNode- Returns:
- a collection of child nodes for this FHIRPathNode if exists, otherwise empty collection
-
stream
java.util.stream.Stream<FHIRPathNode> stream()
A stream-based view of this FHIRPathNode and all of its descendants- Returns:
- A stream containing this FHIRPathNode and all of its descendants
-
descendants
java.util.Collection<FHIRPathNode> descendants()
A collection of descendant nodes of this FHIRPathNode- Returns:
- a collection of descendant nodes of this FHIRPathNode if exists, otherwise empty collection
-
isComparableTo
default boolean isComparableTo(FHIRPathNode other)
Indicates whether this FHIRPathNode is comparable to the parameter- Parameters:
other
- the other FHIRPathNode- Returns:
- true if this FHIRPathNode is comparable to the parameter, otherwise false
-
is
<T extends FHIRPathNode> boolean is(java.lang.Class<T> nodeType)
Indicates whether this FHIRPathNode is type compatible with the parameter- Type Parameters:
T
- FHIRPathNode or one of its implementations- Parameters:
nodeType
- the nodeType we are checking against- Returns:
- true if this FHIRPathNode is type compatible with
nodeType
, otherwise false
-
as
<T extends FHIRPathNode> T as(java.lang.Class<T> nodeType)
Cast this FHIRPathNode to the type specified in the parameter- Type Parameters:
T
- FHIRPathNode or one of its implementations- Parameters:
nodeType
- the nodeType we are casting to- Returns:
- this FHIRPathNode cast to the type specified in the parameter
-
isElementNode
default boolean isElementNode()
Indicates whether this FHIRPathNode is type compatible withFHIRPathElementNode
- Returns:
- true if this FHIRPathNode is type compatible with
FHIRPathElementNode
, otherwise false
-
isResourceNode
default boolean isResourceNode()
Indicates whether this FHIRPathNode is type compatible withFHIRPathResourceNode
- Returns:
- true if this FHIRPathNode is type compatible with
FHIRPathResourceNode
, otherwise false
-
isSystemValue
default boolean isSystemValue()
Indicates whether this FHIRPathNode is type compatible withFHIRPathSystemValue
- Returns:
- true if this FHIRPathNode is type compatible with
FHIRPathSystemValue
, otherwise false
-
isTypeInfoNode
default boolean isTypeInfoNode()
Indicates whether this FHIRPathNode is type compatible withFHIRPathTypeInfoNode
- Returns:
- true if this FHIRPathNode is type compatible with
FHIRPathTypeInfoNode
, otherwise false
-
isTermServiceNode
default boolean isTermServiceNode()
Indicates whether this FHIRPathNode is type compatible withFHIRPathTermServiceNode
- Returns:
- true if this FHIRPathNode is type compatible with
FHIRPathTermServiceNode
, otherwise false
-
asElementNode
default FHIRPathElementNode asElementNode()
Cast this FHIRPathNode to aFHIRPathElementNode
- Returns:
- this FHIRPathNode as a
FHIRPathElementNode
-
asResourceNode
default FHIRPathResourceNode asResourceNode()
Cast this FHIRPathNode to aFHIRPathResourceNode
- Returns:
- this FHIRPathNode as a
FHIRPathResourceNode
-
asSystemValue
default FHIRPathSystemValue asSystemValue()
Cast this FHIRPathNode to aFHIRPathSystemValue
- Returns:
- this FHIRPathNode as a
FHIRPathSystemValue
-
asTypeInfoNode
default FHIRPathTypeInfoNode asTypeInfoNode()
Cast this FHIRPathNode to aFHIRPathTypeInfoNode
- Returns:
- this FHIRPathNode as a
FHIRPathTypeInfoNode
-
asTermServiceNode
default FHIRPathTermServiceNode asTermServiceNode()
Cast this FHIRPathNode to aFHIRPathTermServiceNode
- Returns:
- this FHIRPathNode as a
FHIRPathTermServiceNode
-
accept
void accept(FHIRPathNodeVisitor visitor)
A method for accepting aFHIRPathNodeVisitor
- Parameters:
visitor
- theFHIRPathNodeVisitor
that this FHIRPathNode is accepting
-
-