Module dev.metaschema.core
Interface IModelNodeItem<D extends IModelDefinition,I extends INamedModelInstance>
- Type Parameters:
D- the Java type of the model definitionI- the Java type of the model instance
- All Superinterfaces:
ICollectionValue,IDefinitionNodeItem<D,,I> IItem,IMetapathQueryable,INodeItem,INodeItemVisitable,IPathSegment
- All Known Subinterfaces:
IAssemblyInstanceGroupedNodeItem,IAssemblyNodeItem,ICycledAssemblyNodeItem,IFieldNodeItem,IRootAssemblyNodeItem
public interface IModelNodeItem<D extends IModelDefinition,I extends INamedModelInstance>
extends IDefinitionNodeItem<D,I>
Represents a Metapath node item for a Metaschema model instance (assembly or
field).
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.metaschema.core.metapath.item.node.INodeItem
INodeItem.NodeType -
Method Summary
Modifier and TypeMethodDescriptiondefault Stream<? extends IModelNodeItem<?,?>> Get a stream of this node, followed by all descendant model items of this node item.default Stream<? extends IModelNodeItem<?,?>> Get the children of this node's parent, and their descendants, that occur before this node in a depth-first order.default Stream<? extends IModelNodeItem<?,?>> Get the children of this node's parent that occur after this node in a depth-first order.Retrieve the parent content node item if it exists.Retrieve the parent node item if it exists.intRetrieve the relative position of this node relative to sibling nodes.default Stream<? extends IModelNodeItem<?,?>> Get the children of this node's parent, and their descendants, that occur after this node in a depth-first order.default Stream<? extends IModelNodeItem<?,?>> Get the children of this node's parent, and their descendants, that occur before this node in a depth-first order.Methods inherited from interface dev.metaschema.core.metapath.item.ICollectionValue
deepEquals, toSignatureMethods inherited from interface dev.metaschema.core.metapath.item.node.IDefinitionNodeItem
getDefinition, getInstance, getLocation, getQNameMethods inherited from interface dev.metaschema.core.metapath.item.IItem
atomize, contentsAsSequence, flatten, getType, getValue, hasValue, toAtomicItem, toSequenceMethods inherited from interface dev.metaschema.core.metapath.item.node.INodeItem
accept, ancestor, ancestorOrSelf, descendant, flags, format, getBaseUri, getFlagByName, getFlags, getMetapath, getModelItems, getModelItemsByName, getNodeItemKind, getNodeType, getPathStream, getStaticContext, modelItems, stringValueMethods inherited from interface dev.metaschema.core.metapath.item.node.INodeItemVisitable
acceptMethods inherited from interface dev.metaschema.core.metapath.format.IPathSegment
getNodeItem, getPath, toPath
-
Method Details
-
getPosition
int getPosition()Description copied from interface:INodeItemRetrieve the relative position of this node relative to sibling nodes.A singleton item in a sequence will have a position value of
1.The value
1is used as the starting value to align with the XPath specification.- Specified by:
getPositionin interfaceINodeItem- Returns:
- a positive integer value designating this instance's position within a collection
-
getParentNodeItem
INodeItem getParentNodeItem()Retrieve the parent node item if it exists.The parent can be an assembly or a document (in the case of a root assembly.
- Specified by:
getParentNodeItemin interfaceINodeItem- Returns:
- the parent node item, or
nullif this node item has no known parent
-
getParentContentNodeItem
IAssemblyNodeItem getParentContentNodeItem()Description copied from interface:INodeItemRetrieve the parent content node item if it exists. A content node is a non-document node.- Specified by:
getParentContentNodeItemin interfaceINodeItem- Returns:
- the parent content node item, or
nullif this node item has no known parent content node item
-
descendantOrSelf
Description copied from interface:INodeItemGet a stream of this node, followed by all descendant model items of this node item. The stream is ordered from closest to farthest descendants in a depth-first order.- Specified by:
descendantOrSelfin interfaceINodeItem- Returns:
- a stream of this node and descendant node items
-
followingSibling
Description copied from interface:INodeItemGet the children of this node's parent that occur after this node in a depth-first order.- Specified by:
followingSiblingin interfaceINodeItem- Returns:
- a stream of nodes
-
precedingSibling
Description copied from interface:INodeItemGet the children of this node's parent, and their descendants, that occur before this node in a depth-first order.- Specified by:
precedingSiblingin interfaceINodeItem- Returns:
- a stream of nodes
-
following
Description copied from interface:INodeItemGet the children of this node's parent, and their descendants, that occur before this node in a depth-first order. -
preceding
Description copied from interface:INodeItemGet the children of this node's parent, and their descendants, that occur after this node in a depth-first order.
-