[ONOS-4636]YANG Grouping linking bug fix + YANG Code review comment fix
Change-Id: I68ee8dd08266a02593e217cef1a9bb010037d673
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java b/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java
index f59cdcc..9adeff7 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java
@@ -58,7 +58,7 @@
* Represents leaf data represented in YANG.
*/
public class YangLeaf
- implements YangCommonInfo, Parsable {
+ implements YangCommonInfo, Parsable, Cloneable {
/**
* Name of leaf.
@@ -107,6 +107,11 @@
private String defaultValueInString;
/**
+ * YANG Node in which the leaf is contained.
+ */
+ YangLeavesHolder containedIn;
+
+ /**
* Creates a YANG leaf.
*/
public YangLeaf() {
@@ -281,6 +286,30 @@
}
/**
+ * Retrieves the YANG node in which the leaf is defined.
+ *
+ * @return the YANG node in which the leaf is defined
+ */
+ public YangLeavesHolder getContainedIn() {
+ return containedIn;
+ }
+
+ /**
+ * Assigns the YANG node in which the leaf is defined.
+ *
+ * @param containedIn the YANG node in which the leaf is defined
+ */
+ public void setContainedIn(YangLeavesHolder containedIn) {
+ this.containedIn = containedIn;
+ }
+
+ @Override
+ public YangLeaf clone()
+ throws CloneNotSupportedException {
+ return (YangLeaf) super.clone();
+ }
+
+ /**
* Returns the type of the parsed data.
*
* @return returns LEAF_DATA