Added support for parsing yang models with already resolved context. 84/684/1
authorMartin Vitez <mvitez@cisco.com>
Mon, 24 Jun 2013 09:48:14 +0000 (11:48 +0200)
committerMartin Vitez <mvitez@cisco.com>
Wed, 24 Jul 2013 11:44:53 +0000 (13:44 +0200)
Added rebuild method to AugmentationTargetBuilder interface to support augmentation of resolved context.
Refactored YangParserImpl to improve readability, internal utility methods moved to ParserUtils class.
Added test to check parsing with context.
Added YangErrorListener to redirect antlr4 error messages from standard error output to logger.
Added more javadocs.

Change-Id: I838646cc4b3593a03420c1b578ee39c043f89e3d
Signed-off-by: Martin Vitez <mvitez@cisco.com>
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/Module.java
yang-model-api/src/main/java/org/opendaylight/controller/yang/model/api/NotificationDefinition.java
yang-model-util/src/main/java/org/opendaylight/controller/yang/model/util/AbstractUnsignedInteger.java

index 03a8962d552c26031e51f178e0160c30a77e8d8f..ee4163da48c082531c4f4c99179d242b7f5c383c 100644 (file)
@@ -19,7 +19,7 @@ public interface ChoiceNode extends DataSchemaNode, AugmentationTarget {
      * @return ChoiceCaseNode objects defined in this node
      */
     Set<ChoiceCaseNode> getCases();
-    
+
     String getDefaultCase();
 
 }
index f2171480a07c2b2316358a826afe9c70c162a03b..51dd9f65074d2113314d6a27182d889b8b0adc37 100644 (file)
@@ -48,4 +48,6 @@ public interface Module extends DataNodeContainer {
 \r
     List<ExtensionDefinition> getExtensionSchemaNodes();\r
 \r
+    List<UnknownSchemaNode> getUnknownSchemaNodes();\r
+\r
 }\r
index 8e7686cf3b72d0554d92a5547fef99d518498557..b3e06777c5e8a7fe4ddc748f9cbeeeed9f2d88eb 100644 (file)
@@ -8,9 +8,9 @@
 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
+ * Interface describing YANG 'notification' statement. The notification\r
+ * statement is used to define a NETCONF notification.\r
  */\r
-public interface NotificationDefinition extends SchemaNode, DataNodeContainer {\r
+public interface NotificationDefinition extends SchemaNode, DataNodeContainer, AugmentationTarget {\r
 \r
 }\r
index 79b211f263e3fc40415463eb48a9743185d2eba5..ad903e9e52c45e7e0f74ad950f487fee35fb3930 100644 (file)
@@ -19,7 +19,7 @@ import org.opendaylight.controller.yang.model.api.type.UnsignedIntegerTypeDefini
  * interface which represents UNSIGNED Integer values defined in Yang language. <br>
  * The integer built-in types in Yang are uint8, uint16, uint32, and uint64.
  * They represent unsigned integers of different sizes:
- * 
+ *
  * <ul>
  * <li>uint8 - represents integer values between 0 and 255, inclusively.</li>
  * <li>uint16 - represents integer values between 0 and 65535, inclusively.</li>
@@ -28,7 +28,7 @@ import org.opendaylight.controller.yang.model.api.type.UnsignedIntegerTypeDefini
  * <li>uint64 - represents integer values between 0 and 18446744073709551615,
  * inclusively.</li>
  * </ul>
- * 
+ *
  */
 public abstract class AbstractUnsignedInteger implements UnsignedIntegerTypeDefinition {
     private static final long MIN_VALUE = 0;
@@ -40,7 +40,7 @@ public abstract class AbstractUnsignedInteger implements UnsignedIntegerTypeDefi
     private final List<RangeConstraint> rangeStatements;
 
     /**
-     * 
+     *
      * @param actualPath
      * @param namespace
      * @param revision