Package com.tailf.maapi
Class MaapiSchemas.CSNode
Object
com.tailf.maapi.MaapiSchemas.CSNode
- Enclosing class:
- MaapiSchemas
Class representing a Schema node, having references to parent and
children as well as siblings
-
Constructor Summary
ConstructorDescriptionCSNode()
Constructor for CSNode classCSNode
(int taghash, int nshash, MaapiSchemas.CSNodeInfo info, MaapiSchemas.CSNode parentNode, MaapiSchemas.CSNode firstChild, MaapiSchemas.CSNode nextSibling, MaapiSchemas.CSNode previousSibling) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return true if and onlfy if this nodes is equal the specified nodegetChild
(int tagHash) Retrieve a child with the specified tag Returns null if no child exists.getChild
(long tagHash) Deprecated.Retrieves children for this node as List or null if no children exists.get List object of choices for this node.get default value represented as a subclass to ConfObjectgetKey
(int index) Return a key at the given index.getKeys()
Return a list of keys.int
get MaxOccurs for the nodeint
get MinOccurs for the nodeRetrieves the node informationgetNS()
get namespace represented as stringint
Retrieves the namespace represented as hash valueRetrieves the parent node for this nodegetSibling
(int tagHash) Retrieves sibling with specified tag or null if no sibling exists.getSibling
(long tagHash) Deprecated.Retrieves siblings for this node as List or null if no siblings exists.getTag()
Retrieves the node tag represented as stringint
Retrieves the node tag represented as hash valuegetType()
get type for the nodegetXmlNS()
get the xml namespace represented as stringboolean
Checks if a node hash children.boolean
Checks if the node has YANG 'tailf:display-when' statement(s).int
hashCode()
boolean
Checks if the node has YANG 'tailf:meta-data' statement(s).boolean
boolean
hasWhen()
Checks if the node has YANG 'when' statement(s).boolean
isAction()
Checks if a node is an action.boolean
Checks if a node is an action parameter node.boolean
Checks if a node is an action result node.boolean
isCase()
Checks if a node is top level of a case.boolean
Checks if a node is a container node.boolean
boolean
isLeaf()
Checks if a node is a leaf node.boolean
Checks if the node is a leaf-list node.boolean
Checks if the node is a YANG 'leafref'.boolean
isList()
Checks if a node is a list node.boolean
isNotif()
Checks if the node is a notificationboolean
isOper()
boolean
Checks if the node is writable.toString()
Informative string representation of a CSNode instance
-
Constructor Details
-
CSNode
public CSNode(int taghash, int nshash, MaapiSchemas.CSNodeInfo info, MaapiSchemas.CSNode parentNode, MaapiSchemas.CSNode firstChild, MaapiSchemas.CSNode nextSibling, MaapiSchemas.CSNode previousSibling) -
CSNode
public CSNode()Constructor for CSNode class
-
-
Method Details
-
getTagHash
public int getTagHash()Retrieves the node tag represented as hash value- Returns:
- int hashvalue for the tag
-
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
get namespace represented as string- Returns:
- String namespace
-
getXmlNS
get the xml namespace represented as string- Returns:
- String xml namespace
-
getNodeInfo
Retrieves the node information- Returns:
- CSNodeInfo node information about current (this) node
-
getParentNode
Retrieves the parent node for this node- Returns:
- CSNode parent or null if this a root node
-
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
Retrieves sibling with specified tag or null if no sibling exists.
- Returns:
- a node
-
getSibling
Deprecated.UsegetSibling(int)
instead. -
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
Retrieve a child with the specified tag Returns null if no child exists.- Returns:
- Child node
-
getChild
Deprecated.UsegetChild(int)
instead -
getKey
Return a key at the given index. If no key is found null is returned- Returns:
- return the CSNode of the key
-
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
get type for the node- Returns:
- CSType type for the node
-
getDefval
get default value represented as a subclass to ConfObject- Returns:
- ConfObject
-
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
Return true if and onlfy if this nodes is equal the specified node -
hashCode
public int hashCode() -
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
-
toString
Informative string representation of a CSNode instance
-