com.ihr.xbrl.formula

## Class FlFormulaProcessor

- java.lang.Object
- - com.ihr.xbrl.formula.FlFormulaProcessor

- All Implemented Interfaces:
    XBRLPlugInProcessor

      public class FlFormulaProcessor
      extends java.lang.Object
      implements XBRLPlugInProcessor

  The Class FlFormulaProcessor.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.util.logging.Logger` | `logger` The logger.
    `static java.lang.String` | `PROCESSORNAME` The Constant PROCESSORNAME.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FlFormulaProcessor(DTSContainer dts)` Instantiates a new fl formula processor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.net.URI` | `addSchema(java.lang.String namespace, java.net.URI uri)` Adds the schema.
    `void` | `clear()` Called when the DTSContainer's clear method is called.
    `void` | `configure(java.util.Properties properties)` Configures the processor according with the properties passed in in the properties parameter.
    `XBRLInstance[]` | `formulaInstanceCreation(XBRLInstance source)` Formula instance creation.
    `java.lang.String[]` | `formulaValidationStr(XBRLInstance source)` Formula validation str.
    `DTSContainer` | `getContainer()` Gets the container.
    `java.lang.String` | `getDescription()` Returns the processor description so it can be written in validation reports.
    `java.util.Iterator<FlFormula>` | `getFormulasInstanceValidationIterator()` Gets the formulas instance validation iterator.
    `FlFunctionsResolver` | `getFunctionsResolver()` Gets the functions resolver.
    `XBRLInstance` | `getInstance()` Gets the single instance of FlFormulaProcessor.
    `java.lang.String` | `getName()` Returns the processor name so it can be written in validation reports.
    `boolean` | `isHidden()` A hidden processor will not pop-up in the GUI tabs.
    `void` | `loadBase(DTSBase base)` Load base.
    `FlVariable` | `searchVariable(javax.xml.namespace.QName var)` Search variable.
    `void` | `setInstance(XBRLInstance instance)` Sets the instance.
    `XBRLValidationReport` | `validate()` Validates the content of the DTS according to the rules indicated in this plug-in processor.
    `XBRLValidationReport` | `validate(XBRLDocument xDocument)` Validates the document according to the rules indicated in this plug-in processor.

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

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

- - ### Field Detail

    - #### PROCESSORNAME

          public static final java.lang.String PROCESSORNAME

      The Constant PROCESSORNAME.
      See Also:
        Constant Field Values

    - #### logger

          public java.util.logging.Logger logger

      The logger.

  - ### Constructor Detail

    - #### FlFormulaProcessor

          public FlFormulaProcessor(DTSContainer dts)
                             throws com.rs.lic.LicenseVerificationException

      Instantiates a new fl formula processor.
      Parameters:
        `dts` - the dts
      Throws:
        `com.rs.lic.LicenseVerificationException` - the license verification exception

  - ### Method Detail

    - #### addSchema

          public java.net.URI addSchema(java.lang.String namespace,
                               java.net.URI uri)

      Adds the schema.
      Parameters:
        `namespace` - the namespace
        `uri` - the uri
      Returns:
        the uri

    - #### loadBase

          public void loadBase(DTSBase base)
                        throws XBRLValidationException

      Load base.
      Parameters:
        `base` - the base
      Throws:
        `XBRLValidationException` - the XBRL validation exception

    - #### getContainer

          public DTSContainer getContainer()

      Gets the container.
      Returns:
        the container

    - #### searchVariable

          public FlVariable searchVariable(javax.xml.namespace.QName var)

      Search variable.
      Parameters:
        `var` - the var
      Returns:
        the fl variable

    - #### setInstance

          public void setInstance(XBRLInstance instance)
                           throws net.sf.saxon.trans.XPathException

      Sets the instance.
      Parameters:
        `instance` - the new instance
      Throws:
        `net.sf.saxon.trans.XPathException` - the x path exception

    - #### getFormulasInstanceValidationIterator

          public java.util.Iterator<FlFormula> getFormulasInstanceValidationIterator()

      Gets the formulas instance validation iterator.
      Returns:
        the formulas instance validation iterator

    - #### getFunctionsResolver

          public FlFunctionsResolver getFunctionsResolver()

      Gets the functions resolver.
      Returns:
        the functions resolver

    - #### getInstance

          public XBRLInstance getInstance()

      Gets the single instance of FlFormulaProcessor.
      Returns:
        single instance of FlFormulaProcessor

    - #### formulaInstanceCreation

          public XBRLInstance[] formulaInstanceCreation(XBRLInstance source)
                                                 throws FlCompilationException,
                                                        DTSDiscoveryException

      Formula instance creation.
      Parameters:
        `source` - the source
      Returns:
        the XBRL instance[]
      Throws:
        `FlCompilationException` - the fl compilation exception
        `DTSDiscoveryException` - the DTS discovery exception

    - #### formulaValidationStr

          public java.lang.String[] formulaValidationStr(XBRLInstance source)
                                                  throws FlCompilationException,
                                                         DTSDiscoveryException

      Formula validation str.
      Parameters:
        `source` - the source
      Returns:
        the string[]
      Throws:
        `FlCompilationException` - the fl compilation exception
        `DTSDiscoveryException` - the DTS discovery exception

    - #### 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`

    - #### 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

    - #### 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

    - #### validate

          public XBRLValidationReport validate(XBRLDocument xDocument)

      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:
        `xDocument` - the x document
      Returns:
        an XBRLValidationReport object `XBRLValidationReport`

    - #### 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

    - #### 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`