API Clarity: Documented o.o.y.yang.data.api and o.o.y.yang.data.api.schema packages. 24/7824/6
authorTony Tkacik <ttkacik@cisco.com>
Mon, 9 Jun 2014 08:21:09 +0000 (10:21 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Mon, 9 Jun 2014 13:02:10 +0000 (15:02 +0200)
Fully documented o.o.y.yang.data.api.schema package
Partially documented o.o.y.yang.data.api package

Change-Id: Id2721050abee5120165485dec4b38348f37609b1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
22 files changed:
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/AttributesContainer.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/InstanceIdentifier.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/Node.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/codec/InstanceIdentifierCodec.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/AugmentationNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/ChoiceNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/ContainerNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/DataContainerChild.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/DataContainerNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafSetEntryNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/LeafSetNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/MapEntryNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/MapNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/NormalizedNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/NormalizedNodeContainer.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/OrderedLeafSetNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/OrderedMapNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/OrderedNodeContainer.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/UnkeyedListEntryNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/UnkeyedListNode.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/package-info.java [new file with mode: 0644]

index 9146315c47925353413ab4e7e7bb7fdf1b99a567..5554efe66c60bf1a23d43ad59d1b15161648a915 100644 (file)
@@ -11,10 +11,27 @@ import java.util.Map;
 
 import org.opendaylight.yangtools.yang.common.QName;
 
+/**
+ * 
+ * Container of attributes, which may be attached to {@link Node}
+ * 
+ */
 public interface AttributesContainer {
 
+    /**
+     * Returns immutable map of QName and value of the attribute.
+     * 
+     * @return immutable map of attribute names and values.
+     */
     Map<QName, String> getAttributes();
 
-    Object getAttributeValue(QName value);
+    /**
+     * Returns attribute value by supplied QName
+     * 
+     * 
+     * @param name Attribute name
+     * @return Value of attribute if present, null otherwise.
+     */
+    Object getAttributeValue(QName name);
 
 }
index c3af9052ec1917f5032a32a39067256ed3a547c2..7b2c36d8b8189d9cf388ff9784179e78b9560868 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -20,11 +19,7 @@ import org.opendaylight.yangtools.concepts.Builder;
 import org.opendaylight.yangtools.concepts.Immutable;
 import org.opendaylight.yangtools.concepts.Path;
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode;
-import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
-import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
 import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode;
-import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
 
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
@@ -32,6 +27,41 @@ import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 
+/**
+ * Unique identifier of a partical node instance in the data tree.
+ *
+ *
+ * <p>
+ * Java representation of YANG Built-in type <code>instance-identifier</code>,
+ * which conceptually is XPath expression minimised to uniquely identify element
+ * in data tree which conforms to constraints maintained by YANG Model,
+ * effectively this makes Instance Identifier a path to element in data tree.
+ * <p>
+ * Constraints put in YANG specification on instance-identifier allowed it to be
+ * effectively represented in Java and it's evaluation does not require
+ * full-blown XPath processor.
+ * <p>
+ * <h3>Path Arguments</h3>
+ * Path to the node represented in instance identifier consists of
+ * {@link PathArgument} which carries necessary information to uniquely identify
+ * node on particular level in the subtree.
+ * <p>
+ * <ul>
+ * <li>{@link NodeIdentifier} - Identifier of node, which has cardinality
+ * <code>0..1</code> in particular subtree in data tree.</li>
+ * <li>{@link NodeIdentifierWithPredicates} - Identifier of node (list item),
+ * which has cardinality <code>0..n</code>.</li>
+ * <li>{@link NodeWithValue} - Identifier of instance <code>leaf</code> node or
+ * <code>leaf-list</code> node.</li>
+ * <li>{@link AugmentationIdentifier} - Identifier of instance of
+ * <code>augmentation</code> node.</li>
+ * </ul>
+ *
+ *
+ * @see http://tools.ietf.org/html/rfc6020#section-9.13
+ *
+ *
+ */
 public class InstanceIdentifier implements Path<InstanceIdentifier>, Immutable, Serializable {
 
     private static final long serialVersionUID = 8467409862384206193L;
@@ -40,35 +70,67 @@ public class InstanceIdentifier implements Path<InstanceIdentifier>, Immutable,
     private transient String toStringCache = null;
     private transient Integer hashCodeCache = null;
 
+    /**
+     *
+     * Returns a list of path arguments.
+     *
+     * @deprecated Use {@link #getPathArguments()} instead.
+     * @return Immutable list of path arguments.
+     */
+    @Deprecated
     public List<PathArgument> getPath() {
         return path;
     }
 
+    /**
+     *
+     * Returns a ordered iteration of path arguments.
+     *
+     * @return Immutable iteration of path arguments.
+     */
+    public Iterable<PathArgument> getPathArguments() {
+        return path;
+    }
+
+    /**
+     *
+     *
+     * @deprecated Use {@link #create(Iterable)} instead.
+     * @param path
+     */
+    @Deprecated
     public InstanceIdentifier(final List<? extends PathArgument> path) {
         this.path = ImmutableList.copyOf(path);
     }
 
+    private InstanceIdentifier(final Iterable<? extends PathArgument> path) {
+        Preconditions.checkNotNull(path, "path must not be null.");
+        this.path = ImmutableList.copyOf(path);
+    }
+
     private InstanceIdentifier(final NodeIdentifier nodeIdentifier) {
         this.path = ImmutableList.<PathArgument> of(nodeIdentifier);
     }
 
+    public static final InstanceIdentifier create(final Iterable<? extends PathArgument> path) {
+        return new InstanceIdentifier(path);
+    }
+
     @Override
     public int hashCode() {
         /*
          * The hashCodeCache is safe, since the object contract requires
          * immutability of the object and all objects referenced from this
          * object.
-         *
          * Used lists, maps are immutable. Path Arguments (elements) are also
          * immutable, since the PathArgument contract requires immutability.
-         *
          * The cache is thread-safe - if multiple computations occurs at the
          * same time, cache will be overwritten with same result.
          */
         if (hashCodeCache == null) {
             final int prime = 31;
             int result = 1;
-            result = prime * result + ((path == null) ? 0 : path.hashCode());
+            result = prime * result + path.hashCode();
             hashCodeCache = result;
         }
         return hashCodeCache;
@@ -99,20 +161,37 @@ public class InstanceIdentifier implements Path<InstanceIdentifier>, Immutable,
         return true;
     }
 
+    /**
+     *
+     * Constructs a new Instance Identifier with new {@link NodeIdentifier} added to the end of path arguments
+     *
+     * @param name QName of {@link NodeIdentifier}
+     * @return Instance Identifier with additional path argument added to the end.
+     */
     public InstanceIdentifier node(final QName name) {
         return node(new NodeIdentifier(name));
     }
 
+    /**
+     *
+     * Constructs a new Instance Identifier with new {@link PathArgument} added to the end of path arguments
+     *
+     * @param arg Path argument which should be added to the end
+     * @return Instance Identifier with additional path argument added to the end.
+     */
     public InstanceIdentifier node(final PathArgument arg) {
-        return new InstanceIdentifier(ImmutableList.<PathArgument>builder().addAll(path).add(arg).build());
+        return create(ImmutableList.<PathArgument> builder().addAll(path).add(arg).build());
     }
 
     /**
-     * Get the relative path from an ancestor. This method attempts to perform the reverse
+     * Get the relative path from an ancestor. This method attempts to perform
+     * the reverse
      * of concatenating a base (ancestor) and a path.
      *
-     * @param ancestor Ancestor against which the relative path should be calculated
-     * @return This object's relative path from parent, or Optional.absent() if the
+     * @param ancestor
+     *            Ancestor against which the relative path should be calculated
+     * @return This object's relative path from parent, or Optional.absent() if
+     *         the
      *         specified parent is not in fact an ancestor of this object.
      */
     public Optional<InstanceIdentifier> relativeTo(final InstanceIdentifier ancestor) {
@@ -124,46 +203,96 @@ public class InstanceIdentifier implements Path<InstanceIdentifier>, Immutable,
         }
     }
 
-    static int hashCode( Object value ) {
-        if( value == null ) {
+    static int hashCode(final Object value) {
+        if (value == null) {
             return 0;
         }
 
-        if( value.getClass().equals( byte[].class ) ) {
-            return Arrays.hashCode( (byte[])value );
+        if (value.getClass().equals(byte[].class)) {
+            return Arrays.hashCode((byte[]) value);
         }
 
-        if( value.getClass().isArray() ) {
+        if (value.getClass().isArray()) {
             int hash = 0;
-            int length = Array.getLength( value );
-            for( int i = 0; i < length; i++ ) {
-                hash += Objects.hashCode( Array.get( value, i ) );
+            int length = Array.getLength(value);
+            for (int i = 0; i < length; i++) {
+                hash += Objects.hashCode(Array.get(value, i));
             }
 
             return hash;
         }
 
-        return Objects.hashCode( value );
+        return Objects.hashCode(value);
     }
 
     // Static factories & helpers
 
+    /**
+     *
+     * Returns a new InstanceIdentifier with only one path argument of type {@link NodeIdentifier} with supplied QName
+     *
+     * @param name QName of first node identifier
+     * @return Instance Identifier with only one path argument of type {@link NodeIdentifier}
+     */
     public static InstanceIdentifier of(final QName name) {
         return new InstanceIdentifier(new NodeIdentifier(name));
     }
 
+    /**
+     *
+     * Returns new builder for InstanceIdentifier with empty path arguments.
+     *
+     * @return new builder for InstanceIdentifier with empty path arguments.
+     */
     static public InstanceIdentifierBuilder builder() {
         return new BuilderImpl();
     }
 
+    /**
+    *
+    * Returns new builder for InstanceIdentifier with path arguments copied from original instance identifier.
+    *
+    * @param origin Instace Identifier from which path arguments are copied.
+    * @return new builder for InstanceIdentifier with path arguments copied from original instance identifier.
+    */
     static public InstanceIdentifierBuilder builder(final InstanceIdentifier origin) {
         return new BuilderImpl(origin.getPath());
     }
-
+   /**
+    *
+    * Returns new builder for InstanceIdentifier with first path argument set to {@link NodeIdentifier}.
+    *
+    * @param node QName of first {@link NodeIdentifier} path argument.
+    * @return  new builder for InstanceIdentifier with first path argument set to {@link NodeIdentifier}.
+    */
     public static InstanceIdentifierBuilder builder(final QName node) {
         return builder().node(node);
     }
 
+    /**
+     *
+     * Path argument / component of InstanceIdentifier
+     *
+     * Path argument uniquelly identifies node in data tree on particular
+     * level.
+     * <p>
+     * This interface itself is used as common parent for actual
+     * path arguments types and should not be implemented by user code.
+     * <p>
+     * Path arguments SHOULD contain only minimum of information
+     * required to uniquely identify node on particular subtree level.
+     *
+     * For actual path arguments types see:
+     * <ul>
+     * <li>{@link NodeIdentifier} - Identifier of container or leaf
+     * <li>{@link NodeIdentifierWithPredicates} - Identifier of list entries, which have key defined
+     * <li>{@link AugmentationIdentifier} - Identifier of augmentation
+     * <li>{@link NodeWithValue} - Identifier of leaf-list entry
+     * </ul>
+     *
+     *
+     *
+     */
     public interface PathArgument extends Immutable, Serializable {
 
         /**
@@ -179,22 +308,66 @@ public class InstanceIdentifier implements Path<InstanceIdentifier>, Immutable,
 
     }
 
+    /**
+     *
+     * Fluent Builder of Instance Identifier instances
+     *
+     * @
+     *
+     */
     public interface InstanceIdentifierBuilder extends Builder<InstanceIdentifier> {
+
+        /**
+         *
+         * Adds {@link NodeIdentifier} with supplied QName to path arguments of resulting instance identifier.
+         *
+         * @param nodeType QName of {@link NodeIdentifier} which will be added
+         * @return this builder
+         */
         InstanceIdentifierBuilder node(QName nodeType);
 
+        /**
+         *
+         * Adds {@link NodeIdentifierWithPredicates} with supplied QName and key values to path arguments of resulting instance identifier.
+         *
+         * @param nodeType QName of {@link NodeIdentifierWithPredicates} which will be added
+         * @param keyValues Map of key components and their respective values for {@link NodeIdentifierWithPredicates}
+         * @return this builder
+         */
         InstanceIdentifierBuilder nodeWithKey(QName nodeType, Map<QName, Object> keyValues);
 
+        /**
+         *
+         * Adds {@link NodeIdentifierWithPredicates} with supplied QName and key, value.
+         *
+         * @param nodeType QName of {@link NodeIdentifierWithPredicates} which will be added
+         * @param key QName of key which will be added
+         * @param value value of key which will be added
+         * @return this builder
+         */
         InstanceIdentifierBuilder nodeWithKey(QName nodeType, QName key, Object value);
 
+        /**
+         *
+         * @return
+         * @deprecated use {@link #build()}
+         *
+         */
         @Deprecated
         InstanceIdentifier getIdentifier();
 
+        /**
+         *
+         * Builds an {@link InstanceIdentifier} with path arguments from this builder
+         *
+         * @return {@link InstanceIdentifier}
+         */
         InstanceIdentifier build();
     }
 
     /**
-     * Simple path argument identifying a {@link ContainerNode} or {@link LeafNode} leaf
-     * overall data tree.
+     * Simple path argument identifying a {@link org.opendaylight.yangtools.yang.data.api.schema.ContainerNode} or
+     * {@link org.opendaylight.yangtools.yang.data.api.schema.LeafNode} leaf in particular subtree.
      */
     public static final class NodeIdentifier implements PathArgument, Comparable<NodeIdentifier> {
         private static final long serialVersionUID = -2255888212390871347L;
@@ -238,7 +411,7 @@ public class InstanceIdentifier implements Path<InstanceIdentifier>, Immutable,
     }
 
     /**
-     * Composite path argument identifying a {@link MapEntryNode} leaf
+     * Composite path argument identifying a {@link org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode} leaf
      * overall data tree.
      */
     public static final class NodeIdentifierWithPredicates implements PathArgument {
@@ -253,7 +426,7 @@ public class InstanceIdentifier implements Path<InstanceIdentifier>, Immutable,
         }
 
         public NodeIdentifierWithPredicates(final QName node, final QName key, final Object value) {
-            this( node, ImmutableMap.of(key, value) );
+            this(node, ImmutableMap.of(key, value));
         }
 
         @Override
@@ -276,8 +449,8 @@ public class InstanceIdentifier implements Path<InstanceIdentifier>, Immutable,
 
         private int hashKeyValues() {
             int hash = 0;
-            for( Entry<QName,Object> entry: keyValues.entrySet() ) {
-                hash += Objects.hashCode( entry.getKey() ) + InstanceIdentifier.hashCode( entry.getValue() );
+            for (Entry<QName, Object> entry : keyValues.entrySet()) {
+                hash += Objects.hashCode(entry.getKey()) + InstanceIdentifier.hashCode(entry.getValue());
             }
 
             return hash;
@@ -312,15 +485,15 @@ public class InstanceIdentifier implements Path<InstanceIdentifier>, Immutable,
             return true;
         }
 
-        private boolean keyValuesEquals( Map<QName, Object> otherKeyValues ) {
-            if( otherKeyValues == null || keyValues.size() != otherKeyValues.size() ) {
+        private boolean keyValuesEquals(final Map<QName, Object> otherKeyValues) {
+            if (otherKeyValues == null || keyValues.size() != otherKeyValues.size()) {
                 return false;
             }
 
             boolean result = true;
-            for( Entry<QName,Object> entry: keyValues.entrySet() ) {
-                if( !otherKeyValues.containsKey( entry.getKey() ) ||
-                    !Objects.deepEquals( entry.getValue(), otherKeyValues.get( entry.getKey() ) ) ) {
+            for (Entry<QName, Object> entry : keyValues.entrySet()) {
+                if (!otherKeyValues.containsKey(entry.getKey())
+                        || !Objects.deepEquals(entry.getValue(), otherKeyValues.get(entry.getKey()))) {
 
                     result = false;
                     break;
@@ -364,7 +537,7 @@ public class InstanceIdentifier implements Path<InstanceIdentifier>, Immutable,
         public int hashCode() {
             final int prime = 31;
             int result = 1;
-            result = prime * result + ((value == null) ? 0 : InstanceIdentifier.hashCode( value ) );
+            result = prime * result + ((value == null) ? 0 : InstanceIdentifier.hashCode(value));
             result = prime * result + ((nodeType == null) ? 0 : nodeType.hashCode());
             return result;
         }
@@ -392,8 +565,18 @@ public class InstanceIdentifier implements Path<InstanceIdentifier>, Immutable,
     }
 
     /**
-     * Composite path argument identifying a {@link AugmentationNode} leaf
-     * overall data tree.
+     * Composite path argument identifying a {@link org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode} node in
+     * particular subtree.
+     *
+     * Augmentation is uniquely identified by set of all possible child nodes.
+     * This is possible
+     * to identify instance of augmentation,
+     * since RFC6020 states that <code>augment</code> that augment
+     * statement must not add multiple nodes from same namespace
+     * / module to the target node.
+     *
+     *
+     * @see http://tools.ietf.org/html/rfc6020#section-7.15
      */
     public static final class AugmentationIdentifier implements PathArgument {
         private static final long serialVersionUID = -8122335594681936939L;
@@ -405,18 +588,36 @@ public class InstanceIdentifier implements Path<InstanceIdentifier>, Immutable,
             throw new UnsupportedOperationException("Augmentation node has no QName");
         }
 
+        /**
+         *
+         * Construct new augmentation identifier using supplied set of possible
+         * child nodes
+         *
+         * @param childNames
+         *            Set of possible child nodes.
+         */
         public AugmentationIdentifier(final Set<QName> childNames) {
             this.childNames = ImmutableSet.copyOf(childNames);
         }
 
         /**
          * Augmentation node has no QName
+         *
+         * @deprecated Use
+         *             {@link AugmentationIdentifier#AugmentationIdentifier(Set)}
+         *             instead.
          */
         @Deprecated
         public AugmentationIdentifier(final QName nodeType, final Set<QName> childNames) {
             this(childNames);
         }
 
+        /**
+         *
+         * Returns set of all possible child nodes
+         *
+         * @return set of all possible child nodes.
+         */
         public Set<QName> getPossibleChildNames() {
             return childNames;
         }
@@ -526,10 +727,8 @@ public class InstanceIdentifier implements Path<InstanceIdentifier>, Immutable,
          * The toStringCache is safe, since the object contract requires
          * immutability of the object and all objects referenced from this
          * object.
-         *
          * Used lists, maps are immutable. Path Arguments (elements) are also
          * immutable, since the PathArgument contract requires immutability.
-         *
          * The cache is thread-safe - if multiple computations occurs at the
          * same time, cache will be overwritten with same result.
          */
index 6032b0dfe6534aab9823c9c7c1bee10905ddb7a1..9057b747d31d62ceebfd207ff95379bf81b75c16 100644 (file)
@@ -31,6 +31,8 @@ public interface Node<T> extends Entry<QName, T> {
      * Returns parent node
      *
      * @return parent node
+     * @deprecated Unused, Deprecated because  reference to parent disallows of sharing one instance
+     *   in multiple trees / subtress.
      */
     @Deprecated
     CompositeNode getParent();
index f7c7d5c3355cab9c377b0f9e3c8f159a99c9250a..9a98405705ecb6d8ce7b093db5de670b81cf744d 100644 (file)
@@ -9,7 +9,12 @@ package org.opendaylight.yangtools.yang.data.api.codec;
 
 import org.opendaylight.yangtools.concepts.Codec;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
-
+/**
+ *
+ * Codec which serializes / deserializes InstanceIdentifier
+ *
+ * @param <T> Target type
+ */
 public interface InstanceIdentifierCodec<T>  extends Codec<T,InstanceIdentifier> {
     @Override
     T serialize(InstanceIdentifier data);
index 1653b5705e0f0fa14638e1716b410269c6fdfd45..fa7a03fa5698ae4fa1c5902a7aafa26ef2af72ec 100644 (file)
@@ -10,12 +10,16 @@ package org.opendaylight.yangtools.yang.data.api.schema;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.AugmentationIdentifier;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
+import org.opendaylight.yangtools.yang.model.api.AugmentationSchema;
 
-import com.google.common.base.Optional;
 
 /**
  *
- * Node representing Augmentation.
+ * Data instance of <code>augment</code> assiociated with parent node.
+ * 
+ * Augmentation is addition of subtree defined by other external YANG Model and
+ * is schema for subtree is described by instance of  {@link AugmentationSchema}
+ * associated with parent node of this node.
  *
  * Augmentation node MUST NOT be direct child of other augmentation node.
  *
@@ -25,12 +29,21 @@ public interface AugmentationNode extends //
     DataContainerNode<AugmentationIdentifier>,
     DataContainerChild<InstanceIdentifier.AugmentationIdentifier, Iterable<DataContainerChild<? extends PathArgument, ?>>> {
 
+    /**
+     * Gets identifier of augmentation node
+     * 
+     * Returned identifier of augmentation node contains all possible 
+     * direct child QNames.
+     * 
+     * This is sufficient to identify instance of augmentation,
+     * since RFC6020 states that <code>augment</code> that augment
+     * statement must not add multiple nodes from same namespace 
+     * / module
+     * to the target node.
+     * 
+     * @return Identifier which uniquelly identifies augmentation in particular subtree.
+     * 
+     */
     @Override
-    Iterable<DataContainerChild<? extends PathArgument, ?>> getValue();
-
-    @Override
-    Optional<DataContainerChild<? extends PathArgument, ?>> getChild(PathArgument child);
-
-    @Override
-    AugmentationIdentifier getIdentifier();
+    public AugmentationIdentifier getIdentifier();
 }
index 06d1325ab97311374e70f8b69684de008347b629..6ce46cb044f17a27c791d7735e65c9ab8d46f971 100644 (file)
@@ -10,13 +10,16 @@ package org.opendaylight.yangtools.yang.data.api.schema;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
 
-import com.google.common.base.Optional;
-
 /**
  *
- * Node representing choice.
+ * Node representing data instance of <code>choice</code>.
  *
- * @author Tony Tkacik
+ * Choice node is instance of one of possible alternatives, from which
+ * only one is allowed to exist at one time in particular context of parent node.
+   YANG Model and
+ * schema for choice is described by instance of  {@link org.opendaylight.yangtools.yang.model.api.ChoiceNode}.
+ * Valid alternatives of subtree are described by instances of {@link org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode}
+ * which are retrieved via {@link org.opendaylight.yangtools.yang.model.api.ChoiceNode#getCases()}.
  *
  */
 public interface ChoiceNode extends //
@@ -24,9 +27,4 @@ public interface ChoiceNode extends //
         DataContainerNode<NodeIdentifier>,
         DataContainerChild<NodeIdentifier, Iterable<DataContainerChild<? extends PathArgument, ?>>> {
 
-    @Override
-    NodeIdentifier getIdentifier();
-
-    @Override
-    Optional<DataContainerChild<? extends PathArgument, ?>> getChild(PathArgument child);
 }
index 5584e70d2827b3e13a4f45f0b6b1394bbec474bd..b4872df34c408851184f5e8f187425c8435850e6 100644 (file)
@@ -11,16 +11,17 @@ import org.opendaylight.yangtools.yang.data.api.AttributesContainer;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
 
-import com.google.common.base.Optional;
-
+/**
+ * Data subtree with cardinality 0..1 in the context of parent node
+ * 
+ * Node which does not have value but contains valid {@link DataContainerChild} nodes.
+ * 
+ * Schema of this node is described by instance of {@link org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode}.
+ * 
+ */
 public interface ContainerNode extends //
         AttributesContainer,
         DataContainerNode<NodeIdentifier>,
         DataContainerChild<NodeIdentifier, Iterable<DataContainerChild<? extends PathArgument, ?>>> {
 
-    @Override
-    NodeIdentifier getIdentifier();
-
-    @Override
-    Optional<DataContainerChild<? extends PathArgument, ?>> getChild(PathArgument child);
 }
index f0520eed9bde3ecf1f550416e601fe1d30f987f6..c1e3844540430e9d35bfb97aeef35cfeca956af4 100644 (file)
@@ -12,22 +12,24 @@ import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
 /**
  *
  * Marker interface for direct children of {@link DataContainerNode}.
- *
- * Implementation notes:
+ * 
+ * <h3>Implementation notes</h3>
  * This interface should not be implemented directly, but rather using one
  * of its subinterfaces:
  *
+ * <ul>
+ * <li>{@link LeafNode}
+ * <li>{@link ContainerNode}
+ * <li>{@link ChoiceNode}
+ * <li>{@link MapNode}
+ * <li>{@link AugmentationNode}
+ *</ul>
  *
- * {@link LeafNode}
- * {@link ContainerNode}
- * {@link ChoiceNode}
- * {@link MapNode}
- * {@link AugmentationNode}
- *
- * @param <K>
- * @param <V>
+ * @param <K> Path Argument Type which is used to identify node
+ * @param <V> Value type
  */
 public interface DataContainerChild<K extends PathArgument,V> extends NormalizedNode<K, V> {
+
     @Override
     K getIdentifier();
 }
index 717f79dd449b20db62e8876d68c3488efa07a7c9..0c3fc224bdabbfac2c3e1f278f0e56fecbc79ef9 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -9,16 +8,39 @@ package org.opendaylight.yangtools.yang.data.api.schema;
 
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
 
-import com.google.common.base.Optional;
-
+/**
+ *
+ * Abstract node which does not have value but contains valid {@link DataContainerChild} nodes.
+ *
+ * Schema of this node is described by instance of {@link org.opendaylight.yangtools.yang.model.api.DataNodeContainer}.
+ *
+ * <h2>Implementation notes</h2>
+ * This interface should not be implemented directly, but rather implementing one of it's subclasses
+ * <ul>
+ * <li>{@link ContainerNode}
+ * <li>{@link MapEntryNode}
+ * <li>{@link UnkeyedListEntryNode}
+ * <li>{@link ChoiceNode}
+ * <li>{@link AugmentationNode}
+ * </ul>
+ *
+ * @param <K> {@link PathArgument} which identifies instance of {@link DataContainerNode}
+ */
 public interface DataContainerNode<K extends PathArgument> extends //
         NormalizedNodeContainer<K, PathArgument, DataContainerChild<? extends PathArgument, ?>> {
-    @Override
-    K getIdentifier();
 
+    /**
+     * Returns iteration of all child nodes
+     *
+     * Order of returned child nodes may be defined by subinterfaces.
+     *
+     * <b>Implementation Notes:</b>
+     * <p>
+     * All nodes returned in this iterable, MUST also be accessible via
+     * {@link #getChild(PathArgument)} using their associated identifier.
+     *
+     * @return Iteration of all child nodes
+     */
     @Override
     Iterable<DataContainerChild<? extends PathArgument, ?>> getValue();
-
-    @Override
-    Optional<DataContainerChild<? extends PathArgument, ?>> getChild(PathArgument child);
 }
index d113dd2c33c04eb481c6fa617a9e28728c6f6e15..89d9f49342b01bd182da8aee4786113a56c43275 100644 (file)
@@ -10,9 +10,28 @@ package org.opendaylight.yangtools.yang.data.api.schema;
 import org.opendaylight.yangtools.yang.data.api.AttributesContainer;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier;
 
+/**
+ *
+ * Leaf node with multiplicity 0..1
+ *
+ * Leaf node has a value, but no child nodes in the data tree, schema
+ * for leaf node and its value is described by {@link org.opendaylight.yangtools.yang.model.api.LeafSchemaNode}.
+ *
+ * @param <T> Value type
+ */
 public interface LeafNode<T> extends //
         AttributesContainer,
         DataContainerChild<NodeIdentifier, T> {
+
+
+    /**
+     *
+     * Returns value of this leaf node
+     *
+     * @return Returned value of this leaf node. Value SHOULD meet criteria defined by schema.
+     *
+     */
     @Override
-    NodeIdentifier getIdentifier();
+    T getValue();
+
 }
index 663eb64da1dc7b31b8c9c890f22484813b23e5ea..103f88ff534c0bd14af9083487e61c41d0a0b3ad 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -10,9 +9,49 @@ package org.opendaylight.yangtools.yang.data.api.schema;
 import org.opendaylight.yangtools.yang.data.api.AttributesContainer;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeWithValue;
 
-public interface LeafSetEntryNode<T> extends
-        AttributesContainer,
-        NormalizedNode<NodeWithValue, T> {
+/**
+ *
+ * Leaf node with multiplicity 0...n
+ *
+ * Leaf node has a value, but no child nodes in the data tree, schema
+ * for leaf node and its value is described by
+ * {@link org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode}.
+ *
+ * @param <T>
+ *            Value type
+ */
+public interface LeafSetEntryNode<T> extends AttributesContainer, NormalizedNode<NodeWithValue, T> {
+
+    /**
+     * Returns {@link NodeWithValue} which identifies this leaf set entry.
+     *
+     * Returned {@link NodeWithValue} contains same value as this node.
+     *
+     * <h3>Implementation notes</h3> Invocation of
+     * {@link NodeWithValue#getValue()} on returned instance of
+     * {@link NodeWithValue} must returns
+     * same value as invocation of {@link #getValue()}, such as
+     * following condition is allways met:
+     * <code>true == this.getIdentifier().getValue().equals(this.getValue())</code>
+     *
+     *
+     * @return {@link NodeWithValue} which identifies this leaf set entry.
+     */
     @Override
     NodeWithValue getIdentifier();
+
+    /**
+     *
+     * Returns value of this leaf node
+     *
+     * <h3>Implementation notes</h3> Invocation of {@link #getValue()} must
+     * provides same value as value in {@link #getIdentifier()}.
+     * <code>true == this.getIdentifier().getValue().equals(this.getValue())</code>
+     *
+     * @return Returned value of this leaf node. Value SHOULD meet criteria
+     *         defined by schema.
+     *
+     */
+    @Override
+    public T getValue();
 }
index 32b389342aa349b20edb9062659aa447d98efac3..70829e1eb69f7cee54610fd5a20189e431d1c39b 100644 (file)
@@ -10,19 +10,20 @@ package org.opendaylight.yangtools.yang.data.api.schema;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeWithValue;
 
-import com.google.common.base.Optional;
-
+/**
+ *
+ * Node representing set of simple leaf nodes.
+ *
+ * Node containing instances of {@link LeafSetEntryNode}
+ *
+ * Schema and semantics of this node are described by instance of {@link org.opendaylight.yangtools.yang.model.api.LeafListSchema}.
+ *
+ *
+ * @param <T> Type of leaf node values.
+ */
 public interface LeafSetNode<T> extends
     MixinNode, //
     DataContainerChild<NodeIdentifier, Iterable<LeafSetEntryNode<T>>>, //
     NormalizedNodeContainer<NodeIdentifier, NodeWithValue,LeafSetEntryNode<T>> {
 
-    @Override
-    NodeIdentifier getIdentifier();
-
-    @Override
-    Iterable<LeafSetEntryNode<T>> getValue();
-
-    @Override
-    Optional<LeafSetEntryNode<T>> getChild(NodeWithValue child);
 }
index b5eb47e4cf48787ccacf3bbf18e4f49dc3820869..94ea04937c490a085820d857a20b597b91cd859e 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -10,10 +9,26 @@ package org.opendaylight.yangtools.yang.data.api.schema;
 import org.opendaylight.yangtools.yang.data.api.AttributesContainer;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifierWithPredicates;
 
-public interface MapEntryNode extends
-        AttributesContainer,
-        DataContainerNode<NodeIdentifierWithPredicates> {
+/**
+ *
+ * Instance of Map entry, this node does not contains value, but child nodes.
+ *
+ */
+public interface MapEntryNode extends AttributesContainer, DataContainerNode<NodeIdentifierWithPredicates> {
 
+    /**
+     *
+     * Returns identifier of this node in parent map node
+     *
+     * Contents of identifier is defined by <code>key</code> (
+     * {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.ListSchemaNode#getKeyDefinition()}
+     * ) statement in YANG schema for associated list item and child {@link LeafNode}s
+     * values with {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier}
+     * as defined in the schema.
+     *
+     * @return identifier of this node in the context of parent node
+     */
     @Override
     NodeIdentifierWithPredicates getIdentifier();
+
 }
index ec5bfc0448737c97d883f76355ac146d972bbe35..1b916c21ff771993e0fdf9fdf10c82108e0641e8 100644 (file)
@@ -11,9 +11,12 @@ import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifie
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifierWithPredicates;
 
 /**
- * Containment node, which contains {@link MapEntryNode} of the same type.
+ * Containment node, which contains {@link MapEntryNode} of the same type, which may
+ * be quickly retrieved using key.
  *
- * This node maps to the list node in YANG schema.
+ * This node maps to the list node in YANG schema, schema and semantics of this node,
+ * its children and key construction is  defined by YANG <code>list</code>
+ * statement and its <code>key</code> and <code>ordered-by</code> substatements.
  *
  */
 public interface MapNode extends //
@@ -21,6 +24,4 @@ public interface MapNode extends //
         DataContainerChild<NodeIdentifier, Iterable<MapEntryNode>>,
         NormalizedNodeContainer<NodeIdentifier, NodeIdentifierWithPredicates, MapEntryNode> {
 
-    @Override
-    NodeIdentifier getIdentifier();
 }
index 2fec77fc7f6d6ef3c59e5e70bad139fd2c5b1af2..4e3416fd1fb22b5b83243cd1e922cdf5d6ee8d86 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.yangtools.yang.data.api.schema;
 
 import org.opendaylight.yangtools.concepts.Identifiable;
@@ -10,8 +17,8 @@ import org.opendaylight.yangtools.yang.data.api.Node;
  * Node which is normalized according to the YANG schema
  * is identifiable by {@link InstanceIdentifier}.
  *
- *
- * @author Tony Tkacik
+ * See subinterfaces of this interface for concretization
+ * of node.
  *
  * @param <K> Local identifier of node
  * @param <V> Value of node
index 48d0b6eeb62c38a6b9cc4d0299ac959a3837e70a..b3d2bdb1af17381eb1f85f137eef46529dc45687 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -12,10 +11,22 @@ import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
 import com.google.common.base.Optional;
 
 /**
- *
- * @param <I> Node Identifier type
- * @param <K> Child Node Identifier type
- * @param <V> Child Node type
+ * Node which is not leaf, but has child {@link NormalizedNode}s as its valzue.
+ * 
+ * 
+ * NormalizedNodeContainer does not have a value, but it has a child
+ * nodes. Definition of possible and valid child nodes is introduced
+ * in subclasses of this interface.
+ * 
+ * This interface should not be used directly, but rather use of of derived subinterfaces
+ * such as {@link DataContainerNode}, {@link MapNode}, {@link LeafSetNode}.
+ * 
+ * @param <I>
+ *            Node Identifier type
+ * @param <K>
+ *            Child Node Identifier type
+ * @param <V>
+ *            Child Node type
  */
 public interface NormalizedNodeContainer<I extends PathArgument, K extends PathArgument, V extends NormalizedNode<? extends K, ?>>
         extends NormalizedNode<I, Iterable<V>> {
@@ -23,14 +34,20 @@ public interface NormalizedNodeContainer<I extends PathArgument, K extends PathA
     @Override
     I getIdentifier();
 
+    /**
+     * Returns immutable iteration of child nodes of this node.
+     * 
+     */
     @Override
     Iterable<V> getValue();
 
     /**
-     *
-     *
+     * Returns child node identified by provided key.
+     * 
      * @param child
-     * @return
+     *            Path argument identifying child node
+     * @return Optional with child node if child exists.
+     *         {@link Optional#absent()} if child does not exists.
      */
     Optional<V> getChild(K child);
 }
index 63fe710241271aee0bf3dcce4f7042354812b81c..11bc39a28e8bf025c507e49cd62cf7909bf5c5e0 100644 (file)
@@ -7,6 +7,19 @@
  */
 package org.opendaylight.yangtools.yang.data.api.schema;
 
+
+/**
+ *
+ * Leaf set node which preserves user-supplied ordering.
+ *
+ * This node represents a data instance of <code>leaf-list</code> with
+ * <code>ordered-by user;</code> substatement.
+ *
+ * Except preserving user-ordering all other semantics and behaviour is same
+ * as in {@link LeafSetNode}.
+ *
+ * @param <T> Value type of Leaf entries
+ */
 public interface OrderedLeafSetNode<T> extends LeafSetNode<T>, OrderedNodeContainer<LeafSetEntryNode<T>> {
 
 }
index 963d7dab0b1068e29b6ad9518381a51f8ac6b07b..23aa10ed638af55d0002c642b0d7b3c5c4ef4249 100644 (file)
@@ -1,12 +1,24 @@
 /*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 package org.opendaylight.yangtools.yang.data.api.schema;
 
+/**
+ *
+ * Map node which preserves user-supplied ordering.
+ *
+ * <p>
+ * This node represents a data instance of <code>list</code> with
+ * <code>ordered-by user;</code> substatement and <code>key</code> definition.
+ *
+ * <p>
+ * Except preserving user-ordering all other semantics and behaviour is same as
+ * in {@link MapNode}.
+ *
+ */
 public interface OrderedMapNode extends MapNode, OrderedNodeContainer<MapEntryNode> {
 
 }
index 44b1a4b5da6575e6eeb1eb021d113977f6526b46..72e2901e75dee19c3d3950a56be706fe96bc4b73 100644 (file)
@@ -9,7 +9,28 @@ package org.opendaylight.yangtools.yang.data.api.schema;
 
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier;
 
+/**
+ *
+ * Normalized Node container which preserves user supplied ordering
+ * and allows addressing of child elements by positiion.
+ *
+ * @param <V>
+ */
 public interface OrderedNodeContainer<V extends NormalizedNode<?, ?>> extends MixinNode, NormalizedNode<NodeIdentifier, Iterable<V>> {
+
+    /**
+     * Returns child node by position
+     *
+     * @param position Position of child node
+     * @return Child Node
+     * @throws IndexOutOfBoundsException
+     */
     V getChild(int position);
+
+    /**
+     * Returns count of child nodes
+     *
+     * @return count of child nodes.
+     */
     int getSize();
 }
index 28f3f953c0092ee032970188d96b3b2b2719f4a5..c1dca0f700c92b795de51c10229206fe622128b0 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -9,6 +8,17 @@ package org.opendaylight.yangtools.yang.data.api.schema;
 
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier;
 
+/**
+ * List entry node, which does not have value, but child nodes.
+ *
+ * Represents an instance of data, which schema is instance of
+ * {@link org.opendaylight.yangtools.yang.model.api.ListSchemaNode} with key undefined.
+ *
+ * This nodes itself does not contain any ordering information, user supplied
+ * ordering is preserved by parent node, which is instance of {@link UnkeyedListNode}.
+ *
+ *
+ */
 public interface UnkeyedListEntryNode extends DataContainerNode<NodeIdentifier> {
 
 }
index d6ac9a152d3d1bd634cc41bd93c24130d344fd35..ff2ca1f7d96cbbd610a7486356a91ea0d8373a04 100644 (file)
@@ -9,6 +9,22 @@ package org.opendaylight.yangtools.yang.data.api.schema;
 
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier;
 
+
+/**
+ *
+ * Containment node, which contains {@link UnkeyedListEntryNode} of the same type, which may
+ * be quickly retrieved using key.
+ *
+ * <p>
+ * This node maps to the <code>list</code> statement in YANG schema,
+ * which did not define <code>key</code> substatement.
+ *
+ * <p>
+ * Ordering of the elements is user-defined during construction of instance of this
+ * interface. Ordered view of elements (iteration)
+ * is provided by {@link #getValue()} call.
+ *
+ */
 public interface UnkeyedListNode extends
     DataContainerChild<NodeIdentifier, Iterable<UnkeyedListEntryNode>>,
     OrderedNodeContainer<UnkeyedListEntryNode> {
diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/package-info.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/package-info.java
new file mode 100644 (file)
index 0000000..bed1483
--- /dev/null
@@ -0,0 +1,146 @@
+/**
+ *
+ * Definition of normalized YANG DOM Model
+ *
+ * Normalized DOM Model brings more direct mapping between YANG Model, DOM
+ * representation of data
+ *
+ * <h2>Normalized DOM Model</h2>
+ *
+ * <h3>Node Types</h3>
+ * <ul>
+ * <li> {@link org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode} -
+ * Base type representing a node in a tree structure; all nodes are derived from
+ * it, it contains a leaf identifier and a value.
+ * <ul>
+ * <li>
+ * {@link org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode} -
+ * Node which contains multiple leafs; it does not have a direct representation
+ * in the YANG syntax.
+ * <ul>
+ * <li> {@link org.opendaylight.yangtools.yang.data.api.schema.ContainerNode} -
+ * Node, which represents a leaf which can occur only once per parent node; it
+ * contains multiple child leaves and maps to the <i>container</i> statement in
+ * YANG.</li>
+ * <li> {@link org.opendaylight.yangtools.yang.data.api.schema.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 <i>list</i> in
+ * YANG.</li>
+ * <li>
+ * {@link org.opendaylight.yangtools.yang.data.api.schema.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 <i>list</i> in
+ * YANG.</li>
+ * <li> {@link org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode} - Node
+ * which represents a leaf, which occurs mostly once per parent node, but
+ * possible values could have different types. Maps to <i>choice</i> statement.
+ * Types maps to the <i>case</i> statements for that <i>choice</i>.</li>
+ * <li> {@link org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode}
+ * - Node which represents a leaf, which occurs mostly once per parent node.</li>
+ * </ul>
+ * </li>
+ * <li> {@link org.opendaylight.yangtools.yang.data.api.schema.LeafNode} - Node
+ * which represents a leaf, which occurs mostly once per parent node. Contains
+ * simple value.</li>
+ * <li> {@link org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode}
+ * - Node which represents a leaf, which type could occurs multiple times per
+ * parent node. Maps to to the instances of <i>leaf-list</i> in YANG.</li>
+ * <li> {@link org.opendaylight.yangtools.yang.data.api.schema.LeafSetNode} -
+ * Special node, which can occur only once per parent node; its leaves are
+ * LeafSetEntryNode nodes of specified type. Maps into the <i>leaf-list</i> in
+ * YANG.</li>
+ * <li> {@link org.opendaylight.yangtools.yang.data.api.schema.MapNode} - Special
+ * node, which can occur only once per parent node; its leaves are MapEntryNode
+ * nodes.
+ * <ul>
+ * <li> {@link org.opendaylight.yangtools.yang.data.api.schema.OrderedMapNode} -
+ * Special node, which can occur only once per parent node; its leaves are
+ * MapEntryNode nodes.</li>
+ * </ul>
+ * </li>
+ * <li> {@link org.opendaylight.yangtools.yang.data.api.schema.UnkeyedListNode} -
+ * Special node, which can occur only once per parent node; its leaves are
+ * MapEntryNode nodes.</li>
+ * </ul>
+ * </li>
+ * </ul>
+ *
+ * <h3>Tree / subtree structure</h3> <h4>Grammar representation</h4>
+ *
+ * <pre>
+ *  {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier} = {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument}*
+ *  {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument} = {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier}| {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifierWithPredicates}| {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeWithValue} | {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.AugmentationIdentifier}
+ *
+ *  TreeRoot = {@link org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode}
+ *  {@link org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode} = ( {@link org.opendaylight.yangtools.yang.data.api.schema.LeafNode} | {@link org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode} | {@link org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode} | {@link org.opendaylight.yangtools.yang.data.api.schema.MapNode} | {@link org.opendaylight.yangtools.yang.data.api.schema.LeafSetNode})*
+ *  ContainerDataNode = {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier} {@link org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode}
+ *
+ *  {@link org.opendaylight.yangtools.yang.data.api.schema.LeafNode} = {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier} SimpleValue
+ *  {@link org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode} = {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.AugmentationIdentifier} {@link org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode}
+ *  {@link org.opendaylight.yangtools.yang.data.api.schema.MapNode} = {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier} {@link org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode}
+ *  {@link org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode} = {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifierWithPredicates} {@link org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode}
+ *
+ *  // Special nodes
+ *  {@link org.opendaylight.yangtools.yang.data.api.schema.LeafSetNode} = {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier} {@link org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode}*
+ *  {@link org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode} = {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier} {@link org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode}
+ *  {@link org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode} = {@link org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeWithValue} SimpleValue
+ * </pre>
+ *
+ * The resulting tree organization is following:
+ *
+ * <ul>
+ * <li>(DataContainerNode)
+ * <ul>
+ * <li>(0..n) LeafNode</li>
+ * <li>(0..n) LeafSetNode
+ * <ul>
+ * <li>(0..n) LeafSetEntryNode</li>
+ * </ul>
+ * </li>
+ * <li>(0..n) ContainerNode
+ * <ul>
+ * <li>(Same as DataContainerNode)</li>
+ * </ul>
+ * </li>
+ * <li>(0..n) ContainerNode
+ * <ul>
+ * <li>(Same as DataContainerNode)</li>
+ * </ul>
+ * </li>
+ * <li>(0..n) MapNode
+ * <ul>
+ * <li>(0..n) MapEntryNode
+ * <ul>
+ * <li>(Same as DataContainerNode)</li>
+ * </ul>
+ * </li>
+ * </ul>
+ * </li>
+ * <li>(0..n) AugmentationNode
+ * <ul>
+ * <li>(Same as DataContainerNode)</li>
+ * </ul>
+ * </li>
+ * </ul>
+ * </li>
+ * </ul>
+ *
+ * <h3>Ordering of child nodes</h3>
+ *
+ * Ordering of child nodes is not enforced by this API definition, unless
+ * explicitly stated by subclasses of
+ * {@link org.opendaylight.yangtools.yang.data.api.schema.OrderedNodeContainer}
+ * which marks nodes with semantic constrain to preserve user-supplied ordering.
+ * <p>
+ * Clients should not expect any specific ordering of child nodes for interfaces
+ * from this package which does not extend
+ * {@link org.opendaylight.yangtools.yang.data.api.schema.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.
+ *
+ */
+package org.opendaylight.yangtools.yang.data.api.schema;
\ No newline at end of file