Fixed tests. Added javadocs to yang-model-api. 59/659/1
authorMartin Vitez <mvitez@cisco.com>
Fri, 17 May 2013 15:48:08 +0000 (17:48 +0200)
committerMartin Vitez <mvitez@cisco.com>
Wed, 24 Jul 2013 11:44:52 +0000 (13:44 +0200)
Minor formatting changes performed in yang-model-parser-impl.

Signed-off-by: Martin Vitez <mvitez@cisco.com>
yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/AugmentationSchema.java
yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/AugmentationTarget.java
yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/ChoiceCaseNode.java
yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/ChoiceNode.java
yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/ConstraintDefinition.java
yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/ContainerSchemaNode.java
yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/DataNodeContainer.java
yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/SchemaNode.java

index 16e8b9e84639820d046e67b6b380ddadfb5f846a..31e0ad682d2b2b9e92473b103bb5d94191257bc1 100644 (file)
@@ -7,20 +7,42 @@
  */\r
 package org.opendaylight.controller.yang.model.api;\r
 \r
-import java.util.Set;\r
-\r
+/**\r
+ * AugmentationSchema represents augment definition. The "augment" statement\r
+ * allows a module or submodule to add to the schema tree defined in an external\r
+ * module, or the current module and its submodules, and to add to the nodes\r
+ * from a grouping in a "uses" statement.\r
+ */\r
 public interface AugmentationSchema extends DataNodeContainer {\r
 \r
+    /**\r
+     * @return when statement\r
+     */\r
     RevisionAwareXPath getWhenCondition();\r
 \r
+    /**\r
+     * @return textual description of this augment.\r
+     */\r
     String getDescription();\r
 \r
+    /**\r
+     * @return textual cross-reference to an external document that provides\r
+     *         additional information relevant to this node.\r
+     */\r
     String getReference();\r
 \r
+    /**\r
+     * @return actual status of this node.\r
+     */\r
     Status getStatus();\r
 \r
+    /**\r
+     * @return SchemaPath that identifies a node in the schema tree. This node\r
+     *         is called the augment's target node. The target node MUST be\r
+     *         either a container, list, choice, case, input, output, or\r
+     *         notification node. It is augmented with the nodes defined as\r
+     *         child nodes of this AugmentationSchema.\r
+     */\r
     SchemaPath getTargetPath();\r
 \r
-    Set<UsesNode> getUses();\r
-\r
 }\r
index 77ab5a3674fcd1737186a56ca95a2fb375aafa07..7e29c6210d93ad475c2e3d58f8ab2dd524e030e3 100644 (file)
@@ -9,11 +9,16 @@ package org.opendaylight.controller.yang.model.api;
 \r
 import java.util.Set;\r
 \r
+/**\r
+ * Interface for all nodes which are possible targets of augmentation. The\r
+ * target node of augmentation MUST be either a container, list, choice, case,\r
+ * input, output, or notification node.\r
+ */\r
 public interface AugmentationTarget {\r
+\r
     /**\r
-     * Returns a set of augmentations targeting this element.\r
-     * \r
-     * @return\r
+     * @return set of augmentations targeting this element.\r
      */\r
     Set<AugmentationSchema> getAvailableAugmentations();\r
+\r
 }\r
index 0fcbda9adcd92417c92fa394b11bf3be466c2cd6..2421e122088ef59fd1c3aed1f9171969d810ade8 100644 (file)
@@ -7,6 +7,9 @@
  */\r
 package org.opendaylight.controller.yang.model.api;\r
 \r
+/**\r
+ * The ChoiceCaseNode interface is used to define branches of the ChoiceNode.\r
+ */\r
 public interface ChoiceCaseNode extends DataSchemaNode, DataNodeContainer,\r
         AugmentationTarget {\r
 \r
index fd3c640b5e33d2ae8d10e07cef46d6b5d18abb7e..b67da660cc0dcca222d7d44ddc380fc091fbbb0d 100644 (file)
@@ -9,7 +9,15 @@ package org.opendaylight.controller.yang.model.api;
 
 import java.util.Set;
 
+/**
+ * The ChoiceNode defines a set of alternatives. It consists of a number of
+ * branches defined as ChoiceCaseNode objects.
+ */
 public interface ChoiceNode extends DataSchemaNode, AugmentationTarget {
 
+    /**
+     * @return ChoiceCaseNode objects defined in this node
+     */
     Set<ChoiceCaseNode> getCases();
+
 }
index 2143324825c511796c76f9cea523bf66eb458505..a48e6afdef936988fa7d5a465380e184c42069e0 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.controller.yang.model.api;
 import java.util.Set;\r
 \r
 public interface ConstraintDefinition {\r
-    DataSchemaNode getParent();\r
 \r
     RevisionAwareXPath getWhenCondition();\r
 \r
index 62df36e28d63f123fda47a7ab541328d6d227cd9..f60fc160d8bea95ba16a61873a53379939a200f7 100644 (file)
@@ -7,9 +7,19 @@
  */\r
 package org.opendaylight.controller.yang.model.api;\r
 \r
+/**\r
+ * The ContainerSchemaNode is used to define an interior data node in the schema\r
+ * tree. There are two styles of containers, those that exist only for\r
+ * organizing the hierarchy of data nodes, and those whose presence in the\r
+ * configuration has an explicit meaning.\r
+ */\r
 public interface ContainerSchemaNode extends DataNodeContainer,\r
         AugmentationTarget, DataSchemaNode {\r
 \r
+    /**\r
+     * @return true, if presence of this container has an explicit meaning,\r
+     *         false otherwise\r
+     */\r
     boolean isPresenceContainer();\r
 \r
 }\r
index 8888208cc287a0239952e57319d027b0a8eaf68b..e8c814e20804eadea4ec916ec834a4b3310c7e82 100644 (file)
@@ -11,18 +11,45 @@ import java.util.Set;
 \r
 import org.opendaylight.controller.yang.common.QName;\r
 \r
+/**\r
+ * Node which can contains other nodes.\r
+ */\r
 public interface DataNodeContainer {\r
 \r
+    /**\r
+     * @return Set of all newly defined types within this DataNodeContainer\r
+     */\r
     Set<TypeDefinition<?>> getTypeDefinitions();\r
 \r
+    /**\r
+     * Set of all child nodes defined within this DataNodeContainer\r
+     */\r
     Set<DataSchemaNode> getChildNodes();\r
 \r
+    /**\r
+     * Set of all groupings defined within this DataNodeContainer\r
+     */\r
     Set<GroupingDefinition> getGroupings();\r
 \r
+    /**\r
+     * @param name\r
+     *            QName of seeked child\r
+     * @return child node of this DataNodeContainer if child with given name is\r
+     *         present, null otherwise\r
+     */\r
     DataSchemaNode getDataChildByName(QName name);\r
 \r
+    /**\r
+     * @param name\r
+     *            name of seeked child as String\r
+     * @return child node of this DataNodeContainer if child with given name is\r
+     *         present, null otherwise\r
+     */\r
     DataSchemaNode getDataChildByName(String name);\r
 \r
+    /**\r
+     * @return Set of all uses nodes defined within this DataNodeContainer\r
+     */\r
     Set<UsesNode> getUses();\r
 \r
 }\r
index 4d3c48654db23dfc6bb7fe53887c002c2bbb03b2..94ccd5dde6d2de1318e4071588fa06a475303f20 100644 (file)
@@ -11,17 +11,34 @@ import java.util.List;
 \r
 import org.opendaylight.controller.yang.common.QName;\r
 \r
+/**\r
+ * SchemaNode represents a node in schema tree.\r
+ */\r
 public interface SchemaNode {\r
 \r
     public QName getQName();\r
 \r
     public SchemaPath getPath();\r
 \r
+    /**\r
+     * @return textual description of this node.\r
+     */\r
     public String getDescription();\r
 \r
+    /**\r
+     * @return textual cross-reference to an external document that provides\r
+     *         additional information relevant to this node.\r
+     */\r
     public String getReference();\r
 \r
+    /**\r
+     * @return actual status of this node.\r
+     */\r
     public Status getStatus();\r
 \r
+    /**\r
+     * @return collection of all unknown nodes defined under this schema node.\r
+     */\r
     public List<UnknownSchemaNode> getUnknownSchemaNodes();\r
+\r
 }\r