Interface DataNodeContainer

All Known Subinterfaces:
AnnotationSchemaNodeAwareSchemaContext, AugmentationSchemaNode, CaseSchemaNode, ContainerLike, ContainerSchemaNode, EffectiveModelContext, EffectiveStatementMixins.DataNodeContainerMixin<A,D>, EffectiveStatementMixins.OperationContainerMixin<D>, GroupingDefinition, InputSchemaNode, ListSchemaNode, Module, ModuleLike, NotificationDefinition, OutputSchemaNode, SchemaContext, Submodule, YangDataSchemaNode
All Known Implementing Classes:
AbstractContainerEffectiveStatement, AbstractEffectiveModule, AbstractGroupingEffectiveStatement, AbstractSchemaContext, AugmentEffectiveStatementImpl, ContainerLikeCompat, DeclaredCaseEffectiveStatement, DeclaredInputEffectiveStatement, DeclaredOutputEffectiveStatement, EffectiveAugmentationSchema, EffectiveSchemaContext, EmptyContainerEffectiveStatement, EmptyGroupingEffectiveStatement, EmptyListEffectiveStatement, FilteringSchemaContextProxy, NotificationEffectiveStatementImpl, RegularContainerEffectiveStatement, RegularGroupingEffectiveStatement, RegularListEffectiveStatement, SimpleSchemaContext, UndeclaredCaseEffectiveStatement, UndeclaredInputEffectiveStatement, UndeclaredOutputEffectiveStatement

public interface DataNodeContainer
Node which can contains other nodes.
  • Method Details

    • getTypeDefinitions

      @NonNull Collection<? extends @NonNull TypeDefinition<?>> getTypeDefinitions()
      Returns set of all newly defined types within this DataNodeContainer.
      Returns:
      typedef statements in lexicographical order
    • getChildNodes

      @NonNull Collection<? extends @NonNull 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 rather DataSchemaNodes, hence ChoiceSchemaNode and CaseSchemaNode are present instead of their children. This is consistent with schema tree.

      Returns:
      child nodes in lexicographical order
    • getGroupings

      @NonNull Collection<? extends @NonNull GroupingDefinition> getGroupings()
      Returns set of all groupings defined within this DataNodeContainer.
      Returns:
      grouping statements in lexicographical order
    • dataChildByName

      @Nullable DataSchemaNode dataChildByName(QName name)
      Returns the child node corresponding to the specified name.

      Note that the nodes searched are NOT data nodes, but rather DataSchemaNodes, hence ChoiceSchemaNode and CaseSchemaNode are returned instead of their matching children. This is consistent with schema tree.

      Parameters:
      name - QName of child
      Returns:
      child node of this DataNodeContainer if child with given name is present, null otherwise
      Throws:
      NullPointerException - if name is null
    • getDataChildByName

      default @NonNull DataSchemaNode getDataChildByName(QName name)
      Returns the child node corresponding to the specified name.

      Note that the nodes searched are NOT data nodes, but rather DataSchemaNodes, hence ChoiceSchemaNode and CaseSchemaNode are returned instead of their matching children. This is consistent with schema tree.

      Parameters:
      name - QName of child
      Returns:
      child node of this DataNodeContainer
      Throws:
      NullPointerException - if name is null
      VerifyException - if the child does not exist
    • findDataChildByName

      default Optional<DataSchemaNode> findDataChildByName(QName name)
      Returns the child node corresponding to the specified name.

      Note that the nodes searched are NOT data nodes, but rather DataSchemaNodes, hence ChoiceSchemaNode and CaseSchemaNode 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 - if name 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 rather DataSchemaNodes, hence ChoiceSchemaNode and CaseSchemaNode are returned instead of their matching children.

      Parameters:
      first - QName of first child
      others - 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

      @NonNull Collection<? extends @NonNull UsesNode> getUses()
      Returns grouping nodes used ny this container.
      Returns:
      Set of all uses nodes defined within this DataNodeContainer
    • findDataTreeChild

      default Optional<DataSchemaNode> findDataTreeChild(QName name)
      Returns a data node identified by a QName. This method is distinct from findDataChildByName(QName) in that it skips over ChoiceSchemaNodes and CaseSchemaNodes, hence mirroring layout of the data tree, not schema 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 - if name is null
    • findDataTreeChild

      default Optional<DataSchemaNode> findDataTreeChild(QName... path)
      Returns a data node identified by a series of QNames. This is equivalent to incrementally calling findDataTreeChild(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 - if path is determined to go beyond a not-container-nor-list node.
      NoSuchElementException - if path is empty
      NullPointerException - if path is null or contains a null element
    • findDataTreeChild

      default Optional<DataSchemaNode> findDataTreeChild(Iterable<QName> path)
      Returns a data node identified by a series of QNames. This is equivalent to incrementally calling findDataTreeChild(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 - if path is determined to go beyond a not-container-nor-list node.
      NoSuchElementException - if path is empty
      NullPointerException - if path is null or contains a null element