com.ihr.xbrl.om.renderhints

## Class RenderHintsProcessor

- java.lang.Object
- - com.ihr.xbrl.om.renderhints.RenderHintsProcessor

- All Implemented Interfaces:
    XBRLCompilableProcessor, XBRLPlugInProcessor

      public class RenderHintsProcessor
      extends java.lang.Object
      implements XBRLCompilableProcessor

  The Class RenderHintsProcessor.
  Author:
    Ignacio

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `namespace` The Constant namespace.
    `static java.lang.String` | `prefix` The Constant prefix.
    `static java.lang.String` | `PROCESSORNAME` The Constant PROCESSORNAME.
    `static java.lang.String` | `roleHintsArcrole_URI` The Constant roleHintsArcrole_URI.
    `static java.lang.String` | `schemaURL` The Constant schemaURL.
    `static javax.xml.namespace.QName` | `voidPrimaryItem` The Constant voidPrimaryItem.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.Properties` | `addProcessor(java.util.Properties initialProperties)` This method receives a Properties instance that already contains a DTSContainer.PROCESSORS_SEQUENCE property and modifies it so the RenderingHints processor is added to the chain
    `void` | `clear()` Called when the DTSContainer's clear method is called.
    `XBRLValidationReport` | `compileResources()` Compile resources.
    `void` | `configure(java.util.Properties properties)` Configures the processor according with the properties passed in in the properties parameter.
    `static RenderHintsProcessor` | `create(DTSContainer dts)` Creates the.
    `void` | `freeUnnecessary()` Liberates resources no longer needed.
    `DTSContainer` | `getContainer()` Gets the container.
    `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.
    `java.lang.String` | `getName()` Returns the processor name so it can be written in validation reports.
    `java.util.Iterator<java.lang.String>` | `getRolesWithHints()` Returns an iterator over preferred roles.
    `boolean` | `isHidden()` A hidden processor will not pop-up in the GUI tabs.
    `int` | `searchPreferredIndex(java.lang.String role, int mode, XBRLItem primaryItem, Dimension<?> dim)` Search preferred index.
    `int` | `searchPreferredMode(java.lang.String roleString, int retVal)` Returns the preferred view mode for the specific role if set.
    `int` | `searchPreferredPosition(java.lang.String role, int mode, XBRLItem primaryItem, Dimension<?> dim)` Search preferred position.
    `javax.xml.namespace.QName` | `searchPreferredPrimaryItem(java.lang.String roleString)` Search for the selected primary item on the preferred view for the role indicated in the roleString parameter.
    `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

    - #### schemaURL

          public static final java.lang.String schemaURL

      The Constant schemaURL.
      See Also:
        Constant Field Values

    - #### namespace

          public static final java.lang.String namespace

      The Constant namespace.
      See Also:
        Constant Field Values

    - #### prefix

          public static final java.lang.String prefix

      The Constant prefix.
      See Also:
        Constant Field Values

    - #### voidPrimaryItem

          public static final javax.xml.namespace.QName voidPrimaryItem

      The Constant voidPrimaryItem.

    - #### roleHintsArcrole_URI

          public static final java.lang.String roleHintsArcrole_URI

      The Constant roleHintsArcrole_URI.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### create

          public static RenderHintsProcessor create(DTSContainer dts)

      Creates the.
      Parameters:
        `dts` - the dts
      Returns:
        the render hints processor

    - #### getContainer

          public DTSContainer getContainer()

      Gets the container.
      Returns:
        the container

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

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

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

    - #### getDescriptionStatic

          public static java.lang.String getDescriptionStatic()

      Gets the description static.
      Returns:
        the description static

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

    - #### compileResources

          public XBRLValidationReport compileResources()

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

    - #### freeUnnecessary

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

      Description copied from interface: `XBRLCompilableProcessor`
      Liberates resources no longer needed.
      Specified by:
        `freeUnnecessary` in interface `XBRLCompilableProcessor`
      Throws:
        `com.rs.lic.LicenseVerificationException` - the license verification exception
        `XBRLValidationException` - the XBRL validation exception

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

    - #### addProcessor

          public static java.util.Properties addProcessor(java.util.Properties initialProperties)

      This method receives a Properties instance that already contains a DTSContainer.PROCESSORS_SEQUENCE property and modifies it so the RenderingHints processor is added to the chain
      Parameters:
        `initialProperties` - the initial properties
      Returns:
        initialProperties modified

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

    - #### searchPreferredPosition

          public int searchPreferredPosition(java.lang.String role,
                                    int mode,
                                    XBRLItem primaryItem,
                                    Dimension<?> dim)

      Search preferred position.
      Parameters:
        `role` - the role
        `mode` - the mode
        `primaryItem` - the primary item
        `dim` - the dim
      Returns:
        the int

    - #### searchPreferredIndex

          public int searchPreferredIndex(java.lang.String role,
                                 int mode,
                                 XBRLItem primaryItem,
                                 Dimension<?> dim)

      Search preferred index.
      Parameters:
        `role` - the role
        `mode` - the mode
        `primaryItem` - the primary item
        `dim` - the dim
      Returns:
        the int

    - #### searchPreferredMode

          public int searchPreferredMode(java.lang.String roleString,
                                int retVal)

      Returns the preferred view mode for the specific role if set. If unset, the retVal is returned
      Parameters:
        `roleString` - the role to search for
        `retVal` - the value to return if not specifically set
      Returns:
        the int

    - #### searchPreferredPrimaryItem

          public javax.xml.namespace.QName searchPreferredPrimaryItem(java.lang.String roleString)

      Search for the selected primary item on the preferred view for the role indicated in the roleString parameter.
      Parameters:
        `roleString` - the role string
      Returns:
        QName of the primary item or null if none defined

    - #### getRolesWithHints

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

      Returns an iterator over preferred roles.
      Returns:
        the roles with hints