com.ihr.xbrl.om.formula

## Class XBRLFormulaProcessor

- java.lang.Object
- - com.ihr.xbrl.om.formula.XBRLFormulaProcessor

- All Implemented Interfaces:
    XBRLCompilableProcessor, XBRLPlugInProcessor

      public class XBRLFormulaProcessor
      extends java.lang.Object
      implements XBRLCompilableProcessor

  The Class XBRLFormulaProcessor.
  Author:
    Ignacio

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `assertion_satisfied_message_URI` http://xbrl.org/arcrole/2010/assertion-satisfied-message
    `static java.lang.String` | `assertion_set_arcrole_URI` http://xbrl.org/arcrole/2008/assertion-set
    `static java.lang.String` | `assertion_unsatisfied_message_URI` http://xbrl.org/arcrole/2010/assertion-unsatisfied-message
    `static java.lang.String` | `boolean_filter_arcrole_URI` http://xbrl.org/arcrole/2008/boolean-filter
    `static java.lang.String` | `consistency_assertion_formula_URI` http://xbrl.org/arcrole/2008/consistency-assertion-formula
    `static java.lang.String` | `consistency_assertion_parameter_URI` http://xbrl.org/arcrole/2008/consistency-assertion-parameter
    `static java.lang.String` | `equality_definition_arcrole_URI` http://xbrl.org/arcrole/2008/equality-definition
    `static java.lang.String` | `function_implementation_URI` http://xbrl.org/arcrole/2010/function-implementation
    `static java.lang.String` | `PROCESSORNAME` The Constant PROCESSORNAME.
    `static javax.xml.namespace.QName` | `qError` The q error.
    `static java.lang.String` | `variable_filter_arcrole_URI` http://xbrl.org/arcrole/2008/variable-filter
    `static java.lang.String` | `variable_set_arcrole_URI` http://xbrl.org/arcrole/2008/variable-set
    `static java.lang.String` | `variable_set_filter_arcrole_URI` http://xbrl.org/arcrole/2008/variable-set-filter
    `static java.lang.String` | `variable_set_precondition_arcrole_URI` http://xbrl.org/arcrole/2008/variable-set-precondition

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAssertion(XBRLAssertion assertion)` Adds the assertion.
    `void` | `addConsistencyAssertion(XBRLConsistencyAssertion consistencyAssertion)` Adds the consistency assertion.
    `void` | `addCustomFunctionDeclaration(XBRLCustomFunction customFunction)` Adds the custom function declaration.
    `void` | `addCustomFunctionLibrary(XBRLRSCustomFunctionLibrary fl)` Adds a Function Library to the set of function libraries available to the processor.
    `void` | `addCustomLibraries(net.sf.saxon.sxpath.IndependentContext ic)` Adds the custom libraries.
    `void` | `addFormula(XBRLFormula formula)` Adds the formula.
    `void` | `addInScopeInstance(XBRLInstance doc)` Adds the in scope instance.
    `void` | `addRSLibrary(net.sf.saxon.sxpath.IndependentContext ic)` Adds the rs library.
    `void` | `addVariableParameter(XBRLVariableParameter variableParameter)` Adds the variable parameter.
    `void` | `addXFFLibrary(net.sf.saxon.expr.StaticContext sc)` Adds the xff library.
    `void` | `addXFILibrary(net.sf.saxon.expr.StaticContext sc)` Adds the xfi library.
    `static java.lang.String` | `cleanFormulaExpression(java.lang.String expression)` Helper function that cleans up the content of an XPath expression so it can be used as a text string in a GUI.
    `void` | `clear()` Called when the DTSContainer's clear method is called.
    `void` | `collectVariables(java.util.Collection<javax.xml.namespace.QName> hsVars)` Add parameter variables to the collection received as a parameter This method can add only global variables available to all formulas.
    `static net.sf.saxon.s9api.XPathExecutable` | `compileExpressionAndCollectRequiredVariables(java.lang.String selectExpression, java.util.Collection<javax.xml.namespace.QName> requiredVariables, java.util.Collection<net.sf.saxon.s9api.QName> preDefinedVariables, net.sf.saxon.om.NamespaceResolver nsResolver, XBRLFormulaResource fragment)` Compile expression and collect required variables.
    `XBRLValidationReport` | `compileResources()` Compile resources.
    `void` | `configure(java.util.Properties properties)` Configures the processor according with the properties passed in in the properties parameter.
    `static XBRLFormulaProcessor` | `create(DTSContainer dts)` Creates the.
    `static void` | `declareNamespaces(XBRLResource resource, net.sf.saxon.s9api.XPathCompiler compiler)` Helper method to declare all namespaces in the resource indicated as a parameter in the XPath compiler received as a parameter.
    `XBRLValidationReport` | `evaluate(XBRLResource resource, XBRLInstance instance)` Evaluates one resource and returns an XBRLValidationReport instance.
    `void` | `evaluateFormulaSet(java.util.Collection<XBRLFormula> formulas, XBRLValidationReport valReport, XBRLInstance doc, ExecutionTargetType targetType)` Evaluates a collection of formulas and put the result inside the validation report passed in as parameter valReport.
    `void` | `freeUnnecessary()` Removes all resources and allows to call compileResources() again This method is called in the last step of the DTS loading process and specially when load is called multiple times.
    `AspectsCache` | `getAspectsCache()` The aspects cache is used internally by the processor in order to accelerate implicit filtering.
    `java.util.Collection<XBRLAssertion>` | `getAssertions()` Access to all value assertions and existence assertions defined in the DTS and loaded from the linkbases.
    `XBRLArcroleType` | `getAssertionSatisfiedMessageArcroleType()` Gets the assertion satisfied message arcrole type.
    `XBRLArcroleType` | `getAssertionUnsatisfiedMessageArcroleType()` Gets the assertion unsatisfied message arcrole type.
    `XBRLArcroleType` | `getAssetionSetArcroleType()` Gets the assetion set arcrole type.
    `XBRLArcroleType` | `getBooleanFilterArcroleType()` Gets the boolean filter arcrole type.
    `XBRLFact` | `getCacheFact(net.sf.saxon.s9api.XdmNode factNode)` Search for a fact using the fact node.
    `XBRLArcroleType` | `getConsistencyAssertionFormulaArcroleType()` Gets the consistency assertion formula arcrole type.
    `XBRLArcroleType` | `getConsistencyAssertionParameterArcroleType()` Gets the consistency assertion parameter arcrole type.
    `java.util.Collection<XBRLConsistencyAssertion>` | `getConsistencyAssertions()` Access to all consistency assertions defined in the DTS and loaded from the linkbases.
    `DTSContainer` | `getContainer()` Gets the container.
    `XBRLContext` | `getContextById(java.lang.String id, java.net.URI documentURI)` Gets the context by id.
    `XBRLCustomFunctionsLibraryList` | `getCustomFunctionsLibraryList()` Access to the library list that contains custom function implementations.
    `java.lang.String` | `getDescription()` Returns the processor description so it can be written in validation reports.
    `static java.lang.String` | `getDescriptionStatic()` Gets the description static.
    `XMLFragment` | `getElementById(java.lang.String id, java.net.URI documentURI)` Gets the element by id.
    `XBRLArcroleType` | `getEqualityDefinitionArcroleType()` Gets the equality definition arcrole type.
    `FactHasExplicitDimensionValueCache` | `getFactHasExplicitDimensionValueCache()` Gets the fact has explicit dimension value cache.
    `FilterMemberCache` | `getFilterMemberCache()` Gets the filter member cache.
    `XBRLFilterOrderTool` | `getFilterOrderInstance()` The formula specification is not defining the order in which filters shall be arranged to create the XPath evaluation expression.
    `java.util.Collection<XBRLFormula>` | `getFormulas()` Access to all formula resources loaded from the linkbases and compiled as XBRLFormula instances.
    `net.sf.saxon.s9api.XPathCompiler` | `getFPXPathCompiler(net.sf.saxon.om.NamespaceResolver namespaceResolver, XMLFragment fragment, boolean schemaAware)` Always return a new XPathCompiler object with the IndependentContext namespace Resolver set to the namespaceResolver supplied as a parameter.
    `XBRLArcroleType` | `getFunctionImplementarionArcroleType()` Gets the function implementarion arcrole type.
    `java.lang.String` | `getName()` Returns the processor name so it can be written in validation reports.
    `XBRLVariableResourceUse` | `getParameterForBinding(javax.xml.namespace.QName var)` Access to the XBRLVariableParameter using the parameter name (which is also the variable name on XPath expressions).
    `XBRLFormulaParametersResolver` | `getParameterResolver()` Gets the parameter resolver.
    `java.util.Vector<XBRLVariableResourceUse>` | `getParametersForBinding()` Creates a new Vector of XBRLVariableResourceUse and returns it to the calling application.
    `FormulaProcessorStatus` | `getStatus()` Normally called from another thread, this method returns an instance of a FormulaProcessorStatus class that provides information about the number of formulas, number of assertions, number of consistency assertions. number of running threads, maximum time of a thread and what every thread is doing.
    `XBRLFormula` | `getUnderEvaluationFormula()` This method returns the formula that is being evaluated.
    `XBRLInstance` | `getUnderEvaluationInstance()` Gets the under evaluation instance.
    `java.lang.String` | `getUnderEvaluationResourceId()` This method returns the formula or assertion resource id that is being evaluated.
    `HasUncoveredAspectValueResolver` | `getUnderEvaluationUncoveredAspectValue()` Access to the value of the instance of the class that will resolve values for the xff:uncovered-aspect function.
    `javax.xml.namespace.QName` | `getUnderEvaluationVariableName()` During the evaluation of an XPath expression in order to set the value of a variable name, the variable name of the variable that is being evaluated can be obtained by a call to this method.
    `XBRLUnit` | `getUnitById(java.lang.String id, java.net.URI documentURI)` Gets the unit by id.
    `XBRLValidationReport` | `getValidationReport()` Access to the validation report that is active during formula validation.
    `XBRLArcroleType` | `getVariableFilterArcroleType()` Gets the variable filter arcrole type.
    `XBRLArcroleType` | `getVariableSetArcroleType()` Gets the variable set arcrole type.
    `XBRLArcroleType` | `getVariableSetFilterArcroleType()` Gets the variable set filter arcrole type.
    `XBRLArcroleType` | `getVariableSetPreconditionArcroleType()` Gets the variable set precondition arcrole type.
    `void` | `informEnd(AssertionExecutor ae, long elapsedTime)` Called from other threads once execution ends.
    `void` | `informRunning(AssertionExecutor ae)` Called from the thread running the XBRLFormulaProcessor instance.
    `boolean` | `isHidden()` A hidden processor will not pop-up in the GUI tabs.
    `boolean` | `isStrictXPath()` Convenient method to obtain the value of the DTSContainer.FORMULA_PROCESSOR_USE_STRICT_SPECIFICATION_XPATH property
    `boolean` | `matcheable(XBRLFact fact1, XBRLFact fact2, int aspectModel, XMLFragment context)` Computes if two facts are aspect-matched input facts as defined in the Formula specification.
    `void` | `removeFormula(XBRLFormula xbrlFormula)` Marks a formula to be removed from the formula list.
    `void` | `removeInScopeInstance(XBRLInstance doc)` Removes the in scope instance.
    `void` | `setParametersResolver(XBRLFormulaParametersResolver pResolver)` Sets the external parameters resolver to the instance of the class indicated by the parameter.
    `void` | `setUnderEvaluationInstance(XBRLInstance valInstance)` Sets or clear the instance document that is in the scope of formula functions.
    `void` | `setUnderEvaluationResourceId(java.lang.String id)` This method sets the value of the formula or assertion identifier that is being evaluated.
    `void` | `setUnderEvaluationUncoveredAspectValue(HasUncoveredAspectValueResolver resolver)` Sets the value for the resolver of the xff:uncovered-aspect function.
    `void` | `setUnderEvaluationVariable(javax.xml.namespace.QName variableName)` Sets the under evaluation variable.
    `XBRLValidationReport` | `validate()` Validates the content of the DTS according to the rules indicated in this plug-in processor.
    `XBRLValidationReport` | `validate(XBRLDocument doc)` Validates the document according to the rules indicated in this plug-in processor.
    `XBRLValidationReport` | `validate(XBRLInstance doc)` This method validates an instance document (doc) against the content of the formula linkbase.

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

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

- - ### Field Detail

    - #### qError

          public static javax.xml.namespace.QName qError

      The q error.

    - #### PROCESSORNAME

          public static final java.lang.String PROCESSORNAME

      The Constant PROCESSORNAME.
      See Also:
        Constant Field Values

    - #### variable_set_arcrole_URI

          public static final java.lang.String variable_set_arcrole_URI

      http://xbrl.org/arcrole/2008/variable-set
      See Also:
        Constant Field Values

    - #### variable_filter_arcrole_URI

          public static final java.lang.String variable_filter_arcrole_URI

      http://xbrl.org/arcrole/2008/variable-filter
      See Also:
        Constant Field Values

    - #### variable_set_filter_arcrole_URI

          public static final java.lang.String variable_set_filter_arcrole_URI

      http://xbrl.org/arcrole/2008/variable-set-filter
      See Also:
        Constant Field Values

    - #### variable_set_precondition_arcrole_URI

          public static final java.lang.String variable_set_precondition_arcrole_URI

      http://xbrl.org/arcrole/2008/variable-set-precondition
      See Also:
        Constant Field Values

    - #### equality_definition_arcrole_URI

          public static final java.lang.String equality_definition_arcrole_URI

      http://xbrl.org/arcrole/2008/equality-definition
      See Also:
        Constant Field Values

    - #### consistency_assertion_formula_URI

          public static final java.lang.String consistency_assertion_formula_URI

      http://xbrl.org/arcrole/2008/consistency-assertion-formula
      See Also:
        Constant Field Values

    - #### consistency_assertion_parameter_URI

          public static final java.lang.String consistency_assertion_parameter_URI

      http://xbrl.org/arcrole/2008/consistency-assertion-parameter
      See Also:
        Constant Field Values

    - #### assertion_satisfied_message_URI

          public static final java.lang.String assertion_satisfied_message_URI

      http://xbrl.org/arcrole/2010/assertion-satisfied-message
      See Also:
        Constant Field Values

    - #### assertion_unsatisfied_message_URI

          public static final java.lang.String assertion_unsatisfied_message_URI

      http://xbrl.org/arcrole/2010/assertion-unsatisfied-message
      See Also:
        Constant Field Values

    - #### boolean_filter_arcrole_URI

          public static final java.lang.String boolean_filter_arcrole_URI

      http://xbrl.org/arcrole/2008/boolean-filter
      See Also:
        Constant Field Values

    - #### assertion_set_arcrole_URI

          public static final java.lang.String assertion_set_arcrole_URI

      http://xbrl.org/arcrole/2008/assertion-set
      See Also:
        Constant Field Values

    - #### function_implementation_URI

          public static final java.lang.String function_implementation_URI

      http://xbrl.org/arcrole/2010/function-implementation
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### configure

          public void configure(java.util.Properties properties)

      Description copied from interface: `XBRLPlugInProcessor`
      Configures the processor according with the properties passed in in the properties parameter.
      Specified by:
        `configure` in interface `XBRLPlugInProcessor`
      Parameters:
        `properties` - the properties

    - #### addXFILibrary

          public void addXFILibrary(net.sf.saxon.expr.StaticContext sc)

      Adds the xfi library.
      Parameters:
        `sc` - the sc

    - #### addXFFLibrary

          public void addXFFLibrary(net.sf.saxon.expr.StaticContext sc)

      Adds the xff library.
      Parameters:
        `sc` - the sc

    - #### addCustomLibraries

          public void addCustomLibraries(net.sf.saxon.sxpath.IndependentContext ic)

      Adds the custom libraries.
      Parameters:
        `ic` - the ic

    - #### addRSLibrary

          public void addRSLibrary(net.sf.saxon.sxpath.IndependentContext ic)

      Adds the rs library.
      Parameters:
        `ic` - the ic

    - #### create

          public static XBRLFormulaProcessor create(DTSContainer dts)
                                             throws com.rs.lic.LicenseVerificationException,
                                                    XBRLValidationException

      Creates the.
      Parameters:
        `dts` - the dts
      Returns:
        the XBRL formula processor
      Throws:
        `com.rs.lic.LicenseVerificationException` - the license verification exception
        `XBRLValidationException` - the XBRL validation exception

    - #### getVariableSetArcroleType

          public XBRLArcroleType getVariableSetArcroleType()

      Gets the variable set arcrole type.
      Returns:
        the variable set arcrole type

    - #### getVariableFilterArcroleType

          public XBRLArcroleType getVariableFilterArcroleType()

      Gets the variable filter arcrole type.
      Returns:
        the variable filter arcrole type

    - #### getVariableSetFilterArcroleType

          public XBRLArcroleType getVariableSetFilterArcroleType()

      Gets the variable set filter arcrole type.
      Returns:
        the variable set filter arcrole type

    - #### getVariableSetPreconditionArcroleType

          public XBRLArcroleType getVariableSetPreconditionArcroleType()

      Gets the variable set precondition arcrole type.
      Returns:
        the variable set precondition arcrole type

    - #### getEqualityDefinitionArcroleType

          public XBRLArcroleType getEqualityDefinitionArcroleType()

      Gets the equality definition arcrole type.
      Returns:
        the equality definition arcrole type

    - #### getConsistencyAssertionParameterArcroleType

          public XBRLArcroleType getConsistencyAssertionParameterArcroleType()

      Gets the consistency assertion parameter arcrole type.
      Returns:
        the consistency assertion parameter arcrole type

    - #### getConsistencyAssertionFormulaArcroleType

          public XBRLArcroleType getConsistencyAssertionFormulaArcroleType()

      Gets the consistency assertion formula arcrole type.
      Returns:
        the consistency assertion formula arcrole type

    - #### getFunctionImplementarionArcroleType

          public XBRLArcroleType getFunctionImplementarionArcroleType()

      Gets the function implementarion arcrole type.
      Returns:
        the function implementarion arcrole type

    - #### getAssertionSatisfiedMessageArcroleType

          public XBRLArcroleType getAssertionSatisfiedMessageArcroleType()

      Gets the assertion satisfied message arcrole type.
      Returns:
        the assertion satisfied message arcrole type

    - #### getAssertionUnsatisfiedMessageArcroleType

          public XBRLArcroleType getAssertionUnsatisfiedMessageArcroleType()

      Gets the assertion unsatisfied message arcrole type.
      Returns:
        the assertion unsatisfied message arcrole type

    - #### getBooleanFilterArcroleType

          public XBRLArcroleType getBooleanFilterArcroleType()

      Gets the boolean filter arcrole type.
      Returns:
        the boolean filter arcrole type

    - #### getAssetionSetArcroleType

          public XBRLArcroleType getAssetionSetArcroleType()

      Gets the assetion set arcrole type.
      Returns:
        the assetion set arcrole type

    - #### validate

          public XBRLValidationReport validate()

      Description copied from interface: `XBRLPlugInProcessor`
      Validates the content of the DTS according to the rules indicated in this plug-in processor.

      This is the method that is called by the DTSContainer on each XBRLPlugInProcessor when the validation() method is called on the DTSContainer instance.

      Specified by:
        `validate` in interface `XBRLPlugInProcessor`
      Returns:
        an XBRLValidationReport object `XBRLValidationReport`

    - #### validate

          public XBRLValidationReport validate(XBRLDocument doc)

      Description copied from interface: `XBRLPlugInProcessor`
      Validates the document according to the rules indicated in this plug-in processor.
      Specified by:
        `validate` in interface `XBRLPlugInProcessor`
      Parameters:
        `doc` - the x document
      Returns:
        an XBRLValidationReport object `XBRLValidationReport`

    - #### validate

          public XBRLValidationReport validate(XBRLInstance doc)

      This method validates an instance document (doc) against the content of the formula linkbase. The validation result is returned in a XBRLValidationReport object. That object includes exceptions, assertion results and the output instance.
      Parameters:
        `doc` - input instance document
      Returns:
        XBRLValidationReport validation report object with errors

    - #### getCustomFunctionsLibraryList

          public XBRLCustomFunctionsLibraryList getCustomFunctionsLibraryList()

      Access to the library list that contains custom function implementations.
      Returns:
        the instance of XBRLCustomFunctionsLibraryList class that is unique on this instance of the formula processor

    - #### getAspectsCache

          public AspectsCache getAspectsCache()

      The aspects cache is used internally by the processor in order to accelerate implicit filtering. It is not available to users for their own use.

      For internal use only.

      Returns:
        null if the processor is not evaluating formulas or the instance of the AspectsCache for the running processor

    - #### getFilterMemberCache

          public FilterMemberCache getFilterMemberCache()

      Gets the filter member cache.
      Returns:
        the filter member cache

    - #### getFactHasExplicitDimensionValueCache

          public FactHasExplicitDimensionValueCache getFactHasExplicitDimensionValueCache()

      Gets the fact has explicit dimension value cache.
      Returns:
        the fact has explicit dimension value cache

    - #### isStrictXPath

          public boolean isStrictXPath()

      Convenient method to obtain the value of the DTSContainer.FORMULA_PROCESSOR_USE_STRICT_SPECIFICATION_XPATH property
      Returns:
        boolean value after parsing.

    - #### informRunning

          public void informRunning(AssertionExecutor ae)

      Called from the thread running the XBRLFormulaProcessor instance. This method copies the assertion executor into the list of running executors
      Parameters:
        `ae` - the ae

    - #### informEnd

          public void informEnd(AssertionExecutor ae,
                       long elapsedTime)

      Called from other threads once execution ends.
      Parameters:
        `ae` - the ae
        `elapsedTime` - the elapsed time

    - #### removeInScopeInstance

          public void removeInScopeInstance(XBRLInstance doc)

      Removes the in scope instance.
      Parameters:
        `doc` - the doc

    - #### addInScopeInstance

          public void addInScopeInstance(XBRLInstance doc)

      Adds the in scope instance.
      Parameters:
        `doc` - the doc

    - #### setUnderEvaluationResourceId

          public void setUnderEvaluationResourceId(java.lang.String id)

      This method sets the value of the formula or assertion identifier that is being evaluated.
      Parameters:
        `id` - the assertion or formula id or null to unset the value after execution is finished
      See Also:
        `getUnderEvaluationResourceId()`

    - #### getUnderEvaluationResourceId

          public java.lang.String getUnderEvaluationResourceId()

      This method returns the formula or assertion resource id that is being evaluated. This method can be used by functions that requires access to thr resource if for logging purposes
      Returns:
        String

    - #### getUnderEvaluationFormula

          public XBRLFormula getUnderEvaluationFormula()

      This method returns the formula that is being evaluated. This method can be used by functions that requires access to variables and the assigned value for a variable during the evaluation of an XPath expression
      Returns:
        XBRLFormula

    - #### evaluateFormulaSet

          public void evaluateFormulaSet(java.util.Collection<XBRLFormula> formulas,
                                XBRLValidationReport valReport,
                                XBRLInstance doc,
                                ExecutionTargetType targetType)

      Evaluates a collection of formulas and put the result inside the validation report passed in as parameter valReport.

      This method is called from the processor in order to evaluate the formula set and from assertions that contains dependant formulas before the assertion is evaluated.

      Parameters:
        `formulas` - the collection of formulas to evaluate
        `valReport` - the validation report where the results will be placed. The returned instance document will he here too.
        `doc` - the contextual information for the formulas to evaluate.
        `targetType` - the target type

    - #### getValidationReport

          public XBRLValidationReport getValidationReport()

      Access to the validation report that is active during formula validation.

      This method is used internally by the API in order to add warning messages generated by the evaluation of filters and other areas of the formula processor.

      Returns:
        the validationReport which is an instance of XBRLValidationReport or null if the processor is not under validation

    - #### getContainer

          public DTSContainer getContainer()

      Gets the container.
      Returns:
        the container

    - #### compileResources

          public XBRLValidationReport compileResources()

      Compile resources.
      Specified by:
        `compileResources` in interface `XBRLCompilableProcessor`
      Returns:
        the XBRL validation report

    - #### getFormulas

          public java.util.Collection<XBRLFormula> getFormulas()

      Access to all formula resources loaded from the linkbases and compiled as XBRLFormula instances.
      Returns:
        collection of XBRL formula instances

    - #### getAssertions

          public java.util.Collection<XBRLAssertion> getAssertions()

      Access to all value assertions and existence assertions defined in the DTS and loaded from the linkbases.
      Returns:
        collection of XBRL assertion instances

    - #### getConsistencyAssertions

          public java.util.Collection<XBRLConsistencyAssertion> getConsistencyAssertions()

      Access to all consistency assertions defined in the DTS and loaded from the linkbases.
      Returns:
        collection of XBRL consistency assertion instances

    - #### addVariableParameter

          public void addVariableParameter(XBRLVariableParameter variableParameter)
                                    throws XFxbrlveParameterNameClash

      Adds the variable parameter.
      Parameters:
        `variableParameter` - the variable parameter
      Throws:
        `XFxbrlveParameterNameClash` - the x fxbrlve parameter name clash

    - #### addCustomFunctionLibrary

          public void addCustomFunctionLibrary(XBRLRSCustomFunctionLibrary fl)

      Adds a Function Library to the set of function libraries available to the processor. Function Libraries implements XPath functions that may be referenced from within XPath 2.0 expressions and extends the functionality of the formula processor.
      Parameters:
        `fl` - the new FunctionLibrary instance

    - #### addFormula

          public void addFormula(XBRLFormula formula)

      Adds the formula.
      Parameters:
        `formula` - the formula

    - #### declareNamespaces

          public static void declareNamespaces(XBRLResource resource,
                               net.sf.saxon.s9api.XPathCompiler compiler)

      Helper method to declare all namespaces in the resource indicated as a parameter in the XPath compiler received as a parameter.
      Parameters:
        `resource` - the source element where the namespaces are declared
        `compiler` - the target XPath compiler where namespaces will be copied to

    - #### getUnderEvaluationInstance

          public XBRLInstance getUnderEvaluationInstance()

      Gets the under evaluation instance.
      Returns:
        the under evaluation instance

    - #### setUnderEvaluationInstance

          public void setUnderEvaluationInstance(XBRLInstance valInstance)

      Sets or clear the instance document that is in the scope of formula functions. If the argument is null, all instances in the scope are removed.
      Parameters:
        `valInstance` - the new under evaluation instance

    - #### getFPXPathCompiler

          public net.sf.saxon.s9api.XPathCompiler getFPXPathCompiler(net.sf.saxon.om.NamespaceResolver namespaceResolver,
                                                            XMLFragment fragment,
                                                            boolean schemaAware)

      Always return a new XPathCompiler object with the IndependentContext namespace Resolver set to the namespaceResolver supplied as a parameter. This function also adds the XFI function library to the XPath compiler.
      Parameters:
        `namespaceResolver` - the namespace resolver
        `fragment` - XMLFragment used to obtain the Base URI for the XPathCompiler
        `schemaAware` - if true, the new XPathCompiler will be Schema Aware. All schemas currently loaded will be in the scope schemas for XPath compilation. It is safe to always put 'true' here.
      Returns:
        XPathCompiler

    - #### collectVariables

          public void collectVariables(java.util.Collection<javax.xml.namespace.QName> hsVars)

      Add parameter variables to the collection received as a parameter This method can add only global variables available to all formulas.
      Parameters:
        `hsVars` - the hs vars

    - #### getParametersForBinding

          public java.util.Vector<XBRLVariableResourceUse> getParametersForBinding()

      Creates a new Vector of XBRLVariableResourceUse and returns it to the calling application.

      When a parameter is found during the compilation phase it is stored in the XBRLFormulaProcessor instance as an instance of a XBRLVariableParameter. When this function is called, a new Vector of XBRLVariableResourceUse is created so the parameter can be evaluated by multiple threads in parallel.

      The class XBRLVariableParameter contains information about the parameter that can be shared across threads. the class XBRLVariableResourceUse is associated with the running thread.

      Returns:
        new Vector of XBRLVariableResourceUse with all parameters registered in the DTS.

    - #### getParameterForBinding

          public XBRLVariableResourceUse getParameterForBinding(javax.xml.namespace.QName var)

      Access to the XBRLVariableParameter using the parameter name (which is also the variable name on XPath expressions).
      Parameters:
        `var` - the variable or parameter name
      Returns:
        XBRLVariableParameter instance or null if not defined

    - #### setParametersResolver

          public void setParametersResolver(XBRLFormulaParametersResolver pResolver)

      Sets the external parameters resolver to the instance of the class indicated by the parameter.
      Parameters:
        `pResolver` - the new parameters resolver

    - #### getParameterResolver

          public XBRLFormulaParametersResolver getParameterResolver()

      Gets the parameter resolver.
      Returns:
        the parameter resolver

    - #### removeFormula

          public void removeFormula(XBRLFormula xbrlFormula)

      Marks a formula to be removed from the formula list. This happens if the formula contains unrecoverable errors during static checking or when an assertion will use this formula internally.

      The function does nothing if the formula is already removed.

      Parameters:
        `xbrlFormula` - the xbrl formula

    - #### getDescription

          public java.lang.String getDescription()

      Description copied from interface: `XBRLPlugInProcessor`
      Returns the processor description so it can be written in validation reports.
      Specified by:
        `getDescription` in interface `XBRLPlugInProcessor`
      Returns:
        the description

    - #### getName

          public java.lang.String getName()

      Description copied from interface: `XBRLPlugInProcessor`
      Returns the processor name so it can be written in validation reports.
      Specified by:
        `getName` in interface `XBRLPlugInProcessor`
      Returns:
        the name

    - #### getDescriptionStatic

          public static java.lang.String getDescriptionStatic()

      Gets the description static.
      Returns:
        the description static

    - #### addAssertion

          public void addAssertion(XBRLAssertion assertion)

      Adds the assertion.
      Parameters:
        `assertion` - the assertion

    - #### addCustomFunctionDeclaration

          public void addCustomFunctionDeclaration(XBRLCustomFunction customFunction)

      Adds the custom function declaration.
      Parameters:
        `customFunction` - the custom function

    - #### addConsistencyAssertion

          public void addConsistencyAssertion(XBRLConsistencyAssertion consistencyAssertion)

      Adds the consistency assertion.
      Parameters:
        `consistencyAssertion` - the consistency assertion

    - #### matcheable

          public boolean matcheable(XBRLFact fact1,
                           XBRLFact fact2,
                           int aspectModel,
                           XMLFragment context)

      Computes if two facts are aspect-matched input facts as defined in the Formula specification.
      Parameters:
        `fact1` - the fact1
        `fact2` - the fact2
        `aspectModel` - the aspect model
        `context` - the context
      Returns:
        true, if successful

    - #### getCacheFact

          public XBRLFact getCacheFact(net.sf.saxon.s9api.XdmNode factNode)

      Search for a fact using the fact node. This search traverses all in scope instance documents until one is found.
      Parameters:
        `factNode` - the fact node
      Returns:
        the cache fact

    - #### getUnitById

          public XBRLUnit getUnitById(java.lang.String id,
                             java.net.URI documentURI)

      Gets the unit by id.
      Parameters:
        `id` - the id
        `documentURI` - the document uri
      Returns:
        the unit by id

    - #### getElementById

          public XMLFragment getElementById(java.lang.String id,
                                   java.net.URI documentURI)

      Gets the element by id.
      Parameters:
        `id` - the id
        `documentURI` - the document uri
      Returns:
        the element by id

    - #### getContextById

          public XBRLContext getContextById(java.lang.String id,
                                   java.net.URI documentURI)

      Gets the context by id.
      Parameters:
        `id` - the id
        `documentURI` - the document uri
      Returns:
        the context by id

    - #### compileExpressionAndCollectRequiredVariables

          public static net.sf.saxon.s9api.XPathExecutable compileExpressionAndCollectRequiredVariables(java.lang.String selectExpression,
                                                                                        java.util.Collection<javax.xml.namespace.QName> requiredVariables,
                                                                                        java.util.Collection<net.sf.saxon.s9api.QName> preDefinedVariables,
                                                                                        net.sf.saxon.om.NamespaceResolver nsResolver,
                                                                                        XBRLFormulaResource fragment)
                                                                                                 throws XFValidationException

      Compile expression and collect required variables.
      Parameters:
        `selectExpression` - the select expression
        `requiredVariables` - (OUT) the required variables. from the preDefinedVariables.
        `preDefinedVariables` - (IN) the complete set of variables available. Only variables required by the expression will be moved from here to the requiredVariables parameter.
        `nsResolver` - the ns resolver
        `fragment` - instance of XBRLFormulaResource
      Returns:
        the x path executable
      Throws:
        `XFValidationException` - the XF validation exception

    - #### getStatus

          public FormulaProcessorStatus getStatus()

      Normally called from another thread, this method returns an instance of a FormulaProcessorStatus class that provides information about the number of formulas, number of assertions, number of consistency assertions. number of running threads, maximum time of a thread and what every thread is doing.
      Returns:
        FormulaProcessorStatus instance

    - #### setUnderEvaluationVariable

          public void setUnderEvaluationVariable(javax.xml.namespace.QName variableName)

      Sets the under evaluation variable. This call is used internally by the formula processor and shall not be used by applications
      Parameters:
        `variableName` - the new under evaluation variable

    - #### getUnderEvaluationVariableName

          public javax.xml.namespace.QName getUnderEvaluationVariableName()

      During the evaluation of an XPath expression in order to set the value of a variable name, the variable name of the variable that is being evaluated can be obtained by a call to this method.

      The method will return null if there are no variable being evaluated. extension functions may access this method in order to access to the variable resource use and examine filters as is the case of the relative filter.

      Returns:
        QName

    - #### setUnderEvaluationUncoveredAspectValue

          public void setUnderEvaluationUncoveredAspectValue(HasUncoveredAspectValueResolver resolver)

      Sets the value for the resolver of the xff:uncovered-aspect function.
      Parameters:
        `resolver` - the new under evaluation uncovered aspect value

    - #### getUnderEvaluationUncoveredAspectValue

          public HasUncoveredAspectValueResolver getUnderEvaluationUncoveredAspectValue()

      Access to the value of the instance of the class that will resolve values for the xff:uncovered-aspect function.
      Returns:
        HasUncoveredAspectValueResolver

    - #### evaluate

          public XBRLValidationReport evaluate(XBRLResource resource,
                                      XBRLInstance instance)

      Evaluates one resource and returns an XBRLValidationReport instance. the parameter must be an already compiled XBRL formula resource of the following types: XBRLFormula, XBRLAssertion, XBRLConsistencyAssertion

      This method is used by the GUI of the FormulaTT class.

      Parameters:
        `resource` - the resource
        `instance` - the instance
      Returns:
        XBRLValidationReport

    - #### cleanFormulaExpression

          public static java.lang.String cleanFormulaExpression(java.lang.String expression)

      Helper function that cleans up the content of an XPath expression so it can be used as a text string in a GUI.

      The method trims the expression and then replaces cr by spaces.

      Parameters:
        `expression` - string XPath expression
      Returns:
        String in a single line of text

    - #### getFilterOrderInstance

          public XBRLFilterOrderTool getFilterOrderInstance()

      The formula specification is not defining the order in which filters shall be arranged to create the XPath evaluation expression. Different orders may result in XPath evaluation expression errors.

      Starting with version 2.8.1 it is possible to define other classes implementing the XBRLFilterOrderTool interface by providing the class name in the http://www.reportingstandard.com/FormulaProcessor/FilterOrderClass property. For convenience, that property is defined in the DTSContainer.FORMULA_PROCESSOR_FILTER_ORDER_CLASS constant.

      Returns:
        This method returns an instance of the class implementing the interface that provides a mechanism to define the order for filters. The default implementation of the interface is an instance of the XBRLFilterOrderTool class that is the first implementation that passes the entire formula conformance suite.
      Since:
        2.8.1

    - #### freeUnnecessary

          public void freeUnnecessary()
                               throws com.rs.lic.LicenseVerificationException,
                                      XBRLValidationException

      Removes all resources and allows to call compileResources() again This method is called in the last step of the DTS loading process and specially when load is called multiple times.
      Specified by:
        `freeUnnecessary` in interface `XBRLCompilableProcessor`
      Throws:
        `com.rs.lic.LicenseVerificationException` - the license verification exception
        `XBRLValidationException` - the XBRL validation exception

    - #### clear

          public void clear()

      Description copied from interface: `XBRLPlugInProcessor`
      Called when the DTSContainer's clear method is called. Shall clean up resources and empty tables.
      Specified by:
        `clear` in interface `XBRLPlugInProcessor`

    - #### isHidden

          public boolean isHidden()

      Description copied from interface: `XBRLPlugInProcessor`
      A hidden processor will not pop-up in the GUI tabs.
      Specified by:
        `isHidden` in interface `XBRLPlugInProcessor`
      Returns:
        true if processor is hidden. False if the processor has a GUI