Interface DataNodeContainer
-
- All Known Subinterfaces:
AnnotationSchemaNodeAwareSchemaContext
,AugmentationSchemaNode
,CaseSchemaNode
,ContainerSchemaNode
,EffectiveModelContext
,GroupingDefinition
,ListSchemaNode
,Module
,NotificationDefinition
,SchemaContext
- All Known Implementing Classes:
AbstractEffectiveContainerSchemaNode
,AbstractEffectiveDocumentedDataNodeContainer
,AbstractEffectiveModule
,AbstractEffectiveMustConstraintAwareSimpleDataNodeContainer
,AbstractEffectiveOperationContainerSchemaNode
,AbstractEffectiveSimpleDataNodeContainer
,AbstractSchemaContext
,EffectiveAugmentationSchema
,EffectiveSchemaContext
,FilteringSchemaContextProxy
,OperationAsContainer
,SimpleSchemaContext
,SingleChildDataNodeContainer
public interface DataNodeContainer
Node which can contains other nodes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description Optional<DataSchemaNode>
findDataChildByName(QName name)
Returns the child node corresponding to the specified name.default Optional<DataSchemaNode>
findDataChildByName(QName first, QName... others)
Returns the child node corresponding to the specified name.default Optional<DataSchemaNode>
findDataTreeChild(Iterable<QName> path)
Returns adata node
identified by a series of QNames.default Optional<DataSchemaNode>
findDataTreeChild(QName name)
Returns adata node
identified by a QName.default Optional<DataSchemaNode>
findDataTreeChild(QName... path)
Returns adata node
identified by a series of QNames.Collection<DataSchemaNode>
getChildNodes()
Returns set of all child nodes defined within this DataNodeContainer.default @Nullable DataSchemaNode
getDataChildByName(QName name)
Deprecated.UsefindDataChildByName(QName)
instead.Set<GroupingDefinition>
getGroupings()
Returns set of all groupings defined within this DataNodeContainer.Set<TypeDefinition<?>>
getTypeDefinitions()
Returns set of all newly defined types within this DataNodeContainer.Set<UsesNode>
getUses()
Returns grouping nodes used ny this container.
-
-
-
Method Detail
-
getTypeDefinitions
Set<TypeDefinition<?>> getTypeDefinitions()
Returns set of all newly defined types within this DataNodeContainer.- Returns:
- typedef statements in lexicographical order
-
getChildNodes
Collection<DataSchemaNode> getChildNodes()
Returns set of all child nodes defined within this DataNodeContainer. Although the return type is a collection, each node is guaranteed to be present at most once.Note that the nodes returned are NOT
data nodes
, but ratherDataSchemaNode
s, henceChoiceSchemaNode
andCaseSchemaNode
are present instead of their children. This is consistent withschema tree
.- Returns:
- child nodes in lexicographical order
-
getGroupings
Set<GroupingDefinition> getGroupings()
Returns set of all groupings defined within this DataNodeContainer.- Returns:
- grouping statements in lexicographical order
-
getDataChildByName
@Deprecated default @Nullable DataSchemaNode getDataChildByName(QName name)
Deprecated.UsefindDataChildByName(QName)
instead.Returns the child node corresponding to the specified name.Note that the nodes searched are NOT
data nodes
, but ratherDataSchemaNode
s, henceChoiceSchemaNode
andCaseSchemaNode
are returned instead of their matching children. This is consistent withschema tree
.- Parameters:
name
- QName of child- Returns:
- child node of this DataNodeContainer if child with given name is present, null otherwise
- Throws:
NullPointerException
- ifname
is null
-
findDataChildByName
Optional<DataSchemaNode> findDataChildByName(QName name)
Returns the child node corresponding to the specified name.Note that the nodes searched are NOT
data nodes
, but ratherDataSchemaNode
s, henceChoiceSchemaNode
andCaseSchemaNode
are returned instead of their matching children.- Parameters:
name
- QName of child- Returns:
- child node of this DataNodeContainer if child with given name is present, empty otherwise
- Throws:
NullPointerException
- ifname
is null
-
findDataChildByName
default Optional<DataSchemaNode> findDataChildByName(QName first, QName... others)
Returns the child node corresponding to the specified name.Note that the nodes searched are NOT
data nodes
, but ratherDataSchemaNode
s, henceChoiceSchemaNode
andCaseSchemaNode
are returned instead of their matching children.- Parameters:
first
- QName of first childothers
- QNames of subsequent children- Returns:
- child node of this DataNodeContainer if child with given name is present, empty otherwise
- Throws:
NullPointerException
- if any argument is null
-
getUses
Set<UsesNode> getUses()
Returns grouping nodes used ny this container.- Returns:
- Set of all uses nodes defined within this DataNodeContainer
-
findDataTreeChild
@Beta default Optional<DataSchemaNode> findDataTreeChild(QName name)
Returns adata node
identified by a QName. This method is distinct fromfindDataChildByName(QName)
in that it skips overChoiceSchemaNode
s andCaseSchemaNode
s, hence mirroring layout of thedata tree
, notschema tree
.- Parameters:
name
- QName identifier of the data node- Returns:
- Direct or indirect child of this DataNodeContainer which is a
data node
, empty otherwise - Throws:
NullPointerException
- ifname
is null
-
findDataTreeChild
@Beta default Optional<DataSchemaNode> findDataTreeChild(QName... path)
Returns adata node
identified by a series of QNames. This is equivalent to incrementally callingfindDataTreeChild(QName)
.- Parameters:
path
- Series of QNames towards identifying the requested data node- Returns:
- Direct or indirect child of this DataNodeContainer which is a
data node
, empty otherwise - Throws:
IllegalArgumentException
- ifpath
is determined to go beyond a not-container-nor-list node.NoSuchElementException
- ifpath
is emptyNullPointerException
- ifpath
is null or contains a null
-
findDataTreeChild
@Beta default Optional<DataSchemaNode> findDataTreeChild(Iterable<QName> path)
Returns adata node
identified by a series of QNames. This is equivalent to incrementally callingfindDataTreeChild(QName)
.- Parameters:
path
- Series of QNames towards identifying the requested data node- Returns:
- Direct or indirect child of this DataNodeContainer which is a
data node
, empty otherwise - Throws:
IllegalArgumentException
- ifpath
is determined to go beyond a not-container-nor-list node.NoSuchElementException
- ifpath
is emptyNullPointerException
- ifpath
is null or contains a null
-
-