2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.model.api;
12 import org.opendaylight.yangtools.yang.common.QName;
15 * The ChoiceNode defines a set of alternatives. It consists of a number of
16 * branches defined as ChoiceCaseNode objects.
18 public interface ChoiceNode extends DataSchemaNode, AugmentationTarget {
21 * Returns cases of choice.
23 * @return set of ChoiceCaseNode objects defined in this node which
24 * represents set of arguments of the YANG <code>case</code>
25 * substatement of the <code>choice</code> statement
27 Set<ChoiceCaseNode> getCases();
31 * Returns the concrete case according to specified Q name.
34 * QName of seeked Choice Case Node
35 * @return child case node of this Choice if child with given name is
36 * present, <code>null</code> otherwise
38 ChoiceCaseNode getCaseNodeByName(QName name);
41 * Returns the concrete case according to specified name.
44 * name of seeked child as String
45 * @return child case node (or local name of case node) of this Choice if
46 * child with given name is present, <code>null</code> otherwise
48 ChoiceCaseNode getCaseNodeByName(String name);
52 * Returns name of case which is in the choice specified as default
54 * @return string with the name of case which is specified in the argument
55 * of the YANG <code>default</code> substatement of
56 * <code>choice</code> statement.
58 String getDefaultCase();