com.ihr.xbrl.transform.target

## Class HTMLReportHandler

- java.lang.Object
- - com.ihr.xbrl.transform.target.XBRLReportHandler
  - - com.ihr.xbrl.transform.target.HTMLReportHandler

- All Implemented Interfaces:
    DefaultUnitProviderInterface, LangsProvider, NegatedSupport, HasBoySupport, XBRLReportHandlerInterface, XBRLTransformationResult, javax.xml.xpath.XPathVariableResolver

      public class HTMLReportHandler
      extends XBRLReportHandler
      implements XBRLTransformationResult, javax.xml.xpath.XPathVariableResolver, LangsProvider

  The Class HTMLReportHandler.
  Author:
    Ignacio

- - ### Field Summary

    - ### Fields inherited from interface com.ihr.xbrl.dts.NegatedSupport

      `negatedRoleURIS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HTMLReportHandler(TransformProcessor tp)` Instantiates a new HTML report handler.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `askUserNewBoyMonth()` Shows a dialog asking the user to set a new Beginning of fiscal year .
    `XBRLTransformationResult` | `createNewResult(net.sf.saxon.s9api.Processor proc)` Creates a new document container.
    `void` | `endOfDocument()` Called by the transformation processor to indicate the end of a document processing Usually a document footer is produced.
    `int` | `getBoyMonth()` Returns the month that has been set as the beginning of the fiscal year in the tool
    `java.net.URI` | `getConfigFile()` Returns back the URI of the configuration file.
    `javax.xml.namespace.QName` | `getDefaultUnit()` The default unit to be used when no other data is available.
    `java.util.Iterator<java.lang.String>` | `getLangs()` Gets the langs.
    `java.lang.Object` | `getResult()` Obtains the result of the loading process as an object.
    `void` | `init()` Inits the.
    `boolean` | `isNegated(XBRLFactItem fact)` true if the user interface is using a negated label role for .
    `void` | `processContexts(java.util.Iterator<XBRLContext> contexts)` Called by the transformation processor to provide the contexts for the data that will be found later during the processing of facts the default process updates the content of some variables.
    `java.lang.Object` | `resolveVariable(javax.xml.namespace.QName variableName)`
    `void` | `sendToResult(javax.xml.transform.Result outputTarget)` Serializes the generated document to the next component in the XML pipe (Result object) This method will be called once per document.
    `void` | `setBoyMonth(int newBoyMonth)` Sets a new month as the Beginning of a fiscal year. 0 = January
    `void` | `setConfigFile(java.net.URI configFile)` Sets the config file.
    `void` | `setLangs(java.util.Collection<java.lang.String> lang)` Sets the langs.
    `void` | `showNewLangsAddedMessage()` an application that implements LangsProvider is informed about new languages added to the languages lists by the labels provider.
    `void` | `startOfDocument(XBRLInstance instance)` Called by the transformation processor to indicate the start of a new document.

    - ### Methods inherited from class com.ihr.xbrl.transform.target.XBRLReportHandler

      `getFilterContext, getTransformer`

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

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

- - ### Constructor Detail

    - #### HTMLReportHandler

          public HTMLReportHandler(TransformProcessor tp)

      Instantiates a new HTML report handler.
      Parameters:
        `tp` - the tp

  - ### Method Detail

    - #### sendToResult

          public void sendToResult(javax.xml.transform.Result outputTarget)
                            throws javax.xml.transform.TransformerException

      Description copied from interface: `XBRLTransformationResult`
      Serializes the generated document to the next component in the XML pipe (Result object) This method will be called once per document.
      Specified by:
        `sendToResult` in interface `XBRLTransformationResult`
      Parameters:
        `outputTarget` - Result
      Throws:
        `javax.xml.transform.TransformerException` - if something goes wrong or the driver does not support this output method

    - #### createNewResult

          public XBRLTransformationResult createNewResult(net.sf.saxon.s9api.Processor proc)

      Description copied from interface: `XBRLReportHandlerInterface`
      Creates a new document container.
      Specified by:
        `createNewResult` in interface `XBRLReportHandlerInterface`
      Specified by:
        `createNewResult` in class `XBRLReportHandler`
      Parameters:
        `proc` - the Saxonica Processor instance
      Returns:
        XBRLTransformationResult

    - #### endOfDocument

          public void endOfDocument()

      Description copied from interface: `XBRLReportHandlerInterface`
      Called by the transformation processor to indicate the end of a document processing Usually a document footer is produced.
      Specified by:
        `endOfDocument` in interface `XBRLReportHandlerInterface`
      Overrides:
        `endOfDocument` in class `XBRLReportHandler`

    - #### init

          public void init()
                    throws DataTargetConfigurationFileException

      Description copied from interface: `XBRLReportHandlerInterface`
      Inits the.
      Specified by:
        `init` in interface `XBRLReportHandlerInterface`
      Specified by:
        `init` in class `XBRLReportHandler`
      Throws:
        `DataTargetConfigurationFileException` - the data target configuration file exception

    - #### processContexts

          public void processContexts(java.util.Iterator<XBRLContext> contexts)

      Description copied from interface: `XBRLReportHandlerInterface`
      Called by the transformation processor to provide the contexts for the data that will be found later during the processing of facts the default process updates the content of some variables.
      Specified by:
        `processContexts` in interface `XBRLReportHandlerInterface`
      Overrides:
        `processContexts` in class `XBRLReportHandler`
      Parameters:
        `contexts` - Iterator

    - #### setConfigFile

          public void setConfigFile(java.net.URI configFile)

      Description copied from interface: `XBRLReportHandlerInterface`
      Sets the config file.
      Specified by:
        `setConfigFile` in interface `XBRLReportHandlerInterface`
      Specified by:
        `setConfigFile` in class `XBRLReportHandler`
      Parameters:
        `configFile` - the new config file

    - #### getConfigFile

          public java.net.URI getConfigFile()

      Description copied from interface: `XBRLReportHandlerInterface`
      Returns back the URI of the configuration file.
      Specified by:
        `getConfigFile` in interface `XBRLReportHandlerInterface`
      Returns:
        URI

    - #### startOfDocument

          public void startOfDocument(XBRLInstance instance)
                               throws FactHandlerException

      Description copied from interface: `XBRLReportHandlerInterface`
      Called by the transformation processor to indicate the start of a new document. Usually a document header is produced.
      Specified by:
        `startOfDocument` in interface `XBRLReportHandlerInterface`
      Overrides:
        `startOfDocument` in class `XBRLReportHandler`
      Parameters:
        `instance` - the instance
      Throws:
        `FactHandlerException` - the fact handler exception

    - #### getLangs

          public java.util.Iterator<java.lang.String> getLangs()

      Gets the langs.
      Specified by:
        `getLangs` in interface `LangsProvider`
      Returns:
        the lang

    - #### setLangs

          public void setLangs(java.util.Collection<java.lang.String> lang)

      Sets the langs.
      Specified by:
        `setLangs` in interface `LangsProvider`
      Parameters:
        `lang` - the lang to set

    - #### resolveVariable

          public java.lang.Object resolveVariable(javax.xml.namespace.QName variableName)

      Specified by:
        `resolveVariable` in interface `javax.xml.xpath.XPathVariableResolver`

    - #### getResult

          public java.lang.Object getResult()
                                     throws javax.xml.transform.TransformerException

      Description copied from interface: `XBRLTransformationResult`
      Obtains the result of the loading process as an object. The object is normally a document of the target format.
      Specified by:
        `getResult` in interface `XBRLTransformationResult`
      Returns:
        Object any type of object. Each driver must document what they return.
      Throws:
        `javax.xml.transform.TransformerException` - if something goes wrong or the driver does not support this output method

    - #### showNewLangsAddedMessage

          public void showNewLangsAddedMessage()

      Description copied from interface: `LangsProvider`
      an application that implements LangsProvider is informed about new languages added to the languages lists by the labels provider.

      The LabelsProvider requires a LangsProvider during the creation. that LangsProvider is informed about new languages when the labels database is build.

      Applications should show a message to the user or call the LabelsProviderUI.showNewLangsAddedMessage() method that shows an standard message.

      .NET api can use a different UI for the same purpose

      Specified by:
        `showNewLangsAddedMessage` in interface `LangsProvider`

    - #### getBoyMonth

          public int getBoyMonth()

      Description copied from interface: `HasBoySupport`
      Returns the month that has been set as the beginning of the fiscal year in the tool
      Specified by:
        `getBoyMonth` in interface `HasBoySupport`
      Returns:
        integer representing the month. 0 = January

    - #### setBoyMonth

          public void setBoyMonth(int newBoyMonth)

      Description copied from interface: `HasBoySupport`
      Sets a new month as the Beginning of a fiscal year. 0 = January
      Specified by:
        `setBoyMonth` in interface `HasBoySupport`
      Parameters:
        `newBoyMonth` - the new boy month

    - #### askUserNewBoyMonth

          public int askUserNewBoyMonth()

      Description copied from interface: `HasBoySupport`
      Shows a dialog asking the user to set a new Beginning of fiscal year .
      Specified by:
        `askUserNewBoyMonth` in interface `HasBoySupport`
      Returns:
        -1 if the user pressed CANCEL or the new month number 0 = January

    - #### isNegated

          public boolean isNegated(XBRLFactItem fact)

      Description copied from interface: `NegatedSupport`
      true if the user interface is using a negated label role for .
      Specified by:
        `isNegated` in interface `NegatedSupport`
      Parameters:
        `fact` - the fact
      Returns:
        boolean

    - #### getDefaultUnit

          public javax.xml.namespace.QName getDefaultUnit()

      Description copied from interface: `DefaultUnitProviderInterface`
      The default unit to be used when no other data is available.
      Specified by:
        `getDefaultUnit` in interface `DefaultUnitProviderInterface`
      Returns:
        QName