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;
16 * The ChoiceNode defines a set of alternatives. It consists of a number of
17 * branches defined as ChoiceCaseNode objects.
19 public interface ChoiceNode extends DataSchemaNode, AugmentationTarget {
22 * Returns cases of choice.
24 * @return set of ChoiceCaseNode objects defined in this node which
25 * represents set of arguments of the YANG <code>case</code>
26 * substatement of the <code>choice</code> statement
28 Set<ChoiceCaseNode> getCases();
32 * Returns the concrete case according to specified Q name.
35 * QName of seeked Choice Case Node
36 * @return child case node of this Choice if child with given name is
37 * present, <code>null</code> otherwise
39 ChoiceCaseNode getCaseNodeByName(QName name);
42 * Returns the concrete case according to specified name.
45 * name of seeked child as String
46 * @return child case node (or local name of case node) of this Choice if
47 * child with given name is present, <code>null</code> otherwise
49 ChoiceCaseNode getCaseNodeByName(String name);
53 * Returns name of case which is in the choice specified as default
55 * @return string with the name of case which is specified in the argument
56 * of the YANG <code>default</code> substatement of
57 * <code>choice</code> statement.
59 String getDefaultCase();