Package com.ibm.fhir.path
Class FHIRPathAbstractNode
- java.lang.Object
-
- com.ibm.fhir.path.FHIRPathAbstractNode
-
- All Implemented Interfaces:
FHIRPathNode
,Comparable<FHIRPathNode>
- Direct Known Subclasses:
FHIRPathAbstractSystemValue
,FHIRPathElementNode
,FHIRPathResourceNode
,FHIRPathTermServiceNode
,FHIRPathTypeInfoNode
public abstract class FHIRPathAbstractNode extends Object implements FHIRPathNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FHIRPathAbstractNode.Builder
-
Field Summary
Fields Modifier and Type Field Description protected Collection<FHIRPathNode>
children
protected String
name
protected String
path
protected FHIRPathType
type
protected FHIRPathSystemValue
value
-
Constructor Summary
Constructors Modifier Constructor Description protected
FHIRPathAbstractNode(FHIRPathAbstractNode.Builder builder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T extends FHIRPathNode>
Tas(Class<T> nodeType)
Cast this FHIRPathNode to the type specified in the parameterCollection<FHIRPathNode>
children()
The child nodes of this FHIRPathNodeCollection<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(Class<T> nodeType)
Indicates whether this FHIRPathNode is type compatible with the parameterString
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 descendantsabstract FHIRPathAbstractNode.Builder
toBuilder()
Convert thisFHIRPathNode
instance into aFHIRPathNode.Builder
instanceFHIRPathType
type()
The type of this FHIRPathNode-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface com.ibm.fhir.path.FHIRPathNode
accept, asElementNode, asResourceNode, asSystemValue, asTermServiceNode, asTypeInfoNode, isComparableTo, isElementNode, isResourceNode, isSystemValue, isTermServiceNode, isTypeInfoNode
-
-
-
-
Field Detail
-
name
protected final String name
-
path
protected final String path
-
type
protected final FHIRPathType type
-
value
protected final FHIRPathSystemValue value
-
children
protected final Collection<FHIRPathNode> children
-
-
Constructor Detail
-
FHIRPathAbstractNode
protected FHIRPathAbstractNode(FHIRPathAbstractNode.Builder builder)
-
-
Method Detail
-
name
public String name()
Description copied from interface:FHIRPathNode
The name (label) of this FHIRPathNode- Specified by:
name
in interfaceFHIRPathNode
- Returns:
- the name of this FHIRPathNode if exists, otherwise null
-
path
public String path()
Description copied from interface:FHIRPathNode
The path of this FHIRPathNode- Specified by:
path
in interfaceFHIRPathNode
- Returns:
- the path of this FHIRPathNode if exists, otherwise null
-
type
public FHIRPathType type()
Description copied from interface:FHIRPathNode
The type of this FHIRPathNode- Specified by:
type
in interfaceFHIRPathNode
- Returns:
- the type of this FHIRPathNode
-
hasValue
public boolean hasValue()
Description copied from interface:FHIRPathNode
Indicates whether this FHIRPathNode has a child system value- Specified by:
hasValue
in interfaceFHIRPathNode
- Returns:
- true if this FHIRPathNode has a child system value, otherwise false
-
getValue
public FHIRPathSystemValue getValue()
Description copied from interface:FHIRPathNode
The child system value of this FHIRPathNode- Specified by:
getValue
in interfaceFHIRPathNode
- Returns:
- the child system value of this FHIRPathNode, otherwise null
-
children
public Collection<FHIRPathNode> children()
Description copied from interface:FHIRPathNode
The child nodes of this FHIRPathNode- Specified by:
children
in interfaceFHIRPathNode
- Returns:
- a collection of child nodes for this FHIRPathNode if exists, otherwise empty collection
-
descendants
public Collection<FHIRPathNode> descendants()
Description copied from interface:FHIRPathNode
A collection of descendant nodes of this FHIRPathNode- Specified by:
descendants
in interfaceFHIRPathNode
- Returns:
- a collection of descendant nodes of this FHIRPathNode if exists, otherwise empty collection
-
stream
public Stream<FHIRPathNode> stream()
Description copied from interface:FHIRPathNode
A stream-based view of this FHIRPathNode and all of its descendants- Specified by:
stream
in interfaceFHIRPathNode
- Returns:
- A stream containing this FHIRPathNode and all of its descendants
-
is
public final <T extends FHIRPathNode> boolean is(Class<T> nodeType)
Description copied from interface:FHIRPathNode
Indicates whether this FHIRPathNode is type compatible with the parameter- Specified by:
is
in interfaceFHIRPathNode
- 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
public final <T extends FHIRPathNode> T as(Class<T> nodeType)
Description copied from interface:FHIRPathNode
Cast this FHIRPathNode to the type specified in the parameter- Specified by:
as
in interfaceFHIRPathNode
- 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
-
toBuilder
public abstract FHIRPathAbstractNode.Builder toBuilder()
Convert thisFHIRPathNode
instance into aFHIRPathNode.Builder
instance- Returns:
- a new
FHIRPathNode.Builder
instance containing the fields from thisFHIRPathNode
instance
-
-