Bug 6022: Deviation statement is not fully available in the YANG parser output
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / Deviation.java
index 2a29cb83801a17f4d9ac340fe8fe1c415c697c3f..75b20b192de21a826dfef440878a6543f48937a7 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.yangtools.yang.model.api;
 
-import com.google.common.base.Preconditions;
 import java.util.List;
 
 /**
@@ -20,28 +19,6 @@ import java.util.List;
  */
 public interface Deviation {
 
-    /**
-     * Enum describing YANG deviation 'deviate' statement. It defines how the
-     * device's implementation of the target node deviates from its original
-     * definition.
-     */
-    enum Deviate {
-        NOT_SUPPORTED("not-supported"), ADD("add"), REPLACE("replace"), DELETE("delete");
-
-        private final String keyword;
-
-        Deviate(final String keyword) {
-            this.keyword = Preconditions.checkNotNull(keyword);
-        }
-
-        /**
-         * @return String that corresponds to the yang keyword.
-         */
-        public String getKeyword() {
-            return keyword;
-        }
-    }
-
     /**
      * @return SchemaPath that identifies the node in the schema tree where a
      *         deviation from the module occurs.
@@ -49,9 +26,16 @@ public interface Deviation {
     SchemaPath getTargetPath();
 
     /**
-     * @return deviate statement of this deviation
+     *
+     * @return List of all deviate statements defined in this deviation
+     */
+    List<DeviateDefinition> getDeviates();
+
+    /**
+     *
+     * @return textual description of this deviation
      */
-    Deviate getDeviate();
+    String getDescription();
 
     /**
      * @return textual cross-reference to an external document that provides