Class SchemaPath
- java.lang.Object
-
- org.opendaylight.yangtools.yang.model.api.SchemaPath
-
- All Implemented Interfaces:
Immutable
,MutationBehaviour<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:SchemaNodeIdentifier
for use in YANG schema addressing contextsEffectiveStatementInference
for use in contexts where the intent is to exchange pointer to a specific statement. Unlike SchemaPath, though, it does not require additional lookup in most cases
Represents unique path to the every node inside the module.
-
-
Field Summary
Fields Modifier and Type Field Description static @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.static @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 Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SchemaNodeIdentifier.Absolute
asAbsolute()
Deprecated, for removal: This API element is subject to removal in a future version.Return this path as anSchemaNodeIdentifier.Absolute
SchemaNodeIdentifier.SchemaNodeIdentifier.Descendant
asDescendant()
Deprecated, for removal: This API element is subject to removal in a future version.Return this path as anSchemaNodeIdentifier.Descendant
SchemaNodeIdentifier.SchemaNodeIdentifier
asSchemaNodeIdentifier()
Deprecated, for removal: This API element is subject to removal in a future version.Return this path as aSchemaNodeIdentifier
.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
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.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
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.boolean
equals(Object obj)
Deprecated, for removal: This API element is subject to removal in a future version.QName
getLastComponent()
Deprecated, for removal: This API element is subject to removal in a future version.Get the last component of this path.SchemaPath
getParent()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the immediate parent SchemaPath.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.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).int
hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.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.static @NonNull SchemaPath
of(SchemaNodeIdentifier path)
Deprecated, for removal: This API element is subject to removal in a future version.static @NonNull SchemaPath
of(SchemaNodeIdentifier.Absolute path)
Deprecated, for removal: This API element is subject to removal in a future version.static @NonNull SchemaPath
of(SchemaNodeIdentifier.Descendant path)
Deprecated, for removal: This API element is subject to removal in a future version.String
toString()
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
-
Field Detail
-
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 Detail
-
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 nodeabsolute
- 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 relativeelement
- 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 relativepath
- 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 aSchemaNodeIdentifier
.- 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 anSchemaNodeIdentifier.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 anSchemaNodeIdentifier.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.
-
equals
public boolean equals(Object obj)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-