Interface DataSchemaContext
- All Known Subinterfaces:
DataSchemaContext.Composite
,DataSchemaContext.PathMixin
,DataSchemaContext.SimpleValue
- All Known Implementing Classes:
AbstractCompositeContext
,AbstractContext
,AbstractPathMixinContext
,ContainerContext
,LeafContext
,LeafListItemContext
public sealed interface DataSchemaContext
permits AbstractContext, DataSchemaContext.Composite, DataSchemaContext.SimpleValue
Schema derived data providing necessary information for mapping between
NormalizedNode
and serialization format defined in RFC6020,
since the mapping is not one-to-one.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
ADataSchemaContext
containing otherDataSchemaContext
s.static interface
This node is aNormalizedNode
intermediate, not represented in RFC7950 XML encoding.static interface
Marker interface for contexts which boil down to a simple, not-structured value. -
Method Summary
Modifier and TypeMethodDescription@NonNull DataSchemaNode
default @NonNull YangInstanceIdentifier.NodeIdentifier
Return the fixedYangInstanceIdentifier
step.static @NonNull DataSchemaContext
of
(DataSchemaNode schema) Get aDataSchemaContext
for a particularDataSchemaNode
.@Nullable YangInstanceIdentifier.NodeIdentifier
pathStep()
Return the fixedYangInstanceIdentifier
step, if available.
-
Method Details
-
of
Get aDataSchemaContext
for a particularDataSchemaNode
.- Parameters:
schema
- Backing DataSchemaNode- Returns:
- A
DataSchemaContext
- Throws:
NullPointerException
- ifschema
isnull
IllegalStateException
- ifschema
is not handled
-
dataSchemaNode
@NonNull DataSchemaNode dataSchemaNode() -
pathStep
@Nullable YangInstanceIdentifier.NodeIdentifier pathStep()Return the fixedYangInstanceIdentifier
step, if available. This method returnsnull
for contexts likeMapEntryNode
andLeafSetEntryNode
, where the step depends on the actual node value.- Returns:
- A
YangInstanceIdentifier.NodeIdentifier
, ornull
-
getPathStep
Return the fixedYangInstanceIdentifier
step.- Returns:
- A
YangInstanceIdentifier.NodeIdentifier
- Throws:
UnsupportedOperationException
- if this node does not have fixed step
-