X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-model-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fmodel%2Fapi%2FChoiceNode.java;fp=yang%2Fyang-model-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fmodel%2Fapi%2FChoiceNode.java;h=ac658a57fca595cee6a9c6eda7fb7f624795a75d;hb=5c1f875f69e35248aa4115c429bd962160beeef4;hp=0000000000000000000000000000000000000000;hpb=80562b826a79ad9a832be902427e54359df7725b;p=yangtools.git diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ChoiceNode.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ChoiceNode.java new file mode 100644 index 0000000000..ac658a57fc --- /dev/null +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ChoiceNode.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.yangtools.yang.model.api; + +import java.util.Set; + +import org.opendaylight.yangtools.yang.common.QName; + +/** + * The ChoiceNode defines a set of alternatives. It consists of a number of + * branches defined as ChoiceCaseNode objects. + */ +public interface ChoiceNode extends DataSchemaNode, AugmentationTarget { + + /** + * @return ChoiceCaseNode objects defined in this node + */ + Set getCases(); + + /** + * @param name + * QName of seeked Choice Case Node + * @return child case node of this Choice if child with given name is + * present, null otherwise + */ + ChoiceCaseNode getCaseNodeByName(QName name); + + /** + * @param name + * name of seeked child as String + * @return child case node (or local name of case node) of this Choice if child with given name is + * present, null otherwise + */ + ChoiceCaseNode getCaseNodeByName(String name); + + String getDefaultCase(); + +}