Interface IFlagNodeItem
-
- All Superinterfaces:
IAtomicValuedItem
,IDefinitionNodeItem<IFlagDefinition,IFlagInstance>
,IItem
,INodeItem
,INodeItemVisitable
,IPathSegment
public interface IFlagNodeItem extends IDefinitionNodeItem<IFlagDefinition,IFlagInstance>, IAtomicValuedItem
-
-
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 Stream<? extends IFlagNodeItem>
flags()
FlagContainer do not have flag items.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.IFlagDefinition
getDefinition()
Get the Metaschema definition associated with this node.default IFlagNodeItem
getFlagByName(String name)
FlagContainer do not have flag items.default Collection<? extends IFlagNodeItem>
getFlags()
FlagContainer do not have flag items.IFlagInstance
getInstance()
Retrieve the instance associated with this path segment.default Collection<? extends List<? extends IModelNodeItem<?,?>>>
getModelItems()
FlagContainer do not have model items.default List<? extends IModelNodeItem<?,?>>
getModelItemsByName(String name)
FlagContainer do not have model items.default IFlagNodeItem
getNodeItem()
Get the value associated with the path segment.default NodeItemType
getNodeItemType()
Get the type of node item this is.default Stream<? extends IModelNodeItem<?,?>>
modelItems()
FlagContainer do not have model items.-
Methods inherited from interface gov.nist.secauto.metaschema.core.metapath.item.IAtomicValuedItem
toAtomicItem
-
Methods inherited from interface gov.nist.secauto.metaschema.core.metapath.item.node.IDefinitionNodeItem
getName
-
Methods inherited from interface gov.nist.secauto.metaschema.core.metapath.item.IItem
getValue, hasValue
-
Methods inherited from interface gov.nist.secauto.metaschema.core.metapath.item.node.INodeItem
ancestor, ancestorOrSelf, descendant, descendantOrSelf, getMetapath, getParentContentNodeItem, getParentNodeItem, getPathStream
-
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 IFlagNodeItem 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
-
getDefinition
IFlagDefinition getDefinition()
Description copied from interface:IDefinitionNodeItem
Get the Metaschema definition associated with this node.- Specified by:
getDefinition
in interfaceIDefinitionNodeItem<IFlagDefinition,IFlagInstance>
- Returns:
- the definition
-
getInstance
IFlagInstance getInstance()
Description copied from interface:IDefinitionNodeItem
Retrieve the instance associated with this path segment.- Specified by:
getInstance
in interfaceIDefinitionNodeItem<IFlagDefinition,IFlagInstance>
- Returns:
- the instance of the segment, or
null
if it doesn't have one
-
getBaseUri
@Nullable 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
-
getFlags
default Collection<? extends IFlagNodeItem> getFlags()
FlagContainer do not have flag items. This call should return an empty collection.
-
getFlagByName
default IFlagNodeItem getFlagByName(@NonNull String name)
FlagContainer do not have flag items. This call should returnnull
.- Specified by:
getFlagByName
in interfaceINodeItem
- Parameters:
name
- the effective name of the flag- Returns:
- the flag with the matching effective name or
null
if no match was found
-
flags
@NonNull default Stream<? extends IFlagNodeItem> flags()
FlagContainer do not have flag items. This call should return an empty stream.
-
getModelItems
@NonNull default Collection<? extends List<? extends IModelNodeItem<?,?>>> getModelItems()
FlagContainer do not have model items. This call should return an empty collection.- Specified by:
getModelItems
in interfaceINodeItem
- Returns:
- a collection of list(s), with each list containing the items for a given model instance
-
getModelItemsByName
default List<? extends IModelNodeItem<?,?>> getModelItemsByName(String name)
FlagContainer do not have model items. This call should return an empty list.- Specified by:
getModelItemsByName
in interfaceINodeItem
- Parameters:
name
- the instance name to get model items for- Returns:
- the sequence of items associated with the named model instance, or an empty list if an instance with that name is not present
-
modelItems
@NonNull default Stream<? extends IModelNodeItem<?,?>> modelItems()
FlagContainer do not have model items. This call should return an empty stream.- Specified by:
modelItems
in interfaceINodeItem
- Returns:
- the stream of model items or an empty stream if none exist
-
format
@NonNull 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
-
-