Interface ChoiceSchemaNode
-
- All Superinterfaces:
AddedByUsesAware
,AugmentationTarget
,CopyableNode
,DataSchemaNode
,DocumentedNode
,DocumentedNode.WithStatus
,EffectiveStatementEquivalent<ChoiceEffectiveStatement>
,MandatoryAware
,SchemaNode
,WhenConditionAware
- All Known Implementing Classes:
ChoiceEffectiveStatementImpl
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 ChoiceCaseSchemaNode objects.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.model.api.DocumentedNode
DocumentedNode.WithStatus
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Optional<? extends CaseSchemaNode>
findCase(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()
.Optional<CaseSchemaNode>
getDefaultCase()
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
getPath, getQName
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.WhenConditionAware
getWhenCondition
-
-
-
-
Method Detail
-
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 ChoiceCaseNode objects defined in this node which represents set of arguments of the YANG
case
substatement of thechoice
statement.
-
findCase
default Optional<? extends CaseSchemaNode> findCase(QName qname)
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
- if qname is null
-
findCaseNodes
@Beta default List<? extends @NonNull CaseSchemaNode> findCaseNodes(String localname)
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
- if localname is null
-
findDataSchemaChild
@Beta default Optional<DataSchemaNode> findDataSchemaChild(QName qname)
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
- if qname is null
-
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.
-
-