[ONOS-3902, ONOS-3903, ONOS-3904] string type, integer type derrived type
Change-Id: I8279e93fcb7dfb82491cc09057c9d75165add68d
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java b/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java
index d2837da..764f498 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java
@@ -56,9 +56,8 @@
/**
* Leaf data represented in YANG.
*
- * @param <T> YANG data type
*/
-public class YangLeaf<T> implements YangCommonInfo, Parsable {
+public class YangLeaf implements YangCommonInfo, Parsable {
/**
* Name of leaf.
@@ -88,7 +87,7 @@
/**
* Status of leaf in YANG definition.
*/
- private YangStatusType status;
+ private YangStatusType status = YangStatusType.CURRENT;
/**
* Textual units info.
@@ -98,7 +97,7 @@
/**
* Data type of the leaf.
*/
- private YangType<T> dataType;
+ private YangType<?> dataType;
/**
* Default constructor to create a YANG leaf.
@@ -121,7 +120,7 @@
* @param leafName the leaf name to set.
*/
public void setLeafName(String leafName) {
- this.name = leafName;
+ name = leafName;
}
/**
@@ -147,6 +146,7 @@
*
* @return the description.
*/
+ @Override
public String getDescription() {
return description;
}
@@ -156,6 +156,7 @@
*
* @param description set the description.
*/
+ @Override
public void setDescription(String description) {
this.description = description;
}
@@ -183,6 +184,7 @@
*
* @return the reference.
*/
+ @Override
public String getReference() {
return reference;
}
@@ -192,6 +194,7 @@
*
* @param reference the reference to set.
*/
+ @Override
public void setReference(String reference) {
this.reference = reference;
}
@@ -201,6 +204,7 @@
*
* @return the status.
*/
+ @Override
public YangStatusType getStatus() {
return status;
}
@@ -210,6 +214,7 @@
*
* @param status the status to set.
*/
+ @Override
public void setStatus(YangStatusType status) {
this.status = status;
}
@@ -237,7 +242,7 @@
*
* @return the data type.
*/
- public YangType<T> getDataType() {
+ public YangType<?> getDataType() {
return dataType;
}
@@ -246,7 +251,7 @@
*
* @param dataType the data type to set.
*/
- public void setDataType(YangType<T> dataType) {
+ public void setDataType(YangType<?> dataType) {
this.dataType = dataType;
}
@@ -255,6 +260,7 @@
*
* @return returns LEAF_DATA.
*/
+ @Override
public ParsableDataType getParsableDataType() {
return ParsableDataType.LEAF_DATA;
}
@@ -264,6 +270,7 @@
*
* @throws DataModelException a violation of data model rules.
*/
+ @Override
public void validateDataOnEntry() throws DataModelException {
// TODO auto-generated method stub, to be implemented by parser
@@ -274,6 +281,7 @@
*
* @throws DataModelException a violation of data model rules.
*/
+ @Override
public void validateDataOnExit() throws DataModelException {
// TODO auto-generated method stub, to be implemented by parser