Added support to generate types from Choices and Cases added by augmentation.
[controller.git] / opendaylight / sal / yang-prototype / yang / yang-model-api / src / main / java / org / opendaylight / controller / yang / model / api / ChoiceNode.java
index ee4163da48c082531c4f4c99179d242b7f5c383c..140ef84c6c04f9b35a1f6d79d81f944c9355f891 100644 (file)
@@ -7,6 +7,8 @@
  */
 package org.opendaylight.controller.yang.model.api;
 
+import org.opendaylight.controller.yang.common.QName;
+
 import java.util.Set;
 
 /**
@@ -20,6 +22,22 @@ public interface ChoiceNode extends DataSchemaNode, AugmentationTarget {
      */
     Set<ChoiceCaseNode> getCases();
 
+    /**
+     * @param name
+     *            QName of seeked Choice Case Node
+     * @return child case node of this Choice if child with given name is
+     *         present, <code>null</code> otherwise
+     */
+    ChoiceCaseNode getCaseNodeByName(QName name);
+
+    /**
+     * @param name
+     *            name of seeked child as String
+     * @return child case node (or local name of case node) of this Choice if child with given name is
+     *         present, <code>null</code> otherwise
+     */
+    ChoiceCaseNode getCaseNodeByName(String name);
+
     String getDefaultCase();
 
 }