More javadocs added to yang-model-api. 65/365/2
authorMartin Vitez <mvitez@cisco.com>
Mon, 20 May 2013 11:20:54 +0000 (13:20 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 21 May 2013 14:25:11 +0000 (14:25 +0000)
Deleted not used KeyDefinition class.

Signed-off-by: Martin Vitez <mvitez@cisco.com>
13 files changed:
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/Deviation.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/FeatureDefinition.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/GroupingDefinition.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/IdentitySchemaNode.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/KeyDefinition.java [deleted file]
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/LeafListSchemaNode.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/LeafSchemaNode.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/ListSchemaNode.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/ModuleImport.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/NotificationDefinition.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/RpcDefinition.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/Status.java
opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/UsesNode.java

index b3b2c06..8745dda 100644 (file)
@@ -7,16 +7,40 @@
  */\r
 package org.opendaylight.controller.yang.model.api;\r
 \r
+/**\r
+ * Interface describing YANG 'deviation' statement.\r
+ * <p>\r
+ * The 'deviation' statement defines a hierarchy of a module that the device\r
+ * does not implement faithfully. Deviations define the way a device deviate\r
+ * from a standard.\r
+ * </p>\r
+ */\r
 public interface Deviation {\r
 \r
+    /**\r
+     * Enum describing YANG deviation 'deviate' statement. It defines how the\r
+     * device's implementation of the target node deviates from its original\r
+     * definition.\r
+     */\r
     enum Deviate {\r
         NOT_SUPPORTED, ADD, REPLACE, DELETE\r
     }\r
 \r
+    /**\r
+     * @return SchemaPath that identifies the node in the schema tree where a\r
+     *         deviation from the module occurs.\r
+     */\r
     SchemaPath getTargetPath();\r
 \r
+    /**\r
+     * @return deviate statement of this deviation\r
+     */\r
     Deviate getDeviate();\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
index efd0e18..a6d6331 100644 (file)
@@ -7,6 +7,14 @@
  */\r
 package org.opendaylight.controller.yang.model.api;\r
 \r
+/**\r
+ * Interface describing YANG 'feature' statement.\r
+ * <p>\r
+ * The feature statement is used to define a mechanism by which portions of the\r
+ * schema are marked as conditional. A feature name can later be referenced\r
+ * using the 'if-feature' statement.\r
+ * </p>\r
+ */\r
 public interface FeatureDefinition extends SchemaNode {\r
 \r
 }\r
index 5e94f3b..1c8398b 100644 (file)
@@ -7,10 +7,14 @@
  */\r
 package org.opendaylight.controller.yang.model.api;\r
 \r
-import java.util.Set;\r
-\r
+/**\r
+ * Interface describing YANG 'grouping' statement.\r
+ * <p>\r
+ * It is used to define a reusable block of nodes, which may be used locally in\r
+ * the module, in modules that include it, and by other modules that import from\r
+ * it.\r
+ * </p>\r
+ */\r
 public interface GroupingDefinition extends DataNodeContainer, SchemaNode {\r
 \r
-    Set<UsesNode> getUses();\r
-\r
 }\r
index d1e6818..7e08238 100644 (file)
@@ -1,14 +1,27 @@
 /*\r
 * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
 *\r
 * This program and the accompanying materials are made available under the\r
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
 * and is available at http://www.eclipse.org/legal/epl-v10.html\r
 */\r
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
 package org.opendaylight.controller.yang.model.api;\r
 \r
+/**\r
+ * Interface describing YANG 'identity' statement.\r
+ * <p>\r
+ * The 'identity' statement is used to define a new globally unique, abstract,\r
+ * and untyped identity. Its only purpose is to denote its name, semantics, and\r
+ * existence. The built-in datatype "identityref" can be used to reference\r
+ * identities within a data model.\r
+ * </p>\r
+ */\r
 public interface IdentitySchemaNode extends SchemaNode {\r
 \r
+    /**\r
+     * @return an existing identity, from which the new identity is derived or\r
+     *         null, if the identity is defined from scratch.\r
+     */\r
     IdentitySchemaNode getBaseIdentity();\r
 \r
 }\r
diff --git a/opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/KeyDefinition.java b/opendaylight/sal/yang-prototype/yang/yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/KeyDefinition.java
deleted file mode 100644 (file)
index 5e8b2c7..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.controller.yang.model.api;\r
-\r
-public interface KeyDefinition extends SchemaNode {\r
-\r
-    TypeDefinition<? extends TypeDefinition<?>> getType();\r
-\r
-}\r
index 1d7287f..8780322 100644 (file)
@@ -7,10 +7,20 @@
  */\r
 package org.opendaylight.controller.yang.model.api;\r
 \r
+/**\r
+ * Interface describing YANG 'leaf-list' statement.\r
+ */\r
 public interface LeafListSchemaNode extends DataSchemaNode {\r
 \r
     TypeDefinition<? extends TypeDefinition<?>> getType();\r
 \r
+    /**\r
+     * YANG 'ordered-by' statement. It defines whether the order of entries\r
+     * within this leaf-list are determined by the user or the system. If not\r
+     * present, default is false.\r
+     *\r
+     * @return true if ordered-by argument is "user", false otherwise\r
+     */\r
     boolean isUserOrdered();\r
 \r
 }\r
index 3ad047f..9325cb8 100644 (file)
@@ -7,8 +7,17 @@
  */\r
 package org.opendaylight.controller.yang.model.api;\r
 \r
+/**\r
+ * Interface describing YANG 'leaf' statement.\r
+ * <p>\r
+ * The 'leaf' statement is used to define a leaf node in the schema tree.\r
+ * </p>\r
+ */\r
 public interface LeafSchemaNode extends DataSchemaNode {\r
 \r
+    /**\r
+     * @return type of this leaf\r
+     */\r
     TypeDefinition<?> getType();\r
 \r
 }\r
index 824afb7..3a812bd 100644 (file)
@@ -11,11 +11,29 @@ import java.util.List;
 \r
 import org.opendaylight.controller.yang.common.QName;\r
 \r
+/**\r
+ * Interface describing YANG 'list' statement.\r
+ * <p>\r
+ * The 'list' statement is used to define an interior data node in the schema\r
+ * tree. A list entry is uniquely identified by the values of the list's keys,\r
+ * if defined.\r
+ * </p>\r
+ */\r
 public interface ListSchemaNode extends DataNodeContainer, AugmentationTarget,\r
         DataSchemaNode {\r
 \r
+    /**\r
+     * @return List of QNames of leaf identifiers of this list\r
+     */\r
     public List<QName> getKeyDefinition();\r
 \r
+    /**\r
+     * YANG 'ordered-by' statement. It defines whether the order of entries\r
+     * within a list are determined by the user or the system. If not present,\r
+     * default is false.\r
+     *\r
+     * @return true if ordered-by argument is "user", false otherwise\r
+     */\r
     boolean isUserOrdered();\r
 \r
 }\r
index 37237dd..4314798 100644 (file)
@@ -9,11 +9,28 @@ package org.opendaylight.controller.yang.model.api;
 \r
 import java.util.Date;\r
 \r
+/**\r
+ * Interface describing YANG 'import' statement.\r
+ * <p>\r
+ * The import statement makes definitions from one module available inside\r
+ * another module or submodule.\r
+ * </p>\r
+ */\r
 public interface ModuleImport {\r
 \r
+    /**\r
+     * @return Name of the module to import\r
+     */\r
     String getModuleName();\r
 \r
+    /**\r
+     * @return Revision of module to import\r
+     */\r
     Date getRevision();\r
 \r
+    /**\r
+     * @return Prefix used to point to imported module\r
+     */\r
     String getPrefix();\r
+\r
 }\r
index 4e805f0..8e7686c 100644 (file)
@@ -7,5 +7,10 @@
  */\r
 package org.opendaylight.controller.yang.model.api;\r
 \r
+/**\r
+ * Interface describing YANG 'notification' statement. The\r
+ * notification statement is used to define a NETCONF notification.\r
+ */\r
 public interface NotificationDefinition extends SchemaNode, DataNodeContainer {\r
+\r
 }\r
index a4c784e..5ce453d 100644 (file)
@@ -9,13 +9,36 @@ package org.opendaylight.controller.yang.model.api;
 \r
 import java.util.Set;\r
 \r
+/**\r
+ * Interface describing YANG 'rpc' statement.\r
+ * <p>\r
+ * The rpc statement defines an rpc node in the schema tree. Under the rpc node,\r
+ * a schema node with the name 'input', and a schema node with the name 'output'\r
+ * are also defined.\r
+ * </p>\r
+ */\r
 public interface RpcDefinition extends SchemaNode {\r
 \r
+    /**\r
+     * @return Set of type definitions declared under this rpc statement.\r
+     */\r
     Set<TypeDefinition<?>> getTypeDefinitions();\r
 \r
+    /**\r
+     * @return Set of grouping statements declared under this rpc statement.\r
+     */\r
     Set<GroupingDefinition> getGroupings();\r
 \r
+    /**\r
+     * @return Definition of input parameters to the RPC operation. The\r
+     *         substatements of input define nodes under the RPC's input node.\r
+     */\r
     ContainerSchemaNode getInput();\r
 \r
+    /**\r
+     * @return Definition of output parameters to the RPC operation. The\r
+     *         substatements of output define nodes under the RPC's output node.\r
+     */\r
     ContainerSchemaNode getOutput();\r
+\r
 }\r
index 9a49d79..39aa0c8 100644 (file)
@@ -7,6 +7,28 @@
  */\r
 package org.opendaylight.controller.yang.model.api;\r
 \r
+/**\r
+ * Enum describing YANG 'status' statement. If no status is specified, the\r
+ * default is CURRENT.\r
+ */\r
 public enum Status {\r
-    CURRENT, DEPRECATED, OBSOLETE\r
+\r
+    /**\r
+     * CURRENT means that the definition is current and valid.\r
+     */\r
+    CURRENT,\r
+\r
+    /**\r
+     * DEPRECATED indicates an obsolete definition, but it permits new/\r
+     * continued implementation in order to foster interoperability with\r
+     * older/existing implementations.\r
+     */\r
+    DEPRECATED,\r
+\r
+    /**\r
+     * OBSOLETE means the definition is obsolete and SHOULD NOT be implemented\r
+     * and/or can be removed from implementations.\r
+     */\r
+    OBSOLETE\r
+\r
 }\r
index 91fde5b..e76f5e8 100644 (file)
@@ -12,11 +12,31 @@ import java.util.Set;
 \r
 public interface UsesNode {\r
 \r
+    /**\r
+     * @return path to 'grouping' on which this 'uses' statement points\r
+     */\r
     SchemaPath getGroupingPath();\r
-    \r
+\r
+    /**\r
+     * @return Set of augment statements defined under this uses node\r
+     */\r
     Set<AugmentationSchema> getAugmentations();\r
-    \r
+\r
+    /**\r
+     * Returns <code>true</code> if the data node was added by augmentation,\r
+     * otherwise returns <code>false</code>\r
+     *\r
+     * @return <code>true</code> if the data node was added by augmentation,\r
+     *         otherwise returns <code>false</code>\r
+     */\r
     boolean isAugmenting();\r
-    \r
+\r
+    /**\r
+     * Some of the properties of each node in the grouping can be refined with\r
+     * the "refine" statement.\r
+     *\r
+     * @return Map, where key is schema path of refined node and value is\r
+     *         refined node\r
+     */\r
     Map<SchemaPath, SchemaNode> getRefines();\r
 }\r