[ONOS-4799],[ONOS-4351] Augment inter file linker and Generated Code refactored.

Change-Id: Id1f3ac9c90a632373f51cc75d499c3110216be17
diff --git a/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMulti/test.yang b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMulti/test.yang
new file mode 100644
index 0000000..77d61b9
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMulti/test.yang
@@ -0,0 +1,37 @@
+module test {  
+    namespace "xpath:intra:multi";  
+    prefix test ;  
+      
+    organization "";  
+    contact "";  
+       
+    description   
+        "Defines basic service types for L3VPN service.";  
+       
+    revision "2015-12-16" {  
+        reference "";  
+    }  
+
+    container cont1 {
+       leaf leaf1 {
+          type int32;
+       }
+       container cont2 {
+          leaf leaf2 {
+             type int32;
+          }
+          container cont3 {
+              leaf leaf3 {
+                type int32;
+             }
+          }
+       }
+    }
+
+    augment /cont1/cont2/cont3 {
+       leaf a {
+          type int32;
+       }
+    }
+}
+    
diff --git a/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiAugment/test.yang b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiAugment/test.yang
new file mode 100644
index 0000000..b53012c
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiAugment/test.yang
@@ -0,0 +1,54 @@
+module test {  
+    namespace "xpath:intra:multi";  
+    prefix test ;  
+      
+    organization "";  
+    contact "";  
+       
+    description   
+        "Defines basic service types for L3VPN service.";  
+       
+    revision "2015-12-16" {  
+        reference "";  
+    }  
+
+    container cont1 {
+       leaf leaf1 {
+          type int32;
+       }
+       container cont2 {
+          leaf leaf2 {
+             type int32;
+          }
+          container cont3 {
+              leaf leaf3 {
+                type int32;
+             }
+          }
+       }
+    }
+
+    augment /cont1/cont2/cont3 {
+       leaf a {
+          type int32;
+       }
+       container cont4 {
+          leaf leaf2 {
+             type int32;
+          }
+       }
+    }
+
+    augment /cont1/cont2/cont3/cont4 {
+       leaf a {
+          type int32;
+       }
+
+       container cont5 {
+           leaf leaf1 {
+             type int32;
+          }
+       }
+    }
+}
+    
diff --git a/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiSubModule/test.yang b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiSubModule/test.yang
new file mode 100644
index 0000000..b5d1c8d
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiSubModule/test.yang
@@ -0,0 +1,28 @@
+module test {  
+    namespace "xpath:intra:multi";  
+    prefix test ;  
+    
+    include test1;
+    organization "";  
+    contact "";  
+       
+    description   
+        "Defines basic service types for L3VPN service.";  
+       
+    revision "2015-12-16" {  
+        reference "";  
+    }  
+
+    container cont1 {
+       leaf leaf1 {
+          type int32;
+       }
+    }
+
+    augment /cont2/cont3 {
+       leaf a {
+          type int32;
+       }
+    }
+}
+    
diff --git a/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiSubModule/test1.yang b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiSubModule/test1.yang
new file mode 100644
index 0000000..faf672e
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiSubModule/test1.yang
@@ -0,0 +1,28 @@
+submodule test1 {  
+
+    belongs-to "test" {
+         prefix "test";
+    }           
+      
+    organization "";  
+    contact "";  
+       
+    description   
+        "Defines basic service types for L3VPN service.";  
+       
+    revision "2015-12-16" {  
+        reference "";  
+    }  
+
+    container cont2 {
+       leaf leaf1 {
+          type int32;
+       }
+       container cont3 {
+           leaf leaf3 {
+             type int32;
+          }
+       }
+    }
+}
+    
diff --git a/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiUses/test.yang b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiUses/test.yang
new file mode 100644
index 0000000..6cfb133
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiUses/test.yang
@@ -0,0 +1,38 @@
+module test {  
+    namespace "xpath:intra:single";  
+    prefix test ;  
+      
+    organization "";  
+    contact "";  
+       
+    description   
+        "Defines basic service types for L3VPN service.";  
+       
+    revision "2015-12-16" {  
+        reference "";  
+    }  
+
+    grouping group1 {
+        container cont1 {
+           leaf leaf1 {
+             type int32;
+           }
+           container cont3 {
+               leaf leaf1 {
+                 type int32;
+              }
+           }
+        }
+    }
+
+    container cont2 {
+         uses group1;
+    }
+
+    augment /cont2/group1/cont1/cont3 {
+       leaf a {
+          type int32;
+       }
+    }
+}
+    
diff --git a/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingle/test.yang b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingle/test.yang
new file mode 100644
index 0000000..95d9c2b
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingle/test.yang
@@ -0,0 +1,27 @@
+module test {  
+    namespace "xpath:intra:single";  
+    prefix test ;  
+      
+    organization "";  
+    contact "";  
+       
+    description   
+        "Defines basic service types for L3VPN service.";  
+       
+    revision "2015-12-16" {  
+        reference "";  
+    }  
+
+    container cont1 {
+       leaf leaf1 {
+          type int32;
+       }
+    }
+
+    augment /cont1 {
+       leaf a {
+          type int32;
+       }
+    }
+}
+    
diff --git a/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleAugment/test.yang b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleAugment/test.yang
new file mode 100644
index 0000000..2925dcf
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleAugment/test.yang
@@ -0,0 +1,39 @@
+module test {  
+    namespace "xpath:intra:single";  
+    prefix test ;  
+      
+    organization "";  
+    contact "";  
+       
+    description   
+        "Defines basic service types for L3VPN service.";  
+       
+    revision "2015-12-16" {  
+        reference "";  
+    }  
+
+    container cont1 {
+       leaf leaf1 {
+          type int32;
+       }
+    }
+
+    augment /cont1 {
+       leaf a {
+          type int32;
+       }
+
+       container cont2 {
+           leaf leaf1 {
+             type int32;
+          }
+       }
+    }
+
+    augment /cont1/cont2 {
+       leaf a {
+          type int32;
+       }
+    }
+}
+    
diff --git a/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleSubModule/test.yang b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleSubModule/test.yang
new file mode 100644
index 0000000..77401da
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleSubModule/test.yang
@@ -0,0 +1,28 @@
+module test {  
+    namespace "xpath:intra:single";  
+    prefix test ;  
+    
+    include test1;
+    organization "";  
+    contact "";  
+       
+    description   
+        "Defines basic service types for L3VPN service.";  
+       
+    revision "2015-12-16" {  
+        reference "";  
+    }  
+
+    container cont1 {
+       leaf leaf1 {
+          type int32;
+       }
+    }
+
+    augment /cont2 {
+       leaf a {
+          type int32;
+       }
+    }
+}
+    
diff --git a/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleSubModule/test1.yang b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleSubModule/test1.yang
new file mode 100644
index 0000000..47d4c5c
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleSubModule/test1.yang
@@ -0,0 +1,23 @@
+submodule test1 {  
+
+    belongs-to test {
+         prefix test;
+    }           
+      
+    organization "";  
+    contact "";  
+       
+    description   
+        "Defines basic service types for L3VPN service.";  
+       
+    revision "2015-12-16" {  
+        reference "";  
+    }  
+
+    container cont2 {
+       leaf leaf1 {
+          type int32;
+       }
+    }
+}
+    
diff --git a/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleUses/test.yang b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleUses/test.yang
new file mode 100644
index 0000000..c60668a
--- /dev/null
+++ b/utils/yangutils/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleUses/test.yang
@@ -0,0 +1,33 @@
+module test {  
+    namespace "xpath:intra:single";  
+    prefix test ;  
+      
+    organization "";  
+    contact "";  
+       
+    description   
+        "Defines basic service types for L3VPN service.";  
+       
+    revision "2015-12-16" {  
+        reference "";  
+    }  
+
+    grouping group1 {
+        container cont1 {
+           leaf leaf1 {
+             type int32;
+           }
+        }
+    }
+
+    container cont2 {
+         uses group1;
+    }
+
+    augment /cont2/group1/cont1 {
+       leaf a {
+          type int32;
+       }
+    }
+}
+