Interface ChoiceSchemaNode
- All Superinterfaces:
AddedByUsesAware
,AugmentationTarget
,CopyableNode
,DataSchemaNode
,DocumentedNode
,DocumentedNode.WithStatus
,EffectiveStatementEquivalent<ChoiceEffectiveStatement>
,MandatoryAware
,SchemaNode
,WhenConditionAware
- All Known Implementing Classes:
AbstractChoiceEffectiveStatement
,EmptyChoiceEffectiveStatement
,RegularChoiceEffectiveStatement
public interface ChoiceSchemaNode
extends DataSchemaNode, AugmentationTarget, MandatoryAware, EffectiveStatementEquivalent<ChoiceEffectiveStatement>
A ChoiceSchemaNode defines a set of alternatives. It consists of a number of branches defined as
CaseSchemaNode
objects.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
DocumentedNode.WithStatus
-
Method Summary
Modifier and TypeMethodDescriptiondefault Optional<? extends CaseSchemaNode>
findCaseNode
(QName qname) Returns the concrete case according to specified Q name.default List<? extends @NonNull CaseSchemaNode>
findCaseNodes
(String localName) Returns the concrete cases according to specified name, disregarding their namespace.default Optional<DataSchemaNode>
findDataSchemaChild
(QName qname) Find a specific data schema child, if present.Collection<? extends @NonNull CaseSchemaNode>
getCases()
Returns cases of choice, keyed by theirSchemaNode.getQName()
.Returns name of case which is in the choice specified as default.Methods inherited from interface org.opendaylight.yangtools.yang.model.api.AddedByUsesAware
isAddedByUses
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.AugmentationTarget
getAvailableAugmentations
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.CopyableNode
isAugmenting
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.DataSchemaNode
effectiveConfig, isConfiguration
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
getDescription, getReference, getUnknownSchemaNodes
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode.WithStatus
getStatus
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.EffectiveStatementEquivalent
asEffectiveStatement
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.MandatoryAware
isMandatory
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.SchemaNode
getQName
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.WhenConditionAware
getWhenCondition
-
Method Details
-
getCases
Collection<? extends @NonNull CaseSchemaNode> getCases()Returns cases of choice, keyed by theirSchemaNode.getQName()
. Returned map does not contain null keys nor values.- Returns:
- set of
CaseSchemaNode
objects defined in this node which represents set of arguments of the YANGcase
substatement of thechoice
statement.
-
findCaseNode
Returns the concrete case according to specified Q name.- Parameters:
qname
- QName of sought Choice Case Node- Returns:
- child case node of this Choice if child with given name is present, empty otherwise.
- Throws:
NullPointerException
-qname
isnull
-
findCaseNodes
Returns the concrete cases according to specified name, disregarding their namespace.- Parameters:
localName
- local name of sought child as String- Returns:
- child case nodes matching specified local name, empty list if no match is found.
- Throws:
NullPointerException
- iflocalName
isnull
-
findDataSchemaChild
Find a specific data schema child, if present. This method searches among itsCaseSchemaNode
s, potentially recursing to nested choices.- Parameters:
qname
- QName of sought data schema node- Returns:
- Matching node, or empty if no match is found
- Throws:
NullPointerException
- ifqname
isnull
-
getDefaultCase
Optional<CaseSchemaNode> getDefaultCase()Returns name of case which is in the choice specified as default.- Returns:
- string with the name of case which is specified in the argument of the YANG
default
substatement ofchoice
statement.
-