Class AbstractInstanceNodeItem<D extends IDefinition,I extends INamedInstance,P extends IModelNodeItem<? extends IModelDefinition,? extends INamedInstance>>

java.lang.Object
dev.metaschema.core.metapath.item.node.AbstractNodeItem
dev.metaschema.core.metapath.item.node.AbstractInstanceNodeItem<D,I,P>
Type Parameters:
D - the Java type of the definition
I - the Java type of the instance
P - the Java type of the parent node item
All Implemented Interfaces:
IPathSegment, ICollectionValue, IItem, IDefinitionNodeItem<D,I>, INodeItem, INodeItemVisitable, IMetapathQueryable
Direct Known Subclasses:
AbstractFlagInstanceNodeItem

public abstract class AbstractInstanceNodeItem<D extends IDefinition,I extends INamedInstance,P extends IModelNodeItem<? extends IModelDefinition,? extends INamedInstance>> extends AbstractNodeItem implements IDefinitionNodeItem<D,I>
A base implementation of a node item backed by a Metaschema instance.
  • Constructor Details

    • AbstractInstanceNodeItem

      public AbstractInstanceNodeItem(@NonNull I instance, @NonNull P parent)
      Construct a new instance node item.
      Parameters:
      instance - the Metaschema instance this node represents
      parent - the parent node item containing this instance
  • Method Details

    • getDefinition

      public D getDefinition()
      Description copied from interface: IDefinitionNodeItem
      Get the Metaschema definition associated with this node.
      Specified by:
      getDefinition in interface IDefinitionNodeItem<D extends IDefinition,I extends INamedInstance>
      Returns:
      the definition
    • getInstance

      public I getInstance()
      Description copied from interface: IDefinitionNodeItem
      Retrieve the instance associated with this path segment.
      Specified by:
      getInstance in interface IDefinitionNodeItem<D extends IDefinition,I extends INamedInstance>
      Returns:
      the instance of the segment, or null if it doesn't have one
    • getParentNodeItem

      public P getParentNodeItem()
      Description copied from interface: INodeItem
      Retrieve the parent node item if it exists.
      Specified by:
      getParentNodeItem in interface INodeItem
      Returns:
      the parent node item, or null if this node item has no known parent
    • getParentContentNodeItem

      public P 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