Added getParent() method to DataSchemaNode and DataNodeContainer. Fixed Bugs.
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / util / ParserUtils.xtend
index 124f8c701392a1f46f79fb4bebd20056f8e360f1..dbd78e582a5bec446d405d146ec46f80190bba95 100644 (file)
@@ -218,6 +218,7 @@ public final class ParserUtils {
         }
         for (UsesNodeBuilder usesNode : augment.getUsesNodes()) {
             val copy = CopyUtils.copyUses(usesNode, target);
+            copy.setAugmenting(true);
             target.addUsesNode(copy);
         }
     }
@@ -392,7 +393,7 @@ public final class ParserUtils {
     }
     
     public static def getRpc(ModuleBuilder module,String name) {
-        for(rpc : module.rpcs) {
+        for(rpc : module.getRpcs()) {
             if(name == rpc.QName.localName) {
                 return rpc;
             }
@@ -401,7 +402,7 @@ public final class ParserUtils {
     }
     
     public static def getNotification(ModuleBuilder module,String name) {
-        for(notification : module.notifications) {
+        for(notification : module.getNotifications()) {
             if(name == notification.QName.localName) {
                 return notification;
             }
@@ -668,5 +669,6 @@ public final class ParserUtils {
             }
             return parent as ModuleBuilder;
         }
-    }
-    
\ No newline at end of file
+
+}
+