Class SchemaPath

    • Field Detail

      • ROOT

        public static final @NonNull SchemaPath ROOT
        Shared instance of the conceptual root schema node.
      • SAME

        public static final @NonNull SchemaPath SAME
        Shared instance of the "same" relative schema node.
    • Method Detail

      • create

        public static @NonNull SchemaPath 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 SchemaPath instance.
      • create

        public static @NonNull SchemaPath create​(boolean absolute,
                                                 QName element)
        Constructs new instance of this class with the concrete path.
        Parameters:
        absolute - boolean value which specifies if the path is absolute or relative
        element - a single QName which specifies exact path to the module node
        Returns:
        A SchemaPath instance.
      • create

        public static @NonNull SchemaPath 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 @NonNull SchemaPath 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 @NonNull SchemaPath createChild​(SchemaPath 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 @NonNull SchemaPath createChild​(QName element)
        Create a child path based on concatenation of this path and an additional path element.
        Parameters:
        element - Relative SchemaPath elements
        Returns:
        A new child path
      • createChild

        public @NonNull SchemaPath 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 List<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 SchemaPath 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.
      • isAbsolute

        public abstract boolean isAbsolute()
        Describes whether schema path 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