Package org.opendaylight.yangtools.yang.data.api.schema
Definition of normalized YANG DOM Model. Normalized DOM Model brings more direct mapping between YANG Model, DOM
representation of data.
Normalized DOM Model
Node Types
-
NormalizedNode
- Base type representing a node in a tree structure; all nodes are derived from it, it contains a leaf identifier and a value.-
DataContainerNode
- Node which contains multiple leafs; it does not have a direct representation in the YANG syntax.-
ContainerNode
- Node, which represents a leaf which can occur only once per parent node; it contains multiple child leaves and maps to the container statement in YANG. -
MapEntryNode
- Node which represents a leaf, which can occur multiple times; a leave is uniquely identified by the value of its key. A MapEntryNode may contain multiple child leaves. MapEntryNode maps to the instance of list in YANG. -
UnkeyedListEntryNode
- Node which represents a leaf, which can occur multiple times; a leave is uniquely identified by the value of its key. A MapEntryNode may contain multiple child leaves. MapEntryNode maps to the instance of list in YANG. -
ChoiceNode
- Node which represents a leaf, which occurs mostly once per parent node, but possible values could have different types. Maps to choice statement. Types maps to the case statements for that choice. -
AugmentationNode
- Node which represents a leaf, which occurs mostly once per parent node.
-
-
LeafNode
- Node which represents a leaf, which occurs mostly once per parent node. Contains simple value. -
LeafSetEntryNode
- Node which represents a leaf, which type could occurs multiple times per parent node. Maps to to the instances of leaf-list in YANG. -
LeafSetNode
- Special node, which can occur only once per parent node; its leaves are LeafSetEntryNode nodes of specified type. Maps into the leaf-list in YANG. -
MapNode
- Special node, which can occur only once per parent node; its leaves are MapEntryNode nodes.-
OrderedMapNode
- Special node, which can occur only once per parent node; its leaves are MapEntryNode nodes.
-
-
UnkeyedListNode
- Special node, which can occur only once per parent node; its leaves are MapEntryNode nodes.
-
Tree / subtree structure
Grammar representation
YangInstanceIdentifier
=YangInstanceIdentifier.PathArgument
*YangInstanceIdentifier.PathArgument
=YangInstanceIdentifier.NodeIdentifier
|YangInstanceIdentifier.NodeIdentifierWithPredicates
|YangInstanceIdentifier.NodeWithValue
|YangInstanceIdentifier.AugmentationIdentifier
TreeRoot =DataContainerNode
DataContainerNode
= (LeafNode
|ChoiceNode
|AugmentationNode
|MapNode
|LeafSetNode
)* ContainerDataNode =YangInstanceIdentifier.NodeIdentifier
DataContainerNode
LeafNode
=YangInstanceIdentifier.NodeIdentifier
SimpleValueAugmentationNode
=YangInstanceIdentifier.AugmentationIdentifier
DataContainerNode
MapNode
=YangInstanceIdentifier.NodeIdentifier
MapEntryNode
MapEntryNode
=YangInstanceIdentifier.NodeIdentifierWithPredicates
DataContainerNode
// Special nodesLeafSetNode
=YangInstanceIdentifier.NodeIdentifier
LeafSetEntryNode
*ChoiceNode
=YangInstanceIdentifier.NodeIdentifier
DataContainerNode
LeafSetEntryNode
=YangInstanceIdentifier.NodeWithValue
SimpleValue
The resulting tree organization is following:
- (DataContainerNode)
- (0..n) LeafNode
- (0..n) LeafSetNode
- (0..n) LeafSetEntryNode
- (0..n) ContainerNode
- (Same as DataContainerNode)
- (0..n) ContainerNode
- (Same as DataContainerNode)
- (0..n) MapNode
- (0..n) MapEntryNode
- (Same as DataContainerNode)
- (0..n) MapEntryNode
- (0..n) AugmentationNode
- (Same as DataContainerNode)
Ordering of child nodes
Ordering of child nodes is not enforced by this API definition, unless explicitly stated by subclasses ofOrderedNodeContainer
which marks nodes with semantic constrain to preserve user-supplied ordering.
Clients should not expect any specific ordering of child nodes for interfaces
from this package which does not extend
OrderedNodeContainer
,
since implementations are not required to have well-defined order, which
allows for more efficient implementations. If such ordering is required by
clients for serialization / debugability it SHOULD be done externally in
code using these interfaces.
-
Interface Summary Interface Description AnydataNode<V> A NormalizedNode holding the contents of ananydata
node in some object model.AnyxmlNode<V> A NormalizedNode holding the contents of ananyxml
node in some object model.AugmentationNode Data instance ofaugment
associated with parent node.ChoiceNode Node representing data instance ofchoice
.ContainerNode Data subtree with cardinality 0..1 in the context of parent node.DataContainerChild<K extends YangInstanceIdentifier.PathArgument,V> Marker interface for direct children ofDataContainerNode
.DataContainerNode<K extends YangInstanceIdentifier.PathArgument> Abstract node which does not have value but contains validDataContainerChild
nodes.DOMSourceAnyxmlNode An AnyxmlNode with data inDOMSource
format.ForeignDataNode<K extends YangInstanceIdentifier.PathArgument,V> A NormalizedNode holding a value in some foreign object model.LeafNode<T> Leaf node with multiplicity 0..1.LeafSetEntryNode<T> Leaf node with multiplicity 0...n.LeafSetNode<T> Node representing set of simple leaf nodes.MapEntryNode Instance of Map entry, this node does not contains value, but child nodes.MapNode Containment node, which containsMapEntryNode
of the same type, which may be quickly retrieved using key.MixinNode Marker interface for nodes, which are mixins - their content belongs to parent node and in serialized form this node does not exists, but it's children are present.NormalizableAnydata Ananydata value object model
which can be normalized toNormalizedAnydata
when provided with proper context.NormalizedAnydata The contents of ananydata
node in a normalized format.NormalizedNode<K extends YangInstanceIdentifier.PathArgument,V> Node which is normalized according to the YANG schema is identifiable by aYangInstanceIdentifier
.NormalizedNodeContainer<I extends YangInstanceIdentifier.PathArgument,K extends YangInstanceIdentifier.PathArgument,V extends NormalizedNode<? extends K,?>> Node which is not leaf, but has childNormalizedNode
s as its value.OrderedLeafSetNode<T> Leaf set node which preserves user-supplied ordering.OrderedMapNode Map node which preserves user-supplied ordering.OrderedNodeContainer<V extends NormalizedNode<?,?>> Normalized Node container which preserves user supplied ordering and allows addressing of child elements by position.UnkeyedListEntryNode List entry node, which does not have value, but child nodes.UnkeyedListNode Containment node, which containsUnkeyedListEntryNode
of the same type, which may be quickly retrieved using key.ValueNode<K extends YangInstanceIdentifier.PathArgument,V> Interface holding the common trait ofLeafSetEntryNode
andLeafNode
, which both hold a value.YangModeledAnyXmlNode AnyXML node with schema of contained XML data. -
Class Summary Class Description DuplicateEntry Entry describing a duplicate found in aNormalizedNode
tree.NormalizedNodes A set of utility methods for interacting withNormalizedNode
objects. -
Exception Summary Exception Description AnydataNormalizationException