com.ihr.xbrl.om.formula.util

## Class XBRLVariableTree

- java.lang.Object
- - com.ihr.xbrl.om.formula.util.XBRLVariableTree

-     public class XBRLVariableTree
      extends java.lang.Object

  The Class XBRLVariableTree.
  Author:
    Ignacio

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static org.apache.log4j.Logger` | `log` The log.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLVariableTree(java.util.List<XBRLVariableResourceUse> vars, java.util.HashSet<javax.xml.namespace.QName> resolved, XBRLVariableSetResource set)` Instantiates a new XBRL variable tree.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `bindCycle(XMLEvaluationContextProvider evalProvider, java.util.Vector<XBRLVariableResourceUse> evaluatedVars)` Bind variables in this level.
    `void` | `clear()` Clear all memory assigned to evaluation caches of variables in this variable tree.
    `java.util.HashSet<javax.xml.namespace.QName>` | `getDependencies(javax.xml.namespace.QName thisVarName)` Gets the dependencies.
    `VariablesLoopController.ClsVariableSetCombinationsIterator` | `getImplicitFilterController(XBRLVariableSetResource xbrlVariableSetResource)` Gets the implicit filter controller.
    `com.ihr.xbrl.om.formula.util.VariableType` | `getVariableDependencyType(javax.xml.namespace.QName qName)` Gets the variable dependency type.
    `boolean` | `hasActiveSubPartitioning()` Checks for active sub partitioning.
    `boolean` | `hasNext()` Checks for next.
    `boolean` | `initialize(XMLEvaluationContextProvider evalProvider, java.util.Vector<XBRLVariableResourceUse> evaluatedVars)` Initialize the tree and returns true if there is at least one binding or false if there are no bindings.

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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### log

          public static org.apache.log4j.Logger log

      The log.

  - ### Constructor Detail

    - #### XBRLVariableTree

          public XBRLVariableTree(java.util.List<XBRLVariableResourceUse> vars,
                          java.util.HashSet<javax.xml.namespace.QName> resolved,
                          XBRLVariableSetResource set)
                           throws XFValidationException

      Instantiates a new XBRL variable tree.
      Parameters:
        `vars` - the vars
        `resolved` - the resolved
        `set` - the set
      Throws:
        `XFValidationException` - the XF validation exception

  - ### Method Detail

    - #### bindCycle

          public boolean bindCycle(XMLEvaluationContextProvider evalProvider,
                          java.util.Vector<XBRLVariableResourceUse> evaluatedVars)
                            throws XFValidationException

      Bind variables in this level. Then, call next level. This object acts as variable resolver for variables already resolved
      Parameters:
        `evalProvider` - the eval provider
        `evaluatedVars` - the evaluated vars
      Returns:
        boolean true if binding is OK because not all variables bind to fall back values
      Throws:
        `XFValidationException` - the XF validation exception

    - #### hasNext

          public boolean hasNext()

      Checks for next.
      Returns:
        true, if successful

    - #### hasActiveSubPartitioning

          public boolean hasActiveSubPartitioning()

      Checks for active sub partitioning.
      Returns:
        true, if successful

    - #### getImplicitFilterController

          public VariablesLoopController.ClsVariableSetCombinationsIterator getImplicitFilterController(XBRLVariableSetResource xbrlVariableSetResource)

      Gets the implicit filter controller.
      Parameters:
        `xbrlVariableSetResource` - the xbrl variable set resource
      Returns:
        the implicit filter controller

    - #### getDependencies

          public java.util.HashSet<javax.xml.namespace.QName> getDependencies(javax.xml.namespace.QName thisVarName)

      Gets the dependencies.
      Parameters:
        `thisVarName` - the this var name
      Returns:
        the dependencies

    - #### getVariableDependencyType

          public com.ihr.xbrl.om.formula.util.VariableType getVariableDependencyType(javax.xml.namespace.QName qName)

      Gets the variable dependency type.
      Parameters:
        `qName` - the q name
      Returns:
        the variable dependency type

    - #### initialize

          public boolean initialize(XMLEvaluationContextProvider evalProvider,
                           java.util.Vector<XBRLVariableResourceUse> evaluatedVars)
                             throws XFValidationException

      Initialize the tree and returns true if there is at least one binding or false if there are no bindings.
      Parameters:
        `evalProvider` - the eval provider
        `evaluatedVars` - the evaluated vars
      Returns:
        boolean
      Throws:
        `XFValidationException` - the XF validation exception

    - #### clear

          public void clear()

      Clear all memory assigned to evaluation caches of variables in this variable tree.