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
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.yang.model.api;
9
10 import org.opendaylight.controller.yang.common.QName;
11
12 import java.util.Set;
13
14 /**
15  * The ChoiceNode defines a set of alternatives. It consists of a number of
16  * branches defined as ChoiceCaseNode objects.
17  */
18 public interface ChoiceNode extends DataSchemaNode, AugmentationTarget {
19
20     /**
21      * @return ChoiceCaseNode objects defined in this node
22      */
23     Set<ChoiceCaseNode> getCases();
24
25     /**
26      * @param name
27      *            QName of seeked Choice Case Node
28      * @return child case node of this Choice if child with given name is
29      *         present, <code>null</code> otherwise
30      */
31     ChoiceCaseNode getCaseNodeByName(QName name);
32
33     /**
34      * @param name
35      *            name of seeked child as String
36      * @return child case node (or local name of case node) of this Choice if child with given name is
37      *         present, <code>null</code> otherwise
38      */
39     ChoiceCaseNode getCaseNodeByName(String name);
40
41     String getDefaultCase();
42
43 }