Interface IDocumentNodeItem
-
- All Superinterfaces:
IItem
,INodeItem
,INodeItemVisitable
,IPathSegment
- All Known Subinterfaces:
IModuleNodeItem
public interface IDocumentNodeItem extends INodeItem
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <RESULT,CONTEXT>
RESULTaccept(INodeItemVisitor<RESULT,CONTEXT> visitor, CONTEXT context)
A visitor callback.default String
format(IPathFormatter formatter)
Generate a path for this node in the directed node graph, using the provided path formatter.default URI
getBaseUri()
Retrieve the base URI of this node.URI
getDocumentUri()
Get the URI associated with this document.default IDocumentNodeItem
getNodeItem()
Get the value associated with the path segment.default NodeItemType
getNodeItemType()
Get the type of node item this is.default IModelNodeItem<?,?>
getParentContentNodeItem()
Retrieve the parent content node item if it exists.default INodeItem
getParentNodeItem()
Retrieve the parent node item if it exists.default List<? extends IRootAssemblyNodeItem>
getRootNodeItemByName(String name)
Get the root items having the providedname
.default Object
getValue()
Get the item's "wrapped" value.default boolean
hasValue()
Determine if the item has an associated value.-
Methods inherited from interface gov.nist.secauto.metaschema.core.metapath.item.node.INodeItem
ancestor, ancestorOrSelf, descendant, descendantOrSelf, flags, getFlagByName, getFlags, getMetapath, getModelItems, getModelItemsByName, getPathStream, modelItems
-
Methods inherited from interface gov.nist.secauto.metaschema.core.metapath.format.IPathSegment
getPath, toPath
-
-
-
-
Method Detail
-
getNodeItemType
default NodeItemType getNodeItemType()
Description copied from interface:INodeItem
Get the type of node item this is.- Specified by:
getNodeItemType
in interfaceINodeItem
- Returns:
- the node item's type
-
getNodeItem
default IDocumentNodeItem getNodeItem()
Description copied from interface:IPathSegment
Get the value associated with the path segment.- Specified by:
getNodeItem
in interfaceIPathSegment
- Returns:
- the value or if no value is associated with this path segment
-
getParentContentNodeItem
default IModelNodeItem<?,?> getParentContentNodeItem()
Description copied from interface:INodeItem
Retrieve the parent content node item if it exists. A content node is a non-document node.- Specified by:
getParentContentNodeItem
in interfaceINodeItem
- Returns:
- the parent content node item, or
null
if this node item has no known parent content node item
-
getParentNodeItem
default INodeItem getParentNodeItem()
Description copied from interface:INodeItem
Retrieve the parent node item if it exists.- Specified by:
getParentNodeItem
in interfaceINodeItem
- Returns:
- the parent node item, or
null
if this node item has no known parent
-
getDocumentUri
@Nullable URI getDocumentUri()
Get the URI associated with this document.- Returns:
- the document's URI or
null
if unavailable
-
getBaseUri
default URI getBaseUri()
Description copied from interface:INodeItem
Retrieve the base URI of this node.The base URI of a node will be in order of preference:
- the base URI defined on the node
- the base URI defined on the nearest ancestor node
- the base URI defined on the document node
null
if the document node is unknown
- Specified by:
getBaseUri
in interfaceINodeItem
- Returns:
- the base URI or
null
if it is unknown
-
getRootNodeItemByName
default List<? extends IRootAssemblyNodeItem> getRootNodeItemByName(@NonNull String name)
Get the root items having the providedname
.- Parameters:
name
- the root item's name to retrieve- Returns:
- a list of matching root items
-
format
default String format(@NonNull IPathFormatter formatter)
Description copied from interface:INodeItem
Generate a path for this node in the directed node graph, using the provided path formatter.- Specified by:
format
in interfaceINodeItem
- Specified by:
format
in interfaceIPathSegment
- Parameters:
formatter
- the path formatter- Returns:
- a textual representation of the path segment
-
accept
default <RESULT,CONTEXT> RESULT accept(@NonNull INodeItemVisitor<RESULT,CONTEXT> visitor, CONTEXT context)
Description copied from interface:INodeItemVisitable
A visitor callback.- Specified by:
accept
in interfaceINodeItemVisitable
- Type Parameters:
RESULT
- the type of the visitor resultCONTEXT
- the type of the context parameter- Parameters:
visitor
- the calling visitorcontext
- a parameter used to pass contextual information between visitors- Returns:
- the visitor result
-
getValue
@Nullable default Object getValue()
Description copied from interface:IItem
Get the item's "wrapped" value. This "wrapped" value may be:- In the case of an Assembly, a Java object representing the fields and flags of the assembly.
- In the case of a Field with flags, a Java object representing the field value and flags of the field.
- In the case of a Field without flags or a flag, a Java type managed by a
IDataTypeAdapter
or a primitive type provided by the Java standard library.
-
-