[ONOS-4650][ONOS-4726][ONOS-4727] [ONOS-4728]Implement must parser + when parser + feature + if-feature + revision defect fix

Change-Id: I0a3aee6c1c6b72ef7da7f7f565fd0f149fe3fd42
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/ResolvableType.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/ResolvableType.java
index 9521f41..058e947 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/ResolvableType.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/ResolvableType.java
@@ -29,5 +29,10 @@
     /**
      * Identifies the uses.
      */
-    YANG_USES
+    YANG_USES,
+
+    /**
+     * Identifies the if-feature.
+     */
+    YANG_IF_FEATURE
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAugment.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAugment.java
index 84f0173..ae9ff3a 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAugment.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangAugment.java
@@ -65,14 +65,14 @@
  *                | choice       | 7.9     | 0..n        |-child nodes      |
  *                | container    | 7.5     | 0..n        |-child nodes      |
  *                | description  | 7.19.3  | 0..1        |-string           |
- *                | if-feature   | 7.18.2  | 0..n        |-TODO             |
+ *                | if-feature   | 7.18.2  | 0..n        |-YangIfFeature    |
  *                | leaf         | 7.6     | 0..n        |-YangLeaf         |
  *                | leaf-list    | 7.7     | 0..n        |-YangLeafList     |
  *                | list         | 7.8     | 0..n        |-child nodes      |
  *                | reference    | 7.19.4  | 0..1        |-String           |
  *                | status       | 7.19.2  | 0..1        |-YangStatus       |
  *                | uses         | 7.12    | 0..n        |-child nodes      |
- *                | when         | 7.19.5  | 0..1        |-TODO             |
+ *                | when         | 7.19.5  | 0..1        |-YangWhen         |
  *                +--------------+---------+-------------+------------------+
  */
 
@@ -81,7 +81,7 @@
  */
 public class YangAugment
         extends YangNode
-        implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector {
+        implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector, YangWhenHolder, YangIfFeatureHolder {
 
     private static final long serialVersionUID = 806201602L;
 
@@ -121,6 +121,16 @@
     private YangStatusType status;
 
     /**
+     * When data of the node.
+     */
+    private YangWhen when;
+
+    /**
+     * List of if-feature.
+     */
+    private List<YangIfFeature> ifFeatureList;
+
+    /**
      * Create a YANG augment node.
      */
     public YangAugment() {
@@ -146,6 +156,26 @@
     }
 
     /**
+     * Returns the when.
+     *
+     * @return the when
+     */
+    @Override
+    public YangWhen getWhen() {
+        return when;
+    }
+
+    /**
+     * Sets the when.
+     *
+     * @param when the when to set
+     */
+    @Override
+    public void setWhen(YangWhen when) {
+        this.when = when;
+    }
+
+    /**
      * Returns the description.
      *
      * @return the description
@@ -341,4 +371,21 @@
         this.name = name;
     }
 
+    @Override
+    public List<YangIfFeature> getIfFeatureList() {
+        return ifFeatureList;
+    }
+
+    @Override
+    public void addIfFeatureList(YangIfFeature ifFeature) {
+        if (getIfFeatureList() == null) {
+            setIfFeatureList(new LinkedList<>());
+        }
+        getIfFeatureList().add(ifFeature);
+    }
+
+    @Override
+    public void setIfFeatureList(List<YangIfFeature> ifFeatureList) {
+        this.ifFeatureList = ifFeatureList;
+    }
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangCase.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangCase.java
index a00b77d..eb7d6fd 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangCase.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangCase.java
@@ -78,14 +78,14 @@
  *                | choice       | 7.9     | 0..n        |-child nodes      |
  *                | container    | 7.5     | 0..n        |-child nodes      |
  *                | description  | 7.19.3  | 0..1        |-string           |
- *                | if-feature   | 7.18.2  | 0..n        |-TODO             |
+ *                | if-feature   | 7.18.2  | 0..n        |-YangIfFeature    |
  *                | leaf         | 7.6     | 0..n        |-YangLeaf         |
  *                | leaf-list    | 7.7     | 0..n        |-YangLeafList     |
  *                | list         | 7.8     | 0..n        |-child nodes      |
  *                | reference    | 7.19.4  | 0..1        |-string           |
  *                | status       | 7.19.2  | 0..1        |-YangStatus       |
  *                | uses         | 7.12    | 0..n        |-child node       |
- *                | when         | 7.19.5  | 0..1        |-TODO             |
+ *                | when         | 7.19.5  | 0..1        |-YangWhen         |
  *                +--------------+---------+-------------+------------------+
  */
 
@@ -94,7 +94,8 @@
  */
 public class YangCase
         extends YangNode
-        implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector, YangAugmentationHolder {
+        implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector, YangAugmentationHolder,
+        YangWhenHolder, YangIfFeatureHolder {
 
     private static final long serialVersionUID = 806201603L;
 
@@ -131,6 +132,16 @@
     private YangStatusType status;
 
     /**
+     * When data of the node.
+     */
+    private YangWhen when;
+
+    /**
+     * List of if-feature.
+     */
+    private List<YangIfFeature> ifFeatureList;
+
+    /**
      * Creates a choice node.
      */
     public YangCase() {
@@ -138,6 +149,26 @@
     }
 
     /**
+     * Returns the when.
+     *
+     * @return the when
+     */
+    @Override
+    public YangWhen getWhen() {
+        return when;
+    }
+
+    /**
+     * Sets the when.
+     *
+     * @param when the when to set
+     */
+    @Override
+    public void setWhen(YangWhen when) {
+        this.when = when;
+    }
+
+    /**
      * Returns the case name.
      *
      * @return case name
@@ -343,4 +374,22 @@
         // Asks helper to detect colliding child.
         detectCollidingChildUtil(identifierName, dataType, this);
     }
+
+    @Override
+    public List<YangIfFeature> getIfFeatureList() {
+        return ifFeatureList;
+    }
+
+    @Override
+    public void addIfFeatureList(YangIfFeature ifFeature) {
+        if (getIfFeatureList() == null) {
+            setIfFeatureList(new LinkedList<>());
+        }
+        getIfFeatureList().add(ifFeature);
+    }
+
+    @Override
+    public void setIfFeatureList(List<YangIfFeature> ifFeatureList) {
+        this.ifFeatureList = ifFeatureList;
+    }
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangChoice.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangChoice.java
index 85ba107..5262119 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangChoice.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangChoice.java
@@ -15,6 +15,8 @@
  */
 package org.onosproject.yangutils.datamodel;
 
+import java.util.LinkedList;
+import java.util.List;
 import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
 import org.onosproject.yangutils.datamodel.utils.Parsable;
 import org.onosproject.yangutils.datamodel.utils.YangConstructType;
@@ -46,21 +48,23 @@
  *                | container    | 7.5     | 0..n        |-child case nodes |
  *                | default      | 7.9.3   | 0..1        |-string           |
  *                | description  | 7.19.3  | 0..1        |-string           |
- *                | if-feature   | 7.18.2  | 0..n        |-TODO             |
+ *                | if-feature   | 7.18.2  | 0..n        |-YangIfFeature    |
  *                | leaf         | 7.6     | 0..n        |-child case nodes |
  *                | leaf-list    | 7.7     | 0..n        |-child case nodes |
  *                | list         | 7.8     | 0..n        |-child case nodes |
  *                | mandatory    | 7.9.4   | 0..1        |-string           |
  *                | reference    | 7.19.4  | 0..1        |-string           |
  *                | status       | 7.19.2  | 0..1        |-string           |
- *                | when         | 7.19.5  | 0..1        |-TODO             |
+ *                | when         | 7.19.5  | 0..1        |-YangWhen         |
  *                +--------------+---------+-------------+------------------+
  */
+
 /**
  * Represents data model node to maintain information defined in YANG choice.
  */
 public class YangChoice extends YangNode
-        implements YangCommonInfo, Parsable, CollisionDetector, YangAugmentationHolder {
+        implements YangCommonInfo, Parsable, CollisionDetector, YangAugmentationHolder, YangWhenHolder,
+        YangIfFeatureHolder {
 
     private static final long serialVersionUID = 806201604L;
 
@@ -143,6 +147,16 @@
     private String defaultValueInString;
 
     /**
+     * When data of the node.
+     */
+    private YangWhen when;
+
+    /**
+     * List of if-feature.
+     */
+    private List<YangIfFeature> ifFeatureList;
+
+    /**
      * Create a choice node.
      */
     public YangChoice() {
@@ -150,6 +164,26 @@
     }
 
     /**
+     * Returns the when.
+     *
+     * @return the when
+     */
+    @Override
+    public YangWhen getWhen() {
+        return when;
+    }
+
+    /**
+     * Sets the when.
+     *
+     * @param when the when to set
+     */
+    @Override
+    public void setWhen(YangWhen when) {
+        this.when = when;
+    }
+
+    /**
      * Returns the choice name.
      *
      * @return choice name
@@ -365,4 +399,23 @@
             node = node.getNextSibling();
         }
     }
+
+    @Override
+    public List<YangIfFeature> getIfFeatureList() {
+        return ifFeatureList;
+    }
+
+    @Override
+    public void addIfFeatureList(YangIfFeature ifFeature) {
+        if (getIfFeatureList() == null) {
+            setIfFeatureList(new LinkedList<>());
+        }
+        getIfFeatureList().add(ifFeature);
+    }
+
+    @Override
+    public void setIfFeatureList(List<YangIfFeature> ifFeatureList) {
+        this.ifFeatureList = ifFeatureList;
+    }
+
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangContainer.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangContainer.java
index e23bf02..7bb34e2 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangContainer.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangContainer.java
@@ -70,17 +70,17 @@
  *                | container    | 7.5     | 0..n        | -child nodes     |
  *                | description  | 7.19.3  | 0..1        | -string          |
  *                | grouping     | 7.11    | 0..n        | -child nodes     |
- *                | if-feature   | 7.18.2  | 0..n        | -TODO            |
+ *                | if-feature   | 7.18.2  | 0..n        | -YangIfFeature   |
  *                | leaf         | 7.6     | 0..n        | -YangLeaf        |
  *                | leaf-list    | 7.7     | 0..n        | -YangLeafList    |
  *                | list         | 7.8     | 0..n        | -child nodes     |
- *                | must         | 7.5.3   | 0..n        | -TODO            |
+ *                | must         | 7.5.3   | 0..n        | -YangMust        |
  *                | presence     | 7.5.5   | 0..1        | -boolean         |
  *                | reference    | 7.19.4  | 0..1        | -string          |
  *                | status       | 7.19.2  | 0..1        | -YangStatus      |
  *                | typedef      | 7.3     | 0..n        | -child nodes     |
  *                | uses         | 7.12    | 0..n        | -child nodes     |
- *                | when         | 7.19.5  | 0..1        | -TODO            |
+ *                | when         | 7.19.5  | 0..1        | -YangWhen        |
  *                +--------------+---------+-------------+------------------+
  */
 
@@ -89,7 +89,8 @@
  */
 public class YangContainer
         extends YangNode
-        implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector, YangAugmentationHolder {
+        implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector, YangAugmentationHolder,
+        YangMustHolder, YangWhenHolder, YangIfFeatureHolder {
 
     private static final long serialVersionUID = 806201605L;
 
@@ -135,6 +136,21 @@
     private YangStatusType status = YangStatusType.CURRENT;
 
     /**
+     * List of must statement constraints.
+     */
+    private List<YangMust> mustConstraintList;
+
+    /**
+     * When data of the node.
+     */
+    private YangWhen when;
+
+    /**
+     * List of if-feature.
+     */
+    private List<YangIfFeature> ifFeatureList;
+
+    /**
      * Create a container node.
      */
     public YangContainer() {
@@ -142,6 +158,26 @@
     }
 
     /**
+     * Returns the when.
+     *
+     * @return the when
+     */
+    @Override
+    public YangWhen getWhen() {
+        return when;
+    }
+
+    /**
+     * Sets the when.
+     *
+     * @param when the when to set
+     */
+    @Override
+    public void setWhen(YangWhen when) {
+        this.when = when;
+    }
+
+    /**
      * Returns the YANG name of container.
      *
      * @return the name of container as defined in YANG file
@@ -445,4 +481,41 @@
                     + getName() + "\"");
         }
     }
+
+    @Override
+    public List<YangIfFeature> getIfFeatureList() {
+        return ifFeatureList;
+    }
+
+    @Override
+    public void addIfFeatureList(YangIfFeature ifFeature) {
+        if (getIfFeatureList() == null) {
+            setIfFeatureList(new LinkedList<>());
+        }
+        getIfFeatureList().add(ifFeature);
+    }
+
+    @Override
+    public void setIfFeatureList(List<YangIfFeature> ifFeatureList) {
+        this.ifFeatureList = ifFeatureList;
+    }
+
+    @Override
+    public List<YangMust> getListOfMust() {
+        return mustConstraintList;
+    }
+
+    @Override
+    public void setListOfMust(List<YangMust> mustConstraintList) {
+        this.mustConstraintList = mustConstraintList;
+    }
+
+    @Override
+    public void addMust(YangMust must) {
+        if (getListOfMust() == null) {
+            setListOfMust(new LinkedList<>());
+        }
+        getListOfMust().add(must);
+    }
+
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangFeature.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangFeature.java
new file mode 100644
index 0000000..f8f656b
--- /dev/null
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangFeature.java
@@ -0,0 +1,156 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yangutils.datamodel;
+
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
+import org.onosproject.yangutils.datamodel.utils.Parsable;
+import org.onosproject.yangutils.datamodel.utils.YangConstructType;
+
+/*
+ * Reference RFC 6020.
+ *
+ * The "feature" statement is used to define a mechanism by which
+ * portions of the schema are marked as conditional.  A feature name is
+ * defined that can later be referenced using the "if-feature" statement.
+ * Schema nodes tagged with a feature are ignored by the device unless
+ * the device supports the given feature.  This allows portions of the
+ * YANG module to be conditional based on conditions on the device.
+ * The model can represent the abilities of the device within the model,
+ * giving a richer model that allows for differing device abilities and roles.
+ *
+ * The argument to the "feature" statement is the name of the new
+ * feature, and follows the rules for identifiers.  This name is used by the
+ * "if-feature" statement to tie the schema nodes to the feature.
+ *
+ * The feature's Substatements
+ *
+ *                +--------------+---------+-------------+------------------+
+ *                | substatement | section | cardinality |data model mapping|
+ *                +--------------+---------+-------------+------------------+
+ *                | description  | 7.19.3  | 0..1        | -string          |
+ *                | if-feature   | 7.18.2  | 0..n        | -YangIfFeature   |
+ *                | reference    | 7.19.4  | 0..1        | -string          |
+ *                | status       | 7.19.2  | 0..1        | -YangStatus      |
+ *                +--------------+---------+-------------+------------------+
+ */
+
+/**
+ * Represents data model node to maintain information defined in YANG feature.
+ */
+public class YangFeature implements YangCommonInfo, Parsable, YangIfFeatureHolder, Serializable {
+
+    private static final long serialVersionUID = 806201635L;
+
+    /**
+     * Name of the feature.
+     */
+    private String name;
+
+    /**
+     * Description of feature.
+     */
+    private String description;
+
+    /**
+     * Reference of the feature.
+     */
+    private String reference;
+
+    /**
+     * Status of feature.
+     */
+    private YangStatusType statusType;
+
+    /**
+     * List of if-feature.
+     */
+    private List<YangIfFeature> ifFeatureList;
+
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    @Override
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    @Override
+    public String getReference() {
+        return reference;
+    }
+
+    @Override
+    public void setReference(String reference) {
+        this.reference = reference;
+    }
+
+    @Override
+    public YangStatusType getStatus() {
+        return statusType;
+    }
+
+    @Override
+    public void setStatus(YangStatusType status) {
+        this.statusType = status;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public YangConstructType getYangConstructType() {
+        return YangConstructType.FEATURE_DATA;
+    }
+
+    @Override
+    public void validateDataOnEntry() throws DataModelException {
+        //TODO : To be implemented
+    }
+
+    @Override
+    public void validateDataOnExit() throws DataModelException {
+        //TODO : To be implemented
+    }
+
+    @Override
+    public List<YangIfFeature> getIfFeatureList() {
+        return ifFeatureList;
+    }
+
+    @Override
+    public void addIfFeatureList(YangIfFeature ifFeature) {
+        if (getIfFeatureList() == null) {
+            setIfFeatureList(new LinkedList<>());
+        }
+        getIfFeatureList().add(ifFeature);
+    }
+
+    @Override
+    public void setIfFeatureList(List<YangIfFeature> ifFeatureList) {
+        this.ifFeatureList = ifFeatureList;
+    }
+}
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangFeatureHolder.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangFeatureHolder.java
new file mode 100644
index 0000000..a3e15f2
--- /dev/null
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangFeatureHolder.java
@@ -0,0 +1,44 @@
+/*Copyright 2016.year Open Networking Laboratory
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.*/
+
+package org.onosproject.yangutils.datamodel;
+
+import java.util.List;
+
+/**
+ * Abstraction of feature entity. It is used to abstract the data holders of feature.
+ */
+public interface YangFeatureHolder {
+
+    /**
+     * Returns the list of feature from data holder like container / list.
+     *
+     * @return the list of feature
+     */
+    List<YangFeature> getFeatureList();
+
+    /**
+     * Adds feature in feature list.
+     *
+     * @param feature the feature to be added
+     */
+    void addFeatureList(YangFeature feature);
+
+    /**
+     * Sets the list of feature.
+     *
+     * @param listOfFeature the list of feature to set
+     */
+    void setListOfFeature(List<YangFeature> listOfFeature);
+}
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangIfFeature.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangIfFeature.java
new file mode 100644
index 0000000..a44fbdc
--- /dev/null
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangIfFeature.java
@@ -0,0 +1,189 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yangutils.datamodel;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.List;
+import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
+import org.onosproject.yangutils.datamodel.utils.Parsable;
+import org.onosproject.yangutils.datamodel.utils.ResolvableStatus;
+import org.onosproject.yangutils.datamodel.utils.YangConstructType;
+
+/*
+ * Reference RFC 6020.
+ *
+ *  The "if-feature" statement makes its parent statement conditional.
+ *  The argument is the name of a feature, as defined by a "feature"
+ *  statement.  The parent statement is implemented by servers that
+ *  support this feature.  If a prefix is present on the feature name, it
+ *  refers to a feature defined in the module that was imported with that
+ *  prefix, or the local module if the prefix matches the local module's
+ *  prefix.  Otherwise, a feature with the matching name MUST be defined
+ *  in the current module or an included submodule.
+ *
+ *  Since submodules cannot include the parent module, any features in
+ *  the module that need to be exposed to submodules MUST be defined in a
+ *  submodule.  Submodules can then include this submodule to find the
+ *  definition of the feature.
+ */
+
+/**
+ * Represents data model node to maintain information defined in YANG if-feature.
+ */
+public class YangIfFeature implements Parsable, Resolvable, Serializable {
+
+    private static final long serialVersionUID = 806201635L;
+
+    /**
+     * if-feature argument.
+     */
+    YangNodeIdentifier name;
+
+    /**
+     * Referred feature information.
+     */
+    YangFeature referredFeature;
+
+    /**
+     * Referred feature parent information.
+     */
+    YangNode referredFeatureHolder;
+
+    /**
+     * Status of resolution. If completely resolved enum value is "RESOLVED",
+     * if not enum value is "UNRESOLVED", in case reference of grouping/typedef
+     * is added to uses/type but it's not resolved value of enum should be
+     * "INTRA_FILE_RESOLVED".
+     */
+    private ResolvableStatus resolvableStatus;
+
+    /**
+     * Returns referred feature holder.
+     *
+     * @return referred feature holder
+     */
+    public YangNode getReferredFeatureHolder() {
+        return referredFeatureHolder;
+    }
+
+    /**
+     * Sets the referred feature holder.
+     *
+     * @param referredFeatureHolder referred feature holder
+     */
+    public void setReferredFeatureHolder(YangNode referredFeatureHolder) {
+        this.referredFeatureHolder = referredFeatureHolder;
+    }
+
+    /**
+     * Returns prefix associated with identifier.
+     *
+     * @return prefix associated with identifier
+     */
+    public String getPrefix() {
+        return name.getPrefix();
+    }
+
+    /**
+     * Sets prefix associated with identifier.
+     *
+     * @param prefix prefix associated with identifier
+     */
+    public void setPrefix(String prefix) {
+        name.setPrefix(prefix);
+    }
+
+    /**
+     * Returns referred feature associated with if-feature.
+     *
+     * @return referred feature associated with if-feature
+     */
+    public YangFeature getReferredFeature() {
+        return referredFeature;
+    }
+
+    /**
+     * Sets referred feature associated with if-feature.
+     *
+     * @param referredFeature referred feature associated with if-feature
+     */
+    public void setReferredFeature(YangFeature referredFeature) {
+        this.referredFeature = referredFeature;
+    }
+
+    /**
+     * Returns the YANG name of if-feature.
+     *
+     * @return the name of if-feature as defined in YANG file
+     */
+    public YangNodeIdentifier getName() {
+        return name;
+    }
+
+    /**
+     * Sets the YANG name of if-feature.
+     *
+     * @param name the name of if-feature as defined in YANG file
+     */
+    public void setName(YangNodeIdentifier name) {
+        this.name = name;
+    }
+
+    @Override
+    public YangConstructType getYangConstructType() {
+        return YangConstructType.IF_FEATURE_DATA;
+    }
+
+    @Override
+    public void validateDataOnEntry() throws DataModelException {
+        // do nothing, no validation required for if-feature
+    }
+
+    @Override
+    public void validateDataOnExit() throws DataModelException {
+        // do nothing, no validation required for if-feature
+    }
+
+    @Override
+    public ResolvableStatus getResolvableStatus() {
+        return resolvableStatus;
+    }
+
+    @Override
+    public void setResolvableStatus(ResolvableStatus resolvableStatus) {
+        this.resolvableStatus = resolvableStatus;
+    }
+
+    @Override
+    public void resolve() throws DataModelException {
+        YangFeature feature = getReferredFeature();
+
+        // check whether feature has if-feature
+        List<YangIfFeature> ifFeatureList = feature.getIfFeatureList();
+        if (ifFeatureList != null && !ifFeatureList.isEmpty()) {
+            Iterator<YangIfFeature> ifFeatureIterator = ifFeatureList.iterator();
+            while (ifFeatureIterator.hasNext()) {
+                YangIfFeature ifFeature = ifFeatureIterator.next();
+                if (ifFeature.getResolvableStatus() != ResolvableStatus.RESOLVED) {
+                    setResolvableStatus(ResolvableStatus.INTRA_FILE_RESOLVED);
+                    return;
+                }
+            }
+        }
+    }
+}
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangIfFeatureHolder.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangIfFeatureHolder.java
new file mode 100644
index 0000000..46c3233
--- /dev/null
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangIfFeatureHolder.java
@@ -0,0 +1,44 @@
+/*Copyright 2016.year Open Networking Laboratory
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.*/
+
+package org.onosproject.yangutils.datamodel;
+
+import java.util.List;
+
+/**
+ * Abstraction of if-feature entity. It is used to abstract the data holders of if-feature.
+ */
+public interface YangIfFeatureHolder {
+
+    /**
+     * Returns the list of if-feature from data holder like container / list.
+     *
+     * @return the list of if-feature
+     */
+    List<YangIfFeature> getIfFeatureList();
+
+    /**
+     * Adds if-feature in if-feature list.
+     *
+     * @param ifFeature the if-feature to be added
+     */
+    void addIfFeatureList(YangIfFeature ifFeature);
+
+    /**
+     * Sets the list of if-feature.
+     *
+     * @param ifFeatureList the list of if-feature to set
+     */
+    void setIfFeatureList(List<YangIfFeature> ifFeatureList);
+}
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangImport.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangImport.java
index 0fcf663..f6405e1 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangImport.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangImport.java
@@ -16,6 +16,7 @@
 package org.onosproject.yangutils.datamodel;
 
 import java.io.Serializable;
+import java.util.Date;
 import java.util.Set;
 
 import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
@@ -61,7 +62,7 @@
  *                | substatement  | section | cardinality |data model mapping|
  *                +---------------+---------+-------------+------------------+
  *                | prefix        | 7.1.4   | 1           | string           |
- *                | revision-date | 7.1.5.1 | 0..1        | string           |
+ *                | revision-date | 7.1.5.1 | 0..1        | Date             |
  *                +---------------+---------+-------------+------------------+
  */
 
@@ -91,7 +92,7 @@
      * the most recent "revision" statement in the imported module. organization
      * which defined the YANG module.
      */
-    private String revision;
+    private Date revision;
 
     /**
      * Reference to node which is imported.
@@ -152,7 +153,7 @@
      *
      * @return the revision of the imported module
      */
-    public String getRevision() {
+    public Date getRevision() {
         return revision;
     }
 
@@ -161,7 +162,7 @@
      *
      * @param rev set the revision of the imported module
      */
-    public void setRevision(String rev) {
+    public void setRevision(Date rev) {
         revision = rev;
     }
 
@@ -245,7 +246,7 @@
      */
     public void addReferenceToImport(Set<YangNode> yangNodeSet) throws DataModelException {
         String importedModuleName = getModuleName();
-        String importedModuleRevision = getRevision();
+        Date importedModuleRevision = getRevision();
         YangNode moduleNode = null;
         /*
          * Find the imported module node for a given module name with a
@@ -266,7 +267,7 @@
 
         if (moduleNode != null) {
             if (moduleNode instanceof YangModule) {
-                if (getRevision() == null || getRevision().isEmpty()) {
+                if (getRevision() == null) {
                     setImportedNode(moduleNode);
                     return;
                 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangInclude.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangInclude.java
index 5970a24..48b796f 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangInclude.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangInclude.java
@@ -16,6 +16,7 @@
 package org.onosproject.yangutils.datamodel;
 
 import java.io.Serializable;
+import java.util.Date;
 import java.util.Set;
 
 import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
@@ -56,7 +57,7 @@
      * The include's "revision-date" statement is used to specify the exact
      * version of the submodule to import.
      */
-    private String revision;
+    private Date revision;
 
     /**
      * Reference to node which is included.
@@ -98,7 +99,7 @@
      *
      * @return the revision
      */
-    public String getRevision() {
+    public Date getRevision() {
         return revision;
     }
 
@@ -107,7 +108,7 @@
      *
      * @param revision the revision to set
      */
-    public void setRevision(String revision) {
+    public void setRevision(Date revision) {
         this.revision = revision;
     }
 
@@ -182,7 +183,7 @@
      */
     public YangSubModule addReferenceToInclude(Set<YangNode> yangNodeSet) throws DataModelException {
         String includedSubModuleName = getSubModuleName();
-        String includedSubModuleRevision = getRevision();
+        Date includedSubModuleRevision = getRevision();
         YangNode subModuleNode = null;
 
         /*
@@ -204,7 +205,7 @@
 
         if (subModuleNode != null) {
             if (subModuleNode instanceof YangSubModule) {
-                if (getRevision() == null || getRevision().isEmpty()) {
+                if (getRevision() == null) {
                     setIncludedNode(subModuleNode);
                     return (YangSubModule) subModuleNode;
                 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java
index 0391518..0c717a6 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java
@@ -17,7 +17,8 @@
 package org.onosproject.yangutils.datamodel;
 
 import java.io.Serializable;
-
+import java.util.LinkedList;
+import java.util.List;
 import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
 import org.onosproject.yangutils.datamodel.utils.Parsable;
 import org.onosproject.yangutils.datamodel.utils.YangConstructType;
@@ -43,16 +44,16 @@
  *       | substatement | section | cardinality |data model mapping|
  *       +--------------+---------+-------------+------------------+
  *       | config       | 7.19.1  | 0..1        | - boolean        |
- *       | default      | 7.6.4   | 0..1        | - TODO           |
+ *       | default      | 7.6.4   | 0..1        | - string         |
  *       | description  | 7.19.3  | 0..1        | - string         |
- *       | if-feature   | 7.18.2  | 0..n        | - TODO           |
+ *       | if-feature   | 7.18.2  | 0..n        | - YangIfFeature  |
  *       | mandatory    | 7.6.5   | 0..1        | - boolean        |
- *       | must         | 7.5.3   | 0..n        | - TODO           |
+ *       | must         | 7.5.3   | 0..n        | - YangMust       |
  *       | reference    | 7.19.4  | 0..1        | - string         |
  *       | status       | 7.19.2  | 0..1        | - YangStatus     |
  *       | type         | 7.6.3   | 1           | - YangType       |
  *       | units        | 7.3.3   | 0..1        | - String         |
- *       | when         | 7.19.5  | 0..1        | - TODO           |
+ *       | when         | 7.19.5  | 0..1        | - YangWhen       |
  *       +--------------+---------+-------------+------------------+
  */
 
@@ -60,7 +61,8 @@
  * Represents leaf data represented in YANG.
  */
 public class YangLeaf
-        implements YangCommonInfo, Parsable, Cloneable, Serializable {
+        implements YangCommonInfo, Parsable, Cloneable, Serializable,
+        YangMustHolder, YangIfFeatureHolder, YangWhenHolder {
 
     private static final long serialVersionUID = 806201635L;
 
@@ -111,11 +113,26 @@
     private String defaultValueInString;
 
     /**
+     * When data of the leaf.
+     */
+    private YangWhen when;
+
+    /**
      * YANG Node in which the leaf is contained.
      */
     private transient YangLeavesHolder containedIn;
 
     /**
+     * List of must statement constraints.
+     */
+    private List<YangMust> mustConstraintList;
+
+    /**
+     * List of if-feature.
+     */
+    private List<YangIfFeature> ifFeatureList;
+
+    /**
      * Creates a YANG leaf.
      */
     public YangLeaf() {
@@ -158,6 +175,26 @@
     }
 
     /**
+     * Returns the when.
+     *
+     * @return the when
+     */
+    @Override
+    public YangWhen getWhen() {
+        return when;
+    }
+
+    /**
+     * Sets the when.
+     *
+     * @param when the when to set
+     */
+    @Override
+    public void setWhen(YangWhen when) {
+        this.when = when;
+    }
+
+    /**
      * Returns the description.
      *
      * @return the description
@@ -346,4 +383,40 @@
         // TODO auto-generated method stub, to be implemented by parser
 
     }
+
+    @Override
+    public List<YangMust> getListOfMust() {
+        return mustConstraintList;
+    }
+
+    @Override
+    public void setListOfMust(List<YangMust> mustConstraintList) {
+        this.mustConstraintList = mustConstraintList;
+    }
+
+    @Override
+    public void addMust(YangMust must) {
+        if (getListOfMust() == null) {
+            setListOfMust(new LinkedList<>());
+        }
+        getListOfMust().add(must);
+    }
+
+    @Override
+    public List<YangIfFeature> getIfFeatureList() {
+        return ifFeatureList;
+    }
+
+    @Override
+    public void addIfFeatureList(YangIfFeature ifFeature) {
+        if (getIfFeatureList() == null) {
+            setIfFeatureList(new LinkedList<>());
+        }
+        getIfFeatureList().add(ifFeature);
+    }
+
+    @Override
+    public void setIfFeatureList(List<YangIfFeature> ifFeatureList) {
+        this.ifFeatureList = ifFeatureList;
+    }
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangLeafList.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangLeafList.java
index 2ce44fb..febae0e 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangLeafList.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangLeafList.java
@@ -17,7 +17,8 @@
 package org.onosproject.yangutils.datamodel;
 
 import java.io.Serializable;
-
+import java.util.LinkedList;
+import java.util.List;
 import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
 import org.onosproject.yangutils.datamodel.utils.Parsable;
 import org.onosproject.yangutils.datamodel.utils.YangConstructType;
@@ -39,16 +40,16 @@
  *                +--------------+---------+-------------+------------------+
  *                | config       | 7.19.1  | 0..1        | -boolean         |
  *                | description  | 7.19.3  | 0..1        | -string          |
- *                | if-feature   | 7.18.2  | 0..n        | -TODO            |
+ *                | if-feature   | 7.18.2  | 0..n        | -YangIfFeature   |
  *                | max-elements | 7.7.4   | 0..1        | -int             |
  *                | min-elements | 7.7.3   | 0..1        | -int             |
- *                | must         | 7.5.3   | 0..n        | -TODO            |
+ *                | must         | 7.5.3   | 0..n        | -YangMust        |
  *                | ordered-by   | 7.7.5   | 0..1        | -TODO            |
  *                | reference    | 7.19.4  | 0..1        | -string          |
  *                | status       | 7.19.2  | 0..1        | -YangStatus      |
  *                | type         | 7.4     | 1           | -YangType        |
  *                | units        | 7.3.3   | 0..1        | -string          |
- *                | when         | 7.19.5  | 0..1        | -TODO            |
+ *                | when         | 7.19.5  | 0..1        | -YangWhen        |
  *                +--------------+---------+-------------+------------------+
  */
 
@@ -56,7 +57,8 @@
  * Represents leaf-list data represented in YANG.
  */
 public class YangLeafList
-        implements YangCommonInfo, Parsable, Cloneable, Serializable {
+        implements YangCommonInfo, Parsable, Cloneable, Serializable,
+        YangMustHolder, YangWhenHolder, YangIfFeatureHolder {
 
     private static final long serialVersionUID = 806201637L;
 
@@ -133,6 +135,21 @@
     private transient YangLeavesHolder containedIn;
 
     /**
+     * List of must statement constraints.
+     */
+    private List<YangMust> mustConstraintList;
+
+    /**
+     * When data of the leaf.
+     */
+    private YangWhen when;
+
+    /**
+     * List of if-feature.
+     */
+    private List<YangIfFeature> ifFeatureList;
+
+    /**
      * Creates a YANG leaf-list.
      */
     public YangLeafList() {
@@ -175,6 +192,26 @@
     }
 
     /**
+     * Returns the when.
+     *
+     * @return the when
+     */
+    @Override
+    public YangWhen getWhen() {
+        return when;
+    }
+
+    /**
+     * Sets the when.
+     *
+     * @param when the when to set
+     */
+    @Override
+    public void setWhen(YangWhen when) {
+        this.when = when;
+    }
+
+    /**
      * Returns the description.
      *
      * @return the description
@@ -363,4 +400,40 @@
         // TODO auto-generated method stub, to be implemented by parser
 
     }
+
+    @Override
+    public List<YangIfFeature> getIfFeatureList() {
+        return ifFeatureList;
+    }
+
+    @Override
+    public void addIfFeatureList(YangIfFeature ifFeature) {
+        if (getIfFeatureList() == null) {
+            setIfFeatureList(new LinkedList<>());
+        }
+        getIfFeatureList().add(ifFeature);
+    }
+
+    @Override
+    public void setIfFeatureList(List<YangIfFeature> ifFeatureList) {
+        this.ifFeatureList = ifFeatureList;
+    }
+
+    @Override
+    public List<YangMust> getListOfMust() {
+        return mustConstraintList;
+    }
+
+    @Override
+    public void setListOfMust(List<YangMust> mustConstraintList) {
+        this.mustConstraintList = mustConstraintList;
+    }
+
+    @Override
+    public void addMust(YangMust must) {
+        if (getListOfMust() == null) {
+            setListOfMust(new LinkedList<>());
+        }
+        getListOfMust().add(must);
+    }
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangList.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangList.java
index 632c5b7..a1e13ac 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangList.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangList.java
@@ -46,21 +46,21 @@
  *                | container    | 7.5     | 0..n        |-child nodes      |
  *                | description  | 7.19.3  | 0..1        |-string           |
  *                | grouping     | 7.11    | 0..n        |-child nodes      |
- *                | if-feature   | 7.18.2  | 0..n        |-TODO             |
+ *                | if-feature   | 7.18.2  | 0..n        |-YangIfFeature    |
  *                | key          | 7.8.2   | 0..1        |-String list      |
  *                | leaf         | 7.6     | 0..n        |-YangLeaf         |
  *                | leaf-list    | 7.7     | 0..n        |-YangLeafList     |
  *                | list         | 7.8     | 0..n        |-child nodes      |
  *                | max-elements | 7.7.4   | 0..1        |-int              |
  *                | min-elements | 7.7.3   | 0..1        |-int              |
- *                | must         | 7.5.3   | 0..n        |-TODO             |
+ *                | must         | 7.5.3   | 0..n        |-YangMust         |
  *                | ordered-by   | 7.7.5   | 0..1        |-TODO             |
  *                | reference    | 7.19.4  | 0..1        |-string           |
  *                | status       | 7.19.2  | 0..1        |-YangStatus       |
  *                | typedef      | 7.3     | 0..n        |-child nodes      |
  *                | unique       | 7.8.3   | 0..n        |-TODO             |
- *                | uses         | 7.12    | 0..n        |-child nodes(TODO)|
- *                | when         | 7.19.5  | 0..1        |-TODO             |
+ *                | uses         | 7.12    | 0..n        |-child nodes      |
+ *                | when         | 7.19.5  | 0..1        |-YangWhen         |
  *                +--------------+---------+-------------+------------------+
  */
 
@@ -69,7 +69,8 @@
  */
 public class YangList
         extends YangNode
-        implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector, YangAugmentationHolder {
+        implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector, YangAugmentationHolder,
+        YangMustHolder, YangIfFeatureHolder {
 
     private static final long serialVersionUID = 806201609L;
 
@@ -165,10 +166,24 @@
     /**
      * Status of the node.
      */
-
     private YangStatusType status = YangStatusType.CURRENT;
 
     /**
+     * List of must statement constraints.
+     */
+    private List<YangMust> mustConstraintList;
+
+    /**
+     * When data of the node.
+     */
+    private YangWhen when;
+
+    /**
+     * List of if-feature.
+     */
+    private List<YangIfFeature> ifFeatureList;
+
+    /**
      * Creates a YANG list object.
      */
     public YangList() {
@@ -176,6 +191,24 @@
     }
 
     /**
+     * Returns the when.
+     *
+     * @return the when
+     */
+    public YangWhen getWhen() {
+        return when;
+    }
+
+    /**
+     * Sets the when.
+     *
+     * @param when the when to set
+     */
+    public void setWhen(YangWhen when) {
+        this.when = when;
+    }
+
+    /**
      * Returns the YANG list name.
      *
      * @return YANG list name
@@ -643,4 +676,40 @@
         return false;
         // TODO When grouping linking is done this method has to be modified.
     }
+
+    @Override
+    public List<YangIfFeature> getIfFeatureList() {
+        return ifFeatureList;
+    }
+
+    @Override
+    public void addIfFeatureList(YangIfFeature ifFeature) {
+        if (getIfFeatureList() == null) {
+            setIfFeatureList(new LinkedList<>());
+        }
+        getIfFeatureList().add(ifFeature);
+    }
+
+    @Override
+    public void setIfFeatureList(List<YangIfFeature> ifFeatureList) {
+        this.ifFeatureList = ifFeatureList;
+    }
+
+    @Override
+    public List<YangMust> getListOfMust() {
+        return mustConstraintList;
+    }
+
+    @Override
+    public void setListOfMust(List<YangMust> mustConstraintList) {
+        this.mustConstraintList = mustConstraintList;
+    }
+
+    @Override
+    public void addMust(YangMust must) {
+        if (getListOfMust() == null) {
+            setListOfMust(new LinkedList<>());
+        }
+        getListOfMust().add(must);
+    }
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangModule.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangModule.java
index f14cfeb..16348e5 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangModule.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangModule.java
@@ -74,7 +74,7 @@
 public class YangModule
         extends YangNode
         implements YangLeavesHolder, YangDesc, YangReference, Parsable, CollisionDetector, YangReferenceResolver,
-        RpcNotificationContainer {
+        RpcNotificationContainer, YangFeatureHolder {
 
     private static final long serialVersionUID = 806201610L;
 
@@ -85,7 +85,7 @@
 
     /**
      * Reference:RFC 6020.
-     * <p>
+     *
      * The "contact" statement provides contact information for the module. The
      * argument is a string that is used to specify contact information for the
      * person or persons to whom technical queries concerning this module should
@@ -96,7 +96,7 @@
 
     /**
      * Reference:RFC 6020.
-     * <p>
+     *
      * The "description" statement takes as an argument a string that contains a
      * human-readable textual description of this definition. The text is
      * provided in a language (or languages) chosen by the module developer; for
@@ -125,13 +125,18 @@
     private List<YangLeafList> listOfLeafList;
 
     /**
+     * List of feature at root level in the module.
+     */
+    private List<YangFeature> listOfFeature;
+
+    /**
      * Name space of the module.
      */
     private YangNameSpace nameSpace;
 
     /**
      * Reference:RFC 6020.
-     * <p>
+     *
      * The "organization" statement defines the party responsible for this
      * module. The argument is a string that is used to specify a textual
      * description of the organization(s) under whose auspices this module was
@@ -201,6 +206,11 @@
     private List<YangResolutionInfo> usesResolutionList;
 
     /**
+     * if-feature resolution list.
+     */
+    private List<YangResolutionInfo> ifFeatureResolutionList;
+
+    /**
      * Creates a YANG node of module type.
      */
     public YangModule() {
@@ -208,6 +218,7 @@
         super(YangNodeType.MODULE_NODE);
         derivedTypeResolutionList = new LinkedList<>();
         usesResolutionList = new LinkedList<>();
+        ifFeatureResolutionList = new LinkedList<>();
         importList = new LinkedList<YangImport>();
         includeList = new LinkedList<YangInclude>();
         listOfLeaf = new LinkedList<YangLeaf>();
@@ -373,6 +384,24 @@
         getListOfLeafList().add(leafList);
     }
 
+    @Override
+    public List<YangFeature> getFeatureList() {
+        return listOfFeature;
+    }
+
+    @Override
+    public void addFeatureList(YangFeature feature) {
+        if (getFeatureList() == null) {
+            setListOfFeature(new LinkedList<>());
+        }
+        getFeatureList().add(feature);
+    }
+
+    @Override
+    public void setListOfFeature(List<YangFeature> listOfFeature) {
+        this.listOfFeature = listOfFeature;
+    }
+
     /**
      * Returns the name space of module elements.
      *
@@ -558,10 +587,11 @@
     public List<YangResolutionInfo> getUnresolvedResolutionList(ResolvableType type) {
         if (type == ResolvableType.YANG_DERIVED_DATA_TYPE) {
             return derivedTypeResolutionList;
-        } else {
+        } else if (type == ResolvableType.YANG_USES) {
             return usesResolutionList;
+        } else {
+            return ifFeatureResolutionList;
         }
-
     }
 
     @Override
@@ -571,6 +601,8 @@
             derivedTypeResolutionList.add(resolutionInfo);
         } else if (type == ResolvableType.YANG_USES) {
             usesResolutionList.add(resolutionInfo);
+        } else if (type == ResolvableType.YANG_IF_FEATURE) {
+            ifFeatureResolutionList.add(resolutionInfo);
         }
     }
 
@@ -581,6 +613,8 @@
             derivedTypeResolutionList = resolutionList;
         } else if (type == ResolvableType.YANG_USES) {
             usesResolutionList = resolutionList;
+        } else if (type == ResolvableType.YANG_IF_FEATURE) {
+            ifFeatureResolutionList.add((YangResolutionInfo) resolutionList);
         }
 
     }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangMust.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangMust.java
index ead6c5d..c579003 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangMust.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangMust.java
@@ -55,7 +55,7 @@
     /**
      * Constraint info.
      */
-    private String constratint;
+    private String constraint;
 
     /**
      * Description string.
@@ -78,17 +78,17 @@
      *
      * @return the constraint
      */
-    public String getConstratint() {
-        return constratint;
+    public String getConstraint() {
+        return constraint;
     }
 
     /**
      * Sets the constraint.
      *
-     * @param constratint the constraint to set
+     * @param constraint the constraint to set
      */
-    public void setConstratint(String constratint) {
-        this.constratint = constratint;
+    public void setConstraint(String constraint) {
+        this.constraint = constraint;
     }
 
     /**
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangMustHolder.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangMustHolder.java
new file mode 100644
index 0000000..badd3d9
--- /dev/null
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangMustHolder.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yangutils.datamodel;
+
+import java.util.List;
+
+/**
+ * Abstraction of must entity. It is used to abstract the data holders of must.
+ */
+public interface YangMustHolder {
+
+    /**
+     * Returns the list of must from data holder like container / list.
+     *
+     * @return the list of must
+     */
+    List<YangMust> getListOfMust();
+
+    /**
+     * Sets the list of must.
+     *
+     * @param mustConstraintList the list of must to set
+     */
+    void setListOfMust(List<YangMust> mustConstraintList);
+
+    /**
+     * Adds must in data holder like container / list.
+     *
+     * @param must the must to be added
+     */
+    void addMust(YangMust must);
+}
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangNotification.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangNotification.java
index 6fba390..62ee584 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangNotification.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangNotification.java
@@ -60,7 +60,7 @@
  *      | container    | 7.5     | 0..n        | -child nodes     |
  *      | description  | 7.19.3  | 0..1        | -string          |
  *      | grouping     | 7.11    | 0..n        | -child nodes     |
- *      | if-feature   | 7.18.2  | 0..n        | -TODO            |
+ *      | if-feature   | 7.18.2  | 0..n        | -YangIfFeature   |
  *      | leaf         | 7.6     | 0..n        | -YangLeaf        |
  *      | leaf-list    | 7.7     | 0..n        | -YangLeafList    |
  *      | list         | 7.8     | 0..n        | -child nodes     |
@@ -76,7 +76,8 @@
  */
 public class YangNotification
         extends YangNode
-        implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector, YangAugmentationHolder {
+        implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector, YangAugmentationHolder,
+        YangIfFeatureHolder {
 
     private static final long serialVersionUID = 806201611L;
 
@@ -111,6 +112,11 @@
     private YangStatusType status = YangStatusType.CURRENT;
 
     /**
+     * List of if-feature.
+     */
+    private List<YangIfFeature> ifFeatureList;
+
+    /**
      * Create a notification node.
      */
     public YangNotification() {
@@ -221,4 +227,22 @@
     public void setStatus(YangStatusType status) {
         this.status = status;
     }
+
+    @Override
+    public List<YangIfFeature> getIfFeatureList() {
+        return ifFeatureList;
+    }
+
+    @Override
+    public void addIfFeatureList(YangIfFeature ifFeature) {
+        if (getIfFeatureList() == null) {
+            setIfFeatureList(new LinkedList<>());
+        }
+        getIfFeatureList().add(ifFeature);
+    }
+
+    @Override
+    public void setIfFeatureList(List<YangIfFeature> ifFeatureList) {
+        this.ifFeatureList = ifFeatureList;
+    }
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangRevision.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangRevision.java
index aa326fd..0a5342c 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangRevision.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangRevision.java
@@ -16,7 +16,7 @@
 package org.onosproject.yangutils.datamodel;
 
 import java.io.Serializable;
-
+import java.util.Date;
 import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
 import org.onosproject.yangutils.datamodel.utils.Parsable;
 import org.onosproject.yangutils.datamodel.utils.YangConstructType;
@@ -41,6 +41,7 @@
  *                | reference    | 7.19.4  | 0..1        |sring            |
  *                +--------------+---------+-------------+------------------+
  */
+
 /**
  * Represents the information about the revision.
  */
@@ -51,7 +52,7 @@
     /**
      * Revision date. Date string in the format "YYYY-MM-DD"
      */
-    private String revDate;
+    private Date revDate;
 
     /**
      * Description of revision.
@@ -74,7 +75,7 @@
      *
      * @return the revision date
      */
-    public String getRevDate() {
+    public Date getRevDate() {
         return revDate;
     }
 
@@ -83,7 +84,7 @@
      *
      * @param revDate the revision date to set
      */
-    public void setRevDate(String revDate) {
+    public void setRevDate(Date revDate) {
         this.revDate = revDate;
     }
 
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangRpc.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangRpc.java
index 62b8dd1..72060ad 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangRpc.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangRpc.java
@@ -16,6 +16,8 @@
 
 package org.onosproject.yangutils.datamodel;
 
+import java.util.LinkedList;
+import java.util.List;
 import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
 import org.onosproject.yangutils.datamodel.utils.Parsable;
 import org.onosproject.yangutils.datamodel.utils.YangConstructType;
@@ -44,7 +46,7 @@
  *    +--------------+---------+-------------+------------------+
  *    | description  | 7.19.3  | 0..1        | -string          |
  *    | grouping     | 7.11    | 0..n        | -child nodes     |
- *    | if-feature   | 7.18.2  | 0..n        | -TODO            |
+ *    | if-feature   | 7.18.2  | 0..n        | -YangIfFeature   |
  *    | input        | 7.13.2  | 0..1        | -child nodes     |
  *    | output       | 7.13.3  | 0..1        | -child nodes     |
  *    | reference    | 7.19.4  | 0..1        | -string          |
@@ -57,7 +59,7 @@
  * Represents data model node to maintain information defined in YANG rpc.
  */
 public class YangRpc extends YangNode implements YangCommonInfo, Parsable,
-        CollisionDetector {
+        CollisionDetector, YangIfFeatureHolder {
 
     private static final long serialVersionUID = 806201613L;
 
@@ -82,6 +84,11 @@
     private YangStatusType status = YangStatusType.CURRENT;
 
     /**
+     * List of if-feature.
+     */
+    private List<YangIfFeature> ifFeatureList;
+
+    /**
      * Create a rpc node.
      */
     public YangRpc() {
@@ -156,4 +163,22 @@
     public void setStatus(YangStatusType status) {
         this.status = status;
     }
+
+    @Override
+    public List<YangIfFeature> getIfFeatureList() {
+        return ifFeatureList;
+    }
+
+    @Override
+    public void addIfFeatureList(YangIfFeature ifFeature) {
+        if (getIfFeatureList() == null) {
+            setIfFeatureList(new LinkedList<>());
+        }
+        getIfFeatureList().add(ifFeature);
+    }
+
+    @Override
+    public void setIfFeatureList(List<YangIfFeature> ifFeatureList) {
+        this.ifFeatureList = ifFeatureList;
+    }
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
index 8e1ba9d..be7a0c0 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
@@ -57,7 +57,7 @@
  *                | description  | 7.19.3  | 0..1        | - string         |
  *                | deviation    | 7.18.3  | 0..n        | - TODO           |
  *                | extension    | 7.17    | 0..n        | - TODO           |
- *                | feature      | 7.18.1  | 0..n        | - TODO           |
+ *                | feature      | 7.18.1  | 0..n        | - YangFeature    |
  *                | grouping     | 7.11    | 0..n        | - child nodes    |
  *                | identity     | 7.16    | 0..n        | - TODO           |
  *                | import       | 7.1.5   | 0..n        | - YangImport     |
@@ -82,7 +82,7 @@
 public class YangSubModule
         extends YangNode
         implements YangLeavesHolder, YangDesc, YangReference, Parsable, CollisionDetector, YangReferenceResolver,
-        RpcNotificationContainer {
+        RpcNotificationContainer, YangFeatureHolder {
 
     private static final long serialVersionUID = 806201614L;
 
@@ -133,6 +133,11 @@
     private List<YangLeafList> listOfLeafList;
 
     /**
+     * List of feature at root level in the module.
+     */
+    private List<YangFeature> listOfFeature;
+
+    /**
      * Organization owner of the sub-module.
      */
     private String organization;
@@ -199,12 +204,18 @@
     private List<YangResolutionInfo> usesResolutionList;
 
     /**
+     * if-feature resolution list.
+     */
+    private List<YangResolutionInfo> ifFeatureResolutionList;
+
+    /**
      * Creates a sub module node.
      */
     public YangSubModule() {
         super(YangNodeType.SUB_MODULE_NODE);
         derivedTypeResolutionList = new LinkedList<>();
         usesResolutionList = new LinkedList<>();
+        ifFeatureResolutionList = new LinkedList<>();
         importList = new LinkedList<YangImport>();
         includeList = new LinkedList<YangInclude>();
         listOfLeaf = new LinkedList<YangLeaf>();
@@ -538,8 +549,10 @@
     public List<YangResolutionInfo> getUnresolvedResolutionList(ResolvableType type) {
         if (type == ResolvableType.YANG_DERIVED_DATA_TYPE) {
             return derivedTypeResolutionList;
-        } else {
+        } else if (type == ResolvableType.YANG_USES) {
             return usesResolutionList;
+        } else {
+            return ifFeatureResolutionList;
         }
     }
 
@@ -550,6 +563,8 @@
             derivedTypeResolutionList.add(resolutionInfo);
         } else if (type == ResolvableType.YANG_USES) {
             usesResolutionList.add(resolutionInfo);
+        } else if (type == ResolvableType.YANG_IF_FEATURE) {
+            ifFeatureResolutionList.add(resolutionInfo);
         }
     }
 
@@ -560,6 +575,8 @@
             derivedTypeResolutionList = resolutionList;
         } else if (type == ResolvableType.YANG_USES) {
             usesResolutionList = resolutionList;
+        } else if (type == ResolvableType.YANG_IF_FEATURE) {
+            ifFeatureResolutionList = resolutionList;
         }
 
     }
@@ -601,4 +618,22 @@
             yangImport.addReferenceToImport(yangNodeSet);
         }
     }
+
+    @Override
+    public List<YangFeature> getFeatureList() {
+        return listOfFeature;
+    }
+
+    @Override
+    public void addFeatureList(YangFeature feature) {
+        if (getFeatureList() == null) {
+            setListOfFeature(new LinkedList<>());
+        }
+        getFeatureList().add(feature);
+    }
+
+    @Override
+    public void setListOfFeature(List<YangFeature> listOfFeature) {
+        this.listOfFeature = listOfFeature;
+    }
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangUses.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangUses.java
index b0d9ed9..6f7137d 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangUses.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangUses.java
@@ -48,11 +48,11 @@
  *                +--------------+---------+-------------+------------------+
  *                | augment      | 7.15    | 0..1        | -child nodes     |
  *                | description  | 7.19.3  | 0..1        | -string          |
- *                | if-feature   | 7.18.2  | 0..n        | -TODO            |
+ *                | if-feature   | 7.18.2  | 0..n        | -YangIfFeature   |
  *                | refine       | 7.12.2  | 0..1        | -TODO            |
  *                | reference    | 7.19.4  | 0..1        | -string          |
  *                | status       | 7.19.2  | 0..1        | -YangStatus      |
- *                | when         | 7.19.5  | 0..1        | -TODO            |
+ *                | when         | 7.19.5  | 0..1        | -YangWhen        |
  *                +--------------+---------+-------------+------------------+
  */
 
@@ -61,7 +61,8 @@
  */
 public class YangUses
         extends YangNode
-        implements YangCommonInfo, Parsable, Resolvable, CollisionDetector {
+        implements YangCommonInfo, Parsable, Resolvable, CollisionDetector, YangWhenHolder,
+        YangIfFeatureHolder {
 
     private static final long serialVersionUID = 806201617L;
 
@@ -91,6 +92,16 @@
     private YangStatusType status;
 
     /**
+     * When data of the node.
+     */
+    private YangWhen when;
+
+    /**
+     * List of if-feature.
+     */
+    private List<YangIfFeature> ifFeatureList;
+
+    /**
      * Status of resolution. If completely resolved enum value is "RESOLVED",
      * if not enum value is "UNRESOLVED", in case reference of grouping/typedef
      * is added to uses/type but it's not resolved value of enum should be
@@ -144,6 +155,26 @@
     }
 
     /**
+     * Returns the when.
+     *
+     * @return the when
+     */
+    @Override
+    public YangWhen getWhen() {
+        return when;
+    }
+
+    /**
+     * Sets the when.
+     *
+     * @param when the when to set
+     */
+    @Override
+    public void setWhen(YangWhen when) {
+        this.when = when;
+    }
+
+    /**
      * Returns the description.
      *
      * @return the description
@@ -503,4 +534,22 @@
     public List<List<YangLeafList>> getUsesResolvedListOfLeafList() {
         return resolvedGroupingLeafLists;
     }
+
+    @Override
+    public List<YangIfFeature> getIfFeatureList() {
+        return ifFeatureList;
+    }
+
+    @Override
+    public void addIfFeatureList(YangIfFeature ifFeature) {
+        if (getIfFeatureList() == null) {
+            setIfFeatureList(new LinkedList<>());
+        }
+        getIfFeatureList().add(ifFeature);
+    }
+
+    @Override
+    public void setIfFeatureList(List<YangIfFeature> ifFeatureList) {
+        this.ifFeatureList = ifFeatureList;
+    }
 }
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangWhen.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangWhen.java
new file mode 100644
index 0000000..c508681
--- /dev/null
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangWhen.java
@@ -0,0 +1,161 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.yangutils.datamodel;
+
+import java.io.Serializable;
+import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
+import org.onosproject.yangutils.datamodel.utils.Parsable;
+import org.onosproject.yangutils.datamodel.utils.YangConstructType;
+
+/*
+ * Reference RFC 6020.
+ *
+ * The "when" statement makes its parent data definition statement
+ * conditional.  The node defined by the parent data definition
+ * statement is only valid when the condition specified by the "when"
+ * statement is satisfied.
+ *
+ * The statement's argument is an XPath expression, which is used to formally
+ * specify this condition.  If the XPath  expression conceptually evaluates to
+ * "true" for a particular instance, then the node defined by the parent data
+ * definition statement is valid; otherwise, it is not.
+ *
+ *  The when's sub-statements
+ *
+ *                +---------------+---------+-------------+------------------+
+ *                | substatement  | section | cardinality |data model mapping|
+ *                +---------------+---------+-------------+------------------+
+ *                | description   | 7.19.3  | 0..1        | -string          |
+ *                | reference     | 7.19.4  | 0..1        | -string          |
+ *                +---------------+---------+-------------+------------------+
+ */
+
+/**
+ * Represents information defined in YANG when.
+ */
+public class YangWhen implements YangDesc, YangReference, Parsable, Serializable {
+
+    private static final long serialVersionUID = 806201646L;
+
+    /**
+     * When condition info.
+     */
+    private String condition;
+
+    /**
+     * Description string.
+     */
+    private String description;
+
+    /**
+     * Reference string.
+     */
+    private String reference;
+
+    /**
+     * Creates a YANG when restriction.
+     */
+    public YangWhen() {
+    }
+
+    /**
+     * Returns the condition.
+     *
+     * @return the condition
+     */
+    public String getCondition() {
+        return condition;
+    }
+
+    /**
+     * Sets the condition.
+     *
+     * @param condition the condition to set
+     */
+    public void setCondition(String condition) {
+        this.condition = condition;
+    }
+
+    /**
+     * Returns the description.
+     *
+     * @return the description
+     */
+    @Override
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the description.
+     *
+     * @param description set the description
+     */
+    @Override
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * Returns the textual reference.
+     *
+     * @return the reference
+     */
+    @Override
+    public String getReference() {
+        return reference;
+    }
+
+    /**
+     * Sets the textual reference.
+     *
+     * @param reference the reference to set
+     */
+    @Override
+    public void setReference(String reference) {
+        this.reference = reference;
+    }
+
+    /**
+     * Returns the type of the parsed data.
+     *
+     * @return returns WHEN_DATA
+     */
+    @Override
+    public YangConstructType getYangConstructType() {
+        return YangConstructType.WHEN_DATA;
+    }
+
+    /**
+     * Validates the data on entering the corresponding parse tree node.
+     *
+     * @throws DataModelException a violation of data model rules
+     */
+    @Override
+    public void validateDataOnEntry() throws DataModelException {
+        // TODO auto-generated method stub, to be implemented by parser
+    }
+
+    /**
+     * Validates the data on exiting the corresponding parse tree node.
+     *
+     * @throws DataModelException a violation of data model rules
+     */
+    @Override
+    public void validateDataOnExit() throws DataModelException {
+        // TODO auto-generated method stub, to be implemented by parser
+    }
+}
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangWhenHolder.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangWhenHolder.java
new file mode 100644
index 0000000..1c7df4d
--- /dev/null
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangWhenHolder.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.yangutils.datamodel;
+
+/**
+ * Abstraction of when entity. It is used to abstract the data holders of when.
+ */
+public interface YangWhenHolder {
+
+    /**
+     * Returns the when.
+     *
+     * @return the when
+     */
+    YangWhen getWhen();
+
+    /**
+     * Sets the when.
+     *
+     * @param when the when to set
+     */
+    void setWhen(YangWhen when);
+}
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java
index 659773f..4b8a3a1 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java
@@ -21,6 +21,7 @@
 
 import org.onosproject.yangutils.datamodel.CollisionDetector;
 import org.onosproject.yangutils.datamodel.ResolvableType;
+import org.onosproject.yangutils.datamodel.YangIfFeature;
 import org.onosproject.yangutils.datamodel.YangLeaf;
 import org.onosproject.yangutils.datamodel.YangLeafList;
 import org.onosproject.yangutils.datamodel.YangLeavesHolder;
@@ -29,13 +30,14 @@
 import org.onosproject.yangutils.datamodel.YangResolutionInfo;
 import org.onosproject.yangutils.datamodel.YangRpc;
 import org.onosproject.yangutils.datamodel.YangType;
+import org.onosproject.yangutils.datamodel.YangUses;
 import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
 
-
 /**
  * Represents utilities for data model tree.
  */
 public final class DataModelUtils {
+
     /**
      * Creates a new data model tree utility.
      */
@@ -161,11 +163,15 @@
                 .getEntityToResolve() instanceof YangType) {
             resolutionNode.addToResolutionList(resolutionInfo,
                     ResolvableType.YANG_DERIVED_DATA_TYPE);
-        } else {
+        } else if (resolutionInfo.getEntityToResolveInfo()
+                .getEntityToResolve() instanceof YangUses) {
             resolutionNode.addToResolutionList(resolutionInfo,
                     ResolvableType.YANG_USES);
+        } else if (resolutionInfo.getEntityToResolveInfo()
+                .getEntityToResolve() instanceof YangIfFeature) {
+            resolutionNode.addToResolutionList(resolutionInfo,
+                    ResolvableType.YANG_IF_FEATURE);
         }
-
     }
 
     /**
diff --git a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/ResolvableStatus.java b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/ResolvableStatus.java
index d476c8b..d31f67b 100644
--- a/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/ResolvableStatus.java
+++ b/utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/utils/ResolvableStatus.java
@@ -46,6 +46,11 @@
      * Identifies that resolvable entity is inter file linked (i.e. complete
      * linking with external files).
      */
-    INTER_FILE_LINKED
+    INTER_FILE_LINKED,
+
+    /**
+     * Identifies that resolvable entity is referred node is not defined.
+     */
+    UNDEFINED
 
 }