Class DataSchemaContextNode<T extends YangInstanceIdentifier.PathArgument>
- java.lang.Object
-
- org.opendaylight.yangtools.concepts.AbstractIdentifiable<T,T>
-
- org.opendaylight.yangtools.concepts.AbstractSimpleIdentifiable<T>
-
- org.opendaylight.yangtools.yang.data.util.DataSchemaContextNode<T>
-
- Type Parameters:
T
- Path Argument type
- All Implemented Interfaces:
Identifiable<T>
public abstract class DataSchemaContextNode<T extends YangInstanceIdentifier.PathArgument> extends AbstractSimpleIdentifiable<T>
Schema derived data providing necessary information for mapping betweenNormalizedNode
and serialization format defined in RFC6020, since the mapping is not one-to-one.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DataSchemaContextNode(T identifier, SchemaNode schema)
-
Method Summary
-
Methods inherited from class org.opendaylight.yangtools.concepts.AbstractIdentifiable
addToStringAttributes, getIdentifier, toString
-
-
-
-
Constructor Detail
-
DataSchemaContextNode
protected DataSchemaContextNode(T identifier, SchemaNode schema)
-
-
Method Detail
-
isMixin
public boolean isMixin()
-
isKeyedEntry
public boolean isKeyedEntry()
-
isLeaf
public abstract boolean isLeaf()
-
getChild
public abstract @Nullable DataSchemaContextNode<?> getChild(YangInstanceIdentifier.PathArgument child)
Find a child node identifier by itsYangInstanceIdentifier.PathArgument
.- Parameters:
child
- Child path argument- Returns:
- A child node, or null if not found
-
getChild
public abstract @Nullable DataSchemaContextNode<?> getChild(QName child)
-
getDataSchemaNode
public @Nullable DataSchemaNode getDataSchemaNode()
-
findChild
public final @NonNull Optional<@NonNull DataSchemaContextNode<?>> findChild(@NonNull YangInstanceIdentifier path)
Find a child node as identified by aYangInstanceIdentifier
relative to this node.- Parameters:
path
- Path towards the child node- Returns:
- Child node if present, or empty when corresponding child is not found.
- Throws:
NullPointerException
- ifpath
is null
-
augmentationIdentifierFrom
public static YangInstanceIdentifier.AugmentationIdentifier augmentationIdentifierFrom(AugmentationSchemaNode schema)
Create AugmentationIdentifier from an AugmentationSchemaNode.- Parameters:
schema
- Augmentation schema- Returns:
- AugmentationIdentifier for the schema
- Throws:
NullPointerException
- ifschema
is null
-
fromDataSchemaNode
public static @Nullable DataSchemaContextNode<?> fromDataSchemaNode(DataSchemaNode potential)
-
from
public static DataSchemaContextNode<?> from(EffectiveModelContext ctx)
-
-