Class MaapiSchemas.CSNode

Object
com.tailf.maapi.MaapiSchemas.CSNode
Enclosing class:
MaapiSchemas

public class MaapiSchemas.CSNode extends Object
Class representing a Schema node, having references to parent and children as well as siblings
  • Constructor Details

  • Method Details

    • getTagHash

      public int getTagHash()
      Retrieves the node tag represented as hash value
      Returns:
      int hashvalue for the tag
    • getTag

      public String getTag()
      Retrieves the node tag represented as string
      Returns:
      string tag
    • getNSHash

      public int getNSHash()
      Retrieves the namespace represented as hash value
      Returns:
      hashvalue for the namespace
    • getNS

      public String getNS()
      get namespace represented as string
      Returns:
      String namespace
    • getXmlNS

      public String getXmlNS()
      get the xml namespace represented as string
      Returns:
      String xml namespace
    • getNodeInfo

      public MaapiSchemas.CSNodeInfo getNodeInfo()
      Retrieves the node information
      Returns:
      CSNodeInfo node information about current (this) node
    • getParentNode

      public MaapiSchemas.CSNode getParentNode()
      Retrieves the parent node for this node
      Returns:
      CSNode parent or null if this a root node
    • getSiblings

      public List<MaapiSchemas.CSNode> getSiblings()

      Retrieves siblings for this node as List or null if no siblings exists.

      Includes the current node in the List.

      Returns:
      List of sibling nodes including the current (this) node
    • getSibling

      public MaapiSchemas.CSNode getSibling(int tagHash)

      Retrieves sibling with specified tag or null if no sibling exists.

      Returns:
      a node
    • getSibling

      @Deprecated public MaapiSchemas.CSNode getSibling(long tagHash)
      Deprecated.
      Use getSibling(int) instead.
    • getChildren

      public List<MaapiSchemas.CSNode> getChildren()
      Retrieves children for this node as List or null if no children exists.
      Returns:
      List of children nodes
    • hasChildren

      public boolean hasChildren()
      Checks if a node hash children.
      Returns:
      true if children exists.
    • getChild

      public MaapiSchemas.CSNode getChild(int tagHash)
      Retrieve a child with the specified tag Returns null if no child exists.
      Returns:
      Child node
    • getChild

      @Deprecated public MaapiSchemas.CSNode getChild(long tagHash)
      Deprecated.
      Use getChild(int) instead
    • getKey

      public MaapiSchemas.CSNode getKey(int index)
      Return a key at the given index. If no key is found null is returned
      Returns:
      return the CSNode of the key
    • getKeys

      public List<MaapiSchemas.CSNode> getKeys()
      Return a list of keys. If the node is not a YANG list then null is returned.
      Returns:
      List of CSNodes used as keys
    • getMinOccurs

      public int getMinOccurs()
      get MinOccurs for the node
      Returns:
      int minOccurs
    • getMaxOccurs

      public int getMaxOccurs()
      get MaxOccurs for the node
      Returns:
      int maxOccurs
    • getType

      public MaapiSchemas.CSType getType()
      get type for the node
      Returns:
      CSType type for the node
    • getDefval

      public ConfObject getDefval()
      get default value represented as a subclass to ConfObject
      Returns:
      ConfObject
    • getChoices

      public List<MaapiSchemas.CSChoice> getChoices()
      get List object of choices for this node. A Choice is represented by the CSChoice class, this is a List of CSChoice accordingly
      Returns:
      List of Choices
    • equals

      public boolean equals(Object o)
      Return true if and onlfy if this nodes is equal the specified node
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isAction

      public boolean isAction()
      Checks if a node is an action.
      Returns:
      true if it is an action.
    • isCase

      public boolean isCase()
      Checks if a node is top level of a case.
      Returns:
      true if the node is part of a case.
    • isContainer

      public boolean isContainer()
      Checks if a node is a container node.
      Returns:
      true if the node is a container node.
    • isEmptyLeaf

      public boolean isEmptyLeaf()
    • isLeaf

      public boolean isLeaf()
      Checks if a node is a leaf node.
      Returns:
      true if the node is leaf node.
    • isLeafList

      public boolean isLeafList()
      Checks if the node is a leaf-list node.
      Returns:
      true if the node is leaf-list node.
    • isList

      public boolean isList()
      Checks if a node is a list node.
      Returns:
      true if the node is list node.
    • isActionParam

      public boolean isActionParam()
      Checks if a node is an action parameter node.
      Returns:
      true if the node is an action parameter node.
    • isActionResult

      public boolean isActionResult()
      Checks if a node is an action result node.
      Returns:
      true if the node is action result node.
    • isWritable

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

      public boolean isNotif()
      Checks if the node is a notification
      Returns:
      true if the node a notification
    • isOper

      public boolean isOper()
      Returns:
      true if node is OPER data.
    • hasWhen

      public boolean hasWhen()
      Checks if the node has YANG 'when' statement(s).
      Returns:
      true if node has YANG 'when' statement(s).
    • hasDisplayWhen

      public boolean hasDisplayWhen()
      Checks if the node has YANG 'tailf:display-when' statement(s).
      Returns:
      true if node has YANG 'tailf:display-when' statement(s).
    • hasMetaData

      public boolean hasMetaData()
      Checks if the node has YANG 'tailf:meta-data' statement(s).
      Returns:
      true if node has YANG 'tailf:meta-data' statement(s).
    • isLeafref

      public boolean isLeafref()
      Checks if the node is a YANG 'leafref'.
      Returns:
      true if node is a YANG 'leafref'.
    • hasMountPoint

      public boolean hasMountPoint()
    • printNodeType

      public String printNodeType()
    • toString

      public String toString()
      Informative string representation of a CSNode instance
      Overrides:
      toString in class Object
      Returns:
      String