Interface IModelNodeItem<D extends IModelDefinition,I extends INamedModelInstance>

Type Parameters:
D - the Java type of the model definition
I - 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).
  • Method Details

    • getPosition

      int getPosition()
      Description copied from interface: INodeItem
      Retrieve 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 1 is used as the starting value to align with the XPath specification.

      Specified by:
      getPosition in interface INodeItem
      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:
      getParentNodeItem in interface INodeItem
      Returns:
      the parent node item, or null if this node item has no known parent
    • getParentContentNodeItem

      IAssemblyNodeItem 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 interface INodeItem
      Returns:
      the parent content node item, or null if this node item has no known parent content node item
    • descendantOrSelf

      @NonNull default Stream<? extends IModelNodeItem<?,?>> descendantOrSelf()
      Description copied from interface: INodeItem
      Get 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:
      descendantOrSelf in interface INodeItem
      Returns:
      a stream of this node and descendant node items
    • followingSibling

      @NonNull default Stream<? extends IModelNodeItem<?,?>> followingSibling()
      Description copied from interface: INodeItem
      Get the children of this node's parent that occur after this node in a depth-first order.
      Specified by:
      followingSibling in interface INodeItem
      Returns:
      a stream of nodes
    • precedingSibling

      @NonNull default Stream<? extends IModelNodeItem<?,?>> precedingSibling()
      Description copied from interface: INodeItem
      Get the children of this node's parent, and their descendants, that occur before this node in a depth-first order.
      Specified by:
      precedingSibling in interface INodeItem
      Returns:
      a stream of nodes
    • following

      default Stream<? extends IModelNodeItem<?,?>> following()
      Description copied from interface: INodeItem
      Get the children of this node's parent, and their descendants, that occur before this node in a depth-first order.
      Specified by:
      following in interface INodeItem
      Returns:
      a stream of nodes
    • preceding

      default Stream<? extends IModelNodeItem<?,?>> preceding()
      Description copied from interface: INodeItem
      Get the children of this node's parent, and their descendants, that occur after this node in a depth-first order.
      Specified by:
      preceding in interface INodeItem
      Returns:
      a stream of nodes