Class SchemaPath

java.lang.Object
org.opendaylight.yangtools.yang.model.api.SchemaPath
All Implemented Interfaces:
Immutable

@Deprecated(since="7.0.8", forRemoval=true) public abstract class SchemaPath extends Object implements Immutable
Deprecated, for removal: This API element is subject to removal in a future version.
This path is not really unique, as it does not handle YANG namespace overlap correctly. There are two different replacements for this class: This class is scheduled for removal in the next major release.
Represents unique path to the every node inside the module.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final @NonNull SchemaPath
    Deprecated, for removal: This API element is subject to removal in a future version.
    Shared instance of the conceptual root schema node.
    static final @NonNull SchemaPath
    Deprecated, for removal: This API element is subject to removal in a future version.
    Shared instance of the "same" relative schema node.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return this path as an SchemaNodeIdentifier.Absolute SchemaNodeIdentifier.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return this path as an SchemaNodeIdentifier.Descendant SchemaNodeIdentifier.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return this path as a SchemaNodeIdentifier.
    static @NonNull SchemaPath
    create(boolean absolute, QName element)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs new instance of this class with the concrete path.
    static @NonNull SchemaPath
    create(boolean absolute, QName... path)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs new instance of this class with the concrete path.
    static @NonNull SchemaPath
    create(Iterable<QName> path, boolean absolute)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs new instance of this class with the concrete path.
    @NonNull SchemaPath
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a child path based on concatenation of this path and a relative path.
    abstract @NonNull SchemaPath
    createChild(QName element)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a child path based on concatenation of this path and an additional path element.
    @NonNull SchemaPath
    createChild(QName... elements)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a child path based on concatenation of this path and additional path elements.
    @NonNull SchemaPath
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a child path based on concatenation of this path and a relative path.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    final QName
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the last component of this path.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the immediate parent SchemaPath.
    Deprecated, for removal: This API element is subject to removal in a future version.
    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.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the list of nodes which need to be traversed to get from this node to the starting point (root for absolute SchemaPaths).
    final int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    abstract boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Describes whether schema path is|isn't absolute.
    static @NonNull SchemaPath
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static @NonNull SchemaPath
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static @NonNull SchemaPath
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • ROOT

      public static final @NonNull SchemaPath ROOT
      Deprecated, for removal: This API element is subject to removal in a future version.
      Shared instance of the conceptual root schema node.
    • SAME

      public static final @NonNull SchemaPath SAME
      Deprecated, for removal: This API element is subject to removal in a future version.
      Shared instance of the "same" relative schema node.
  • Method Details

    • of

      public static @NonNull SchemaPath of(SchemaNodeIdentifier path)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • of

      public static @NonNull SchemaPath of(SchemaNodeIdentifier.Absolute path)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • of

      public static @NonNull SchemaPath of(SchemaNodeIdentifier.Descendant path)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • create

      public static @NonNull SchemaPath create(Iterable<QName> path, boolean absolute)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the immediate parent SchemaPath.
      Returns:
      Parent path, null if this SchemaPath is already toplevel.
    • getLastComponent

      public final QName getLastComponent()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the last component of this path.
      Returns:
      The last component of this path.
    • isAbsolute

      public abstract boolean isAbsolute()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Describes whether schema path is|isn't absolute.
      Returns:
      boolean value which is true if schema path is absolute.
    • asSchemaNodeIdentifier

      public final SchemaNodeIdentifier asSchemaNodeIdentifier()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return this path as a SchemaNodeIdentifier.
      Returns:
      A SchemaNodeIdentifier.
      Throws:
      IllegalStateException - if this path is empty
    • asAbsolute

      public final SchemaNodeIdentifier.Absolute asAbsolute()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return this path as an SchemaNodeIdentifier.Absolute SchemaNodeIdentifier.
      Returns:
      An SchemaNodeIdentifier.
      Throws:
      IllegalStateException - if this path is empty or is not absolute.
    • asDescendant

      public final SchemaNodeIdentifier.Descendant asDescendant()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return this path as an SchemaNodeIdentifier.Descendant SchemaNodeIdentifier.
      Returns:
      An SchemaNodeIdentifier.
      Throws:
      IllegalStateException - if this path is empty or is not relative.
    • hashCode

      public final int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      equals in class Object
    • toString

      public final String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object