com.ihr.xbrl.om.table.definition

## Class XBRLDefinitionNode

- java.lang.Object
- - com.ihr.xbrl.om.XMLFragment
  - - com.ihr.xbrl.om.exLinks.XLinkElement
    - - com.ihr.xbrl.om.exLinks.XBRLPointerOfARelationship
      - - com.ihr.xbrl.om.exLinks.XBRLResource
        - - com.ihr.xbrl.om.table.XBRLTableResource
          - - com.ihr.xbrl.om.table.definition.XBRLDefinitionNode

- All Implemented Interfaces:
    HasAdditionalEqualityForReassignation, XBRLRelationshipPoint, HasBreakdownTree, HasParentChildAttribute, HasTableProcessor, Thinable, XBRLValidation, XBRLValueKey, XMLHasParent, java.lang.Cloneable, javax.xml.namespace.NamespaceContext
  Direct Known Subclasses:
    XBRLClosedDefinitionNode, XBRLOpenDefinitionNode

      public abstract class XBRLDefinitionNode
      extends XBRLTableResource
      implements HasBreakdownTree, HasParentChildAttribute

  The Class XBRLDefinitionNode.
  Author:
    Ignacio

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.ihr.xbrl.om.table.HasParentChildAttribute

      `HasParentChildAttribute.ParentChildEnum`

    - ### Nested classes/interfaces inherited from interface com.ihr.xbrl.om.XBRLValidation

      `XBRLValidation.Direction`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static javax.xml.namespace.QName` | `tagSelector` This is the attribute name "tagSelector" represented as a QName.

    - ### Fields inherited from class com.ihr.xbrl.om.exLinks.XBRLResource

      `log, nullResource`

    - ### Fields inherited from class com.ihr.xbrl.om.exLinks.XLinkElement

      `actuate, ACTUATE, ARC, arcrole, ARCROLE, ETITLE, EXTENDED, from, FROM, href, HREF, label, LABEL, LOCATOR, RESOURCE, role, ROLE, show, SHOW, SIMPLE, title, TITLE, to, TO, TYPE`

    - ### Fields inherited from class com.ihr.xbrl.om.XMLFragment

      `CONCEPT_LABEL, CONCEPT_QNAME, EASY_TO_READ, ELEMENT_LABEL, EMPTYRELATIONSHIPSITERATORINSTANCE, EMPTYXMLFRAGMENTITERATORINSTANCE, FACT_CONCEPT_DATATYPE, FACT_CONCEPT_LABEL, FACT_QNAME, HIDE_COMMON_ACCURACY, idQName, NO_POSITION, OrderComparator, OrderComparator2, PERIOD_TYPE, PERIOD_VALUE, SHORT_TEXT, SOURCE_DOCUMENT, XPATH, XPOINTER`

    - ### Fields inherited from interface com.ihr.xbrl.om.table.HasParentChildAttribute

      `parentChilOrder`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLDefinitionNode(XBRLTableProcessor xbrlTableProcessor, XBRLResource res)` Instantiates a new XBRL definition node.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract boolean` | `allowRollUps()` Some nodes does not allow the creation of roll-up nodes. such as the aspect node.
    `java.util.Iterator<XBRLDefinitionNodeUse>` | `getBreakdownTree()` Gets the breakdown tree.
    `int` | `getNumberOfNodes()` Returns the number of root nodes in the tree.
    `HasParentChildAttribute.ParentChildEnum` | `getParentChildOrder()` Returns the value of the parentChildOrder attribute as one value of the ParentChildEnum enumeration.
    `java.lang.String` | `getTagSelector()` returns the value of the tagSelector attribute on this definition node if the tagSelector attribute is not present this method returns XBRLRuleNode.UNTAGGED_TAG_NAME which is a constant defined for no tag defined
    `boolean` | `hasOpen()` Returns true if this or down the tree from this node there is a node that isOpen() returns true.
    `abstract boolean` | `isAbstract()` Returns true if this is a closed definition node and is abstract.
    `boolean` | `isLeaf()` Returns true if this is a leaf node with no nested XBRLDefinitionNodeUse elements in the iterator that would be returned by a call to getBreakdownTree().
    `boolean` | `isOpen()` Returns true if this particular node is based on an XBRLOpenDefinitionNode and thus it is an open node.
    `boolean` | `isParentChildOrderDefined()` Returns true when the resource contains an attribute with explicit definition of the parentChildOrder.
    `void` | `readDefinitionNodeSubTree()` Read definition node sub tree.
    `void` | `resetTable()` This method traverse all elements in the definition layer and cleans up all evaluated and cached resources so the table can be evaluated again. it is called by the API automatically each time a table in the tableSet is evaluated

    - ### Methods inherited from class com.ihr.xbrl.om.table.XBRLTableResource

      `getFPXPathCompiler, getProcessor, isSpecificationVersion`

    - ### Methods inherited from class com.ihr.xbrl.om.exLinks.XBRLResource

      `addChild, clear, equals, generateLocatorToNode, generateNode, getAttributes, getDTSBase, getFriendlyName, getFriendlyName, getParent, getResourceIdentifier, getRoleType, getType, getValidationReport, getValueKey, hashCode, invalidate, invalidate, isComplexType, isOnValidation, isSimpleType, setComplexType, setDTSBase, setId, setParent, setRole, setRoleType, setSimpleType, setValue, validate`

    - ### Methods inherited from class com.ihr.xbrl.om.exLinks.XLinkElement

      `getActuate, getArcrole, getFromTxt, getHRef, getLabel, getRole, getShow, getStaticLabel, getSType, getTitle, getToTxt, isRequiredAttribute, isValidAttribute, setActuate, setArcrole, setFrom, setHRef, setLabel, setShow, setSType, setTitle, setTo`

    - ### Methods inherited from class com.ihr.xbrl.om.XMLFragment

      `addAttribute, addFromRelationship, addNamespace, addNamespace, addToRelationship, addXMLChild, changeBase, checkBase, clone, clone, delAttribute, delAttribute, equalXdmValues, evaluateBoolean, evaluateList, evaluateNode, evaluateNumber, evaluateString, generateId, generateNodeNamespacesAndAttributes, generateNodeValue, generatePrefix, getAllAttributes, getAttribute, getAttributeBooleanValue, getAttributeQNameValue, getAttributes, getAttributeStringValue, getAttributeValue, getBase, getBase, getBaseURI, getBooleanValue, getChild, getContainer, getContainerDocumentURI, getDeclaredNamespaces, getDocument, getElements, getElementsHashCode, getFragment, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getFromRelationships, getGenericLabelText, getId, getLang, getNamespaceURI, getNodeName, getNumberOfAttributes, getNumberOfElements, getNumberOfFromRelationships, getNumberOfToRelationships, getOrGenerateId, getPrefix, getPrefixes, getQNameValue, getRelationshipsBases, getRelationshipsChain, getRelationshipTypes, getStaticContext, getStaticNamespace, getStringValue, getToolTipText, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getToRelationships, getValue, getXPathExecutable, getXPathNamespaceContext, getXPathToNode, getXPathToRoot, getXPointerElementScheme, getXPointerElementScheme, getXPointerShorthandScheme, getXPointerToNode, isDead, isNamespaceDefined, isXdmDocumentAttached, objEquals, objHashCode, qNameToString, removeAttribute, removeChild, removeChild, removeFromRelationship, removeToRelationship, removeXMLChild, resetElements, resetHash, resolve_equal2, resolveHRef, resolveHRef, s_equal2, s_equal2, s_equal2, setAttributes, setBase, setDocument, setDocumentAndReload, setElements, setLang, setNamespaceContext, setNamespaces, setNode, setNodeName, setParent, setRegenerateNodeIfnotFound, setValue, setVariablesDefined, size, thin, toString, valueEquals, xEqual`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.ihr.xbrl.om.exLinks.XBRLRelationshipPoint

      `addFromRelationship, addToRelationship, getFromRelationships, getToRelationships, removeFromRelationship, removeToRelationship`

- - ### Field Detail

    - #### tagSelector

          public static final javax.xml.namespace.QName tagSelector

      This is the attribute name "tagSelector" represented as a QName.

  - ### Constructor Detail

    - #### XBRLDefinitionNode

          public XBRLDefinitionNode(XBRLTableProcessor xbrlTableProcessor,
                            XBRLResource res)
                             throws XTValidationException

      Instantiates a new XBRL definition node.
      Parameters:
        `xbrlTableProcessor` - the xbrl table processor
        `res` - the res
      Throws:
        `XTValidationException` - the XT validation exception

  - ### Method Detail

    - #### readDefinitionNodeSubTree

          public void readDefinitionNodeSubTree()

      Read definition node sub tree.

    - #### getBreakdownTree

          public java.util.Iterator<XBRLDefinitionNodeUse> getBreakdownTree()

      Gets the breakdown tree.
      Specified by:
        `getBreakdownTree` in interface `HasBreakdownTree`
      Returns:
        the vBreakdownTree

    - #### isLeaf

          public boolean isLeaf()

      Description copied from interface: `HasBreakdownTree`
      Returns true if this is a leaf node with no nested XBRLDefinitionNodeUse elements in the iterator that would be returned by a call to getBreakdownTree().
      Specified by:
        `isLeaf` in interface `HasBreakdownTree`
      Returns:
        boolean value
      See Also:
        `HasBreakdownTree.getBreakdownTree()`

    - #### getNumberOfNodes

          public int getNumberOfNodes()

      Description copied from interface: `HasBreakdownTree`
      Returns the number of root nodes in the tree. This method is used as the secondary key for ordering breakdowns. If two breakdowns in the same axis have the same order attribute, the one with less root nodes goes first.
      Specified by:
        `getNumberOfNodes` in interface `HasBreakdownTree`
      Returns:
        the number of nodes

    - #### hasOpen

          public boolean hasOpen()

      Description copied from interface: `HasBreakdownTree`
      Returns true if this or down the tree from this node there is a node that isOpen() returns true.
      Specified by:
        `hasOpen` in interface `HasBreakdownTree`
      Returns:
        boolean value

    - #### isOpen

          public boolean isOpen()

      Description copied from interface: `HasBreakdownTree`
      Returns true if this particular node is based on an XBRLOpenDefinitionNode and thus it is an open node.
      Specified by:
        `isOpen` in interface `HasBreakdownTree`
      Returns:
        boolean value

    - #### getTagSelector

          public java.lang.String getTagSelector()

      returns the value of the tagSelector attribute on this definition node if the tagSelector attribute is not present this method returns XBRLRuleNode.UNTAGGED_TAG_NAME which is a constant defined for no tag defined
      Returns:
        XBRLRuleNode.UNTAGGED_TAG_NAME if no tagSelector attribute exists. The value of the tagSelector attribute if any exists

    - #### isParentChildOrderDefined

          public boolean isParentChildOrderDefined()

      Description copied from interface: `HasParentChildAttribute`
      Returns true when the resource contains an attribute with explicit definition of the parentChildOrder.
      Specified by:
        `isParentChildOrderDefined` in interface `HasParentChildAttribute`
      Returns:
        true when getParentChildOrder() will not return UNDEFINED

    - #### getParentChildOrder

          public HasParentChildAttribute.ParentChildEnum getParentChildOrder()

      Description copied from interface: `HasParentChildAttribute`
      Returns the value of the parentChildOrder attribute as one value of the ParentChildEnum enumeration.
      Specified by:
        `getParentChildOrder` in interface `HasParentChildAttribute`
      Returns:
        one of the values in the ParentChildEnum enumeration

    - #### isAbstract

          public abstract boolean isAbstract()

      Returns true if this is a closed definition node and is abstract.
      Returns:
        boolean value

    - #### allowRollUps

          public abstract boolean allowRollUps()

      Some nodes does not allow the creation of roll-up nodes. such as the aspect node. Others do allow.
      Returns:
        true, if successful

    - #### resetTable

          public void resetTable()

      This method traverse all elements in the definition layer and cleans up all evaluated and cached resources so the table can be evaluated again. it is called by the API automatically each time a table in the tableSet is evaluated