Class NavuChoice

Object
com.tailf.navu.NavuChoice

public class NavuChoice extends Object
This class handles YANG presentation and setting of YANG choices.
  • Method Details

    • containsNode

      public boolean containsNode(MaapiSchemas.CSNode node)
      Checks if a node is contained directly within this choice.
      Parameters:
      node - - the schema node to check for.
      Returns:
      true if is contained.
    • containsChoice

      public boolean containsChoice(MaapiSchemas.CSChoice choice)
      Checks if a choice is contained in a case of this choice.
      Parameters:
      choice - - the schema choice to check for.
      Returns:
      true if is contained.
    • containsCase

      public boolean containsCase(MaapiSchemas.CSCase cAse)
      Checks if a given case node is a case of this choice.
      Parameters:
      cAse - the case to check.
      Returns:
      true if the case is contained.
    • entrySet

      Deprecated.
      Returns:
      a set of contained nodes with matching cases.
    • getCaseNodes

      public List<MaapiSchemas.CSNode> getCaseNodes(String casename)
      Parameters:
      casename -
      Returns:
      a set of CSNode for a give case name
    • getCaseChoices

      public List<MaapiSchemas.CSChoice> getCaseChoices(String casename)
      Parameters:
      casename -
      Returns:
      a set of CSNode for a give case name
    • getCase

      Returns the case in which a node is contained within.
      Parameters:
      node - the node to get the case for.
      Returns:
      a case matching the given node.
    • getCase

      public MaapiSchemas.CSCase getCase(MaapiSchemas.CSChoice choice)
      Returns the case in which a choice is contained within.
      Parameters:
      choice - the choice to get the case for.
      Returns:
      a case matching the given node.
    • getName

      public String getName()
      Returns the choice name according to the YANG model.
      Returns:
      the name of the choice.
    • getPreviousCase

      public MaapiSchemas.CSCase getPreviousCase()
      Returns the previous case of the choice.
      Returns:
      the previous case. null if the case has not been changed.
    • getSelectedCase

      public MaapiSchemas.CSCase getSelectedCase()
      Returns the current case.
      Returns:
      the current case. null if no case has been selected yet.
    • isCurrentCase

      public boolean isCurrentCase(MaapiSchemas.CSCase cAse)
      Checks if a given case is the currently selected case.
      Parameters:
      cAse - the case to check against.
      Returns:
      true if it is a match.
    • isEmpty

      public boolean isEmpty()
      Checks if it is an empty choice. I.e. if no case nodes exist.
      Returns:
      true, if no nodes are contained in the choice.
    • put

      Adds node-case relation to the choice.
      Parameters:
      node -
      cAse -
      Returns:
      the inserted case.
    • putAll

      public void putAll(Map<? extends MaapiSchemas.CSNode,? extends MaapiSchemas.CSCase> m)
      Adds a node-case map to the choice.
      Parameters:
      m - a node-case map.
    • size

      public int size()
      The number of cases contained in the choice.
      Returns:
      number of cases contained within the choice.
    • values

      public Collection<MaapiSchemas.CSCase> values()
      Return a list of cases contained within this choice.
      Returns:
      a list of cases.
    • update

      public boolean update()
      Returns:
      true if the case was updated.
    • isOper

      public boolean isOper()
    • isWritable

      public boolean isWritable()
      Checks if the node is writable.
      Returns:
      true if the node is writable.
    • isWritableAll

      public boolean isWritableAll()
      Checks if the node is writable for all data.
      Returns:
      true if the node is writable for all data.