Package com.ibm.fhir.path
Interface FHIRPathNode
-
- All Superinterfaces:
Comparable<FHIRPathNode>
- All Known Subinterfaces:
FHIRPathNumberValue
,FHIRPathSystemValue
,FHIRPathTemporalValue
- All Known Implementing Classes:
FHIRPathAbstractNode
,FHIRPathAbstractTemporalValue
,FHIRPathBooleanValue
,FHIRPathDateTimeValue
,FHIRPathDateValue
,FHIRPathDecimalValue
,FHIRPathElementNode
,FHIRPathIntegerValue
,FHIRPathQuantityNode
,FHIRPathQuantityValue
,FHIRPathResourceNode
,FHIRPathStringValue
,FHIRPathTermServiceNode
,FHIRPathTimeValue
,FHIRPathTypeInfoNode
public interface FHIRPathNode extends Comparable<FHIRPathNode>
In FHIRPath, data are represented as a tree of labeled nodes, where each node may optionally carry a primitive value and have child nodes. Nodes need not have a unique label, and leaf nodes must carry a primitive 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(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
Collection<FHIRPathNode>
children()
The child nodes of this FHIRPathNodeCollection<FHIRPathNode>
descendants()
A collection of descendant nodes of this FHIRPathNodeFHIRPathSystemValue
getValue()
The primitive value that this FHIRPathNode is carryingboolean
hasValue()
Indicates whether this FHIRPathNode carries a primitive value<T extends FHIRPathNode>
booleanis(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
String
name()
The name (label) of this FHIRPathNodeString
path()
The path of this FHIRPathNodeStream<FHIRPathNode>
stream()
A stream-based view of this FHIRPathNode and all of its descendantsFHIRPathType
type()
The type of this FHIRPathNode-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
name
String name()
The name (label) of this FHIRPathNode- Returns:
- the name of this FHIRPathNode if exists, otherwise null
-
path
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 carries a primitive value- Returns:
- true if this FHIRPathNode carries a primitive value, otherwise false
-
getValue
FHIRPathSystemValue getValue()
The primitive value that this FHIRPathNode is carrying- Returns:
- the primitive value that this FHIRPathNode is carrying if exists, otherwise null
-
children
Collection<FHIRPathNode> children()
The child nodes of this FHIRPathNode- Returns:
- a collection of child nodes for this FHIRPathNode if exists, otherwise empty collection
-
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
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(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(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
-
-