Interface DataNodeContainer

    • Method Detail

      • getTypeDefinitions

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

        Collection<? extends 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

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

        default @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

        @Deprecated(forRemoval=true)
        default @Nullable DataSchemaNode getDataChildByName​(QName name)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use dataChildByName(QName) or findDataChildByName(QName) instead. This method will be repurposed to assert existence in the next major release.
        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
      • 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 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

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