Class DataSchemaContextTree
java.lang.Object
org.opendaylight.yangtools.yang.data.util.DataSchemaContextTree
Semantic tree binding a
EffectiveModelContext
to a NormalizedNode
tree. Since the layout of the
schema and data has differences, the mapping is not trivial -- which is where this class comes in.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@Nullable DataSchemaContext
childByPath
(@NonNull YangInstanceIdentifier path) Find a child node as identified by an absoluteYangInstanceIdentifier
.@NonNull CheckedValue<@NonNull DataSchemaContextTree.NodeAndStack,
@NonNull IllegalArgumentException> Find a child node as identified by an absoluteYangInstanceIdentifier
and return it along with a suitably initializedSchemaInferenceStack
.@NonNull Optional<@NonNull DataSchemaContext>
findChild
(@NonNull YangInstanceIdentifier path) Find a child node as identified by an absoluteYangInstanceIdentifier
.static @NonNull DataSchemaContextTree
from
(@NonNull EffectiveModelContext ctx) @NonNull DataSchemaContext.Composite
getRoot()
@NonNull EffectiveModelContext
Return theEffectiveModelContext
used to derive this tree.
-
Method Details
-
from
-
modelContext
Return theEffectiveModelContext
used to derive this tree.- Returns:
- the
EffectiveModelContext
used to derive this tree
-
childByPath
Find a child node as identified by an absoluteYangInstanceIdentifier
.- Parameters:
path
- Path towards the child node- Returns:
- Child node if present, or
null
when corresponding child is not found. - Throws:
NullPointerException
- ifpath
isnull
-
findChild
public @NonNull Optional<@NonNull DataSchemaContext> findChild(@NonNull YangInstanceIdentifier path) Find a child node as identified by an absoluteYangInstanceIdentifier
.- Parameters:
path
- Path towards the child node- Returns:
- Child node if present, or empty when corresponding child is not found.
- Throws:
NullPointerException
- ifpath
isnull
-
enterPath
public @NonNull CheckedValue<@NonNull DataSchemaContextTree.NodeAndStack,@NonNull IllegalArgumentException> enterPath(YangInstanceIdentifier path) Find a child node as identified by an absoluteYangInstanceIdentifier
and return it along with a suitably initializedSchemaInferenceStack
.- Parameters:
path
- Path towards the child node- Returns:
- A
DataSchemaContextTree.NodeAndStack
, or empty when corresponding child is not found. - Throws:
NullPointerException
- ifpath
is null
-
getRoot
-