Class AbstractNodeItem

java.lang.Object
dev.metaschema.core.metapath.item.node.AbstractNodeItem
All Implemented Interfaces:
IPathSegment, ICollectionValue, IItem, INodeItem, INodeItemVisitable, IMetapathQueryable
Direct Known Subclasses:
AbstractDefinitionNodeItem, AbstractInstanceNodeItem

public abstract class AbstractNodeItem extends Object implements INodeItem
A common base class for node item implementations.
  • Constructor Details

    • AbstractNodeItem

      public AbstractNodeItem()
  • Method Details

    • toSignature

      public final String toSignature()
      Generates a string signature for this node item in the format: type⪻location_metapath⪼ or type⪻location_metapath⪼(value) where:
      • type: The node type signature
      • location_metapath: A Metapath for the node's location in the document
      • value: Optional value signature if a value is present
      The special characters ⪻ and ⪼ are used as delimiters to clearly separate the type from the location Metapath expression.
      Specified by:
      toSignature in interface ICollectionValue
      Returns:
      the string signature of this node item
    • getValueSignature

      @Nullable protected abstract String getValueSignature()
      Get the signature of this node's value.
      Returns:
      the value's signature or null if the node has no value
    • toString

      public final String toString()
      Overrides:
      toString in class Object