2 * Copyright (c) 2015 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;
11 import org.opendaylight.yangtools.yang.common.QName;
14 * A ChoiceSchemaNode defines a set of alternatives. It consists of a number of
15 * branches defined as ChoiceCaseSchemaNode objects.
17 public interface ChoiceSchemaNode extends DataSchemaNode, AugmentationTarget {
19 * Returns cases of choice.
21 * @return set of ChoiceCaseNode objects defined in this node which
22 * represents set of arguments of the YANG <code>case</code>
23 * substatement of the <code>choice</code> statement
25 Set<ChoiceCaseNode> getCases();
28 * Returns the concrete case according to specified Q name.
31 * QName of seeked Choice Case Node
32 * @return child case node of this Choice if child with given name is
33 * present, <code>null</code> otherwise
35 ChoiceCaseNode getCaseNodeByName(QName name);
38 * Returns the concrete case according to specified name.
41 * name of seeked child as String
42 * @return child case node (or local name of case node) of this Choice if
43 * child with given name is present, <code>null</code> otherwise
45 ChoiceCaseNode getCaseNodeByName(String name);
48 * Returns name of case which is in the choice specified as default.
50 * @return string with the name of case which is specified in the argument
51 * of the YANG <code>default</code> substatement of
52 * <code>choice</code> statement.
54 String getDefaultCase();