Class SchemaNodeIdentifier

    • Method Detail

      • create

        public static SchemaNodeIdentifier create​(Iterable<QName> path,
                                                  boolean absolute)
        Constructs new instance of this class with the concrete path.
        Parameters:
        path - list of QName instances which specifies exact path to the module node
        absolute - boolean value which specifies if the path is absolute or relative
        Returns:
        A SchemaNodeIdentifier instance.
      • create

        public static SchemaNodeIdentifier create​(boolean absolute,
                                                  QName... path)
        Constructs new instance of this class with the concrete path.
        Parameters:
        absolute - boolean value which specifies if the path is absolute or relative
        path - one or more QName instances which specifies exact path to the module node
        Returns:
        A SchemaPath instance.
      • createChild

        public SchemaNodeIdentifier createChild​(Iterable<QName> relative)
        Create a child path based on concatenation of this path and a relative path.
        Parameters:
        relative - Relative path
        Returns:
        A new child path
      • createChild

        public SchemaNodeIdentifier createChild​(SchemaNodeIdentifier relative)
        Create a child path based on concatenation of this path and a relative path.
        Parameters:
        relative - Relative SchemaPath
        Returns:
        A new child path
      • createChild

        public abstract SchemaNodeIdentifier createChild​(QName element)
        Create a child path based on concatenation of this path and an additional path element.
        Parameters:
        element - Next SchemaPath element
        Returns:
        A new child path
      • createChild

        public SchemaNodeIdentifier createChild​(QName... elements)
        Create a child path based on concatenation of this path and additional path elements.
        Parameters:
        elements - Relative SchemaPath elements
        Returns:
        A new child path
      • getPathFromRoot

        public Iterable<QName> getPathFromRoot()
        Returns the list of nodes which need to be traversed to get from the starting point (root for absolute SchemaPaths) to the node represented by this object.
        Returns:
        list of qname instances which represents path from the root to the schema node.
      • getPathTowardsRoot

        public Iterable<QName> getPathTowardsRoot()
        Returns the list of nodes which need to be traversed to get from this node to the starting point (root for absolute SchemaPaths).
        Returns:
        list of qname instances which represents path from the schema node towards the root.
      • getParent

        public SchemaNodeIdentifier getParent()
        Returns the immediate parent SchemaPath.
        Returns:
        Parent path, null if this SchemaPath is already toplevel.
      • getLastComponent

        public final QName getLastComponent()
        Get the last component of this path.
        Returns:
        The last component of this path.
      • asSchemaPath

        public final SchemaPath asSchemaPath()
        Create the SchemaPath equivalent of this identifier.
        Returns:
        SchemaPath equivalent.
      • isAbsolute

        public abstract boolean isAbsolute()
        Describes whether schema node identifier is|isn't absolute.
        Returns:
        boolean value which is true if schema path is absolute.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object