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();
29 * Returns the concrete case according to specified Q name.
32 * QName of seeked Choice Case Node
33 * @return child case node of this Choice if child with given name is
34 * present, <code>null</code> otherwise
36 ChoiceCaseNode getCaseNodeByName(QName name);
39 * Returns the concrete case according to specified name.
42 * name of seeked child as String
43 * @return child case node (or local name of case node) of this Choice if
44 * child with given name is present, <code>null</code> otherwise
46 ChoiceCaseNode getCaseNodeByName(String name);
50 * Returns name of case which is in the choice specified as default
52 * @return string with the name of case which is specified in the argument
53 * of the YANG <code>default</code> substatement of
54 * <code>choice</code> statement.
56 String getDefaultCase();