Interface ChoiceSchemaNode

All Superinterfaces:
AddedByUsesAware, AugmentationTarget, CopyableNode, DataSchemaNode, DocumentedNode, DocumentedNode.WithStatus, EffectiveStatementEquivalent<ChoiceEffectiveStatement>, MandatoryAware, SchemaNode, WhenConditionAware
All Known Implementing Classes:
AbstractChoiceEffectiveStatement, EmptyChoiceEffectiveStatement, RegularChoiceEffectiveStatement

A ChoiceSchemaNode defines a set of alternatives. It consists of a number of branches defined as CaseSchemaNode objects.
  • Method Details

    • getCases

      Collection<? extends @NonNull CaseSchemaNode> getCases()
      Returns cases of choice, keyed by their SchemaNode.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 YANG case substatement of the choice statement.
    • findCaseNode

      default Optional<? extends CaseSchemaNode> findCaseNode(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 - 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 its CaseSchemaNodes, 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 of choice statement.