com.ihr.xbrl.om

## Class XBRLCoreProcessor

- java.lang.Object
- - com.ihr.xbrl.om.XBRLCoreProcessor

- All Implemented Interfaces:
    XBRLPlugInProcessor

      public class XBRLCoreProcessor
      extends java.lang.Object
      implements XBRLPlugInProcessor

  This class is a XBRLPlugInProcessor for doing XBRL 2.1 validation of the DTS.
  Author:
    Ignacio

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `PROCESSORNAME` The Constant PROCESSORNAME.
    `static int` | `VALIDATE_CYCLES` Constants to fire specific validation parts.
    `static int` | `VALIDATE_DOCUMENT` The Constant VALIDATE_DOCUMENT.
    `static int` | `VALIDATE_ESSENCE_ALIAS` The Constant VALIDATE_ESSENCE_ALIAS.
    `static int` | `VALIDATE_REPORT_ITEMS_AND_TUPLES` The Constant VALIDATE_REPORT_ITEMS_AND_TUPLES.
    `static int` | `VALIDATE_REQUIRES_ELEMENT` The Constant VALIDATE_REQUIRES_ELEMENT.
    `static int` | `VALIDATE_SUMMATION_ITEM` The Constant VALIDATE_SUMMATION_ITEM.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Resets the content of the validation report.
    `void` | `configure(java.util.Properties properties)` Configures the processor according with the properties passed in in the properties parameter.
    `static XBRLCoreProcessor` | `create(DTSContainer dts)` Creates the.
    `DTSContainer` | `getContainer()` Access to the DTSContainer that is under validation.
    `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.
    `boolean` | `isHidden()` A hidden processor will not pop-up in the GUI tabs.
    `void` | `setArcrolesToCheckCycles(java.util.Collection<? extends XBRLArcroleType> xbrlArcroleTypes)` Sets the arcroles to check cycles.
    `void` | `setWhatToValidate(int newValue)` Adjust the work performed by this XBRLCoreProcessor.
    `XBRLValidationReport` | `validate()` Validates the content of the DTS according to the rules indicated in this plug-in processor.
    `XBRLValidationReport` | `validate(XBRLDocument doc)` Validates an instance document against all arcroles defined in the XBRL 2.1 specification
    `void` | `validateCyclesOnBaseSet(DTSBase base, XBRLArcroleType arcRole, int cyclesAllowed)` This is the internal method used by the API to validate cycles on a base set.

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

    - #### VALIDATE_CYCLES

          public static final int VALIDATE_CYCLES

      Constants to fire specific validation parts. They are bitmap constants so they can be 'or'ed together in the same integer value.
      See Also:
        Constant Field Values

    - #### VALIDATE_ESSENCE_ALIAS

          public static final int VALIDATE_ESSENCE_ALIAS

      The Constant VALIDATE_ESSENCE_ALIAS.
      See Also:
        Constant Field Values

    - #### VALIDATE_REQUIRES_ELEMENT

          public static final int VALIDATE_REQUIRES_ELEMENT

      The Constant VALIDATE_REQUIRES_ELEMENT.
      See Also:
        Constant Field Values

    - #### VALIDATE_SUMMATION_ITEM

          public static final int VALIDATE_SUMMATION_ITEM

      The Constant VALIDATE_SUMMATION_ITEM.
      See Also:
        Constant Field Values

    - #### VALIDATE_DOCUMENT

          public static final int VALIDATE_DOCUMENT

      The Constant VALIDATE_DOCUMENT.
      See Also:
        Constant Field Values

    - #### VALIDATE_REPORT_ITEMS_AND_TUPLES

          public static final int VALIDATE_REPORT_ITEMS_AND_TUPLES

      The Constant VALIDATE_REPORT_ITEMS_AND_TUPLES.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### create

          public static XBRLCoreProcessor create(DTSContainer dts)
                                          throws com.rs.lic.LicenseVerificationException

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

    - #### clear

          public void clear()

      Resets the content of the validation report.
      Specified by:
        `clear` in interface `XBRLPlugInProcessor`

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

    - #### setWhatToValidate

          public void setWhatToValidate(int newValue)

      Adjust the work performed by this XBRLCoreProcessor. By default the processor will check for cycles, essence-alias, requires-element summation-item and document validation.

      Use a combination of VALIDATE_ constants in order to set or unset specific validation steps.

      Parameters:
        `newValue` - integer, bitmap

    - #### getContainer

          public DTSContainer getContainer()

      Access to the DTSContainer that is under validation.
      Returns:
        DTSContainer

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

      Validates an instance document against all arcroles defined in the XBRL 2.1 specification
      Specified by:
        `validate` in interface `XBRLPlugInProcessor`
      Parameters:
        `doc` - the doc
      Returns:
        the XBRL validation report

    - #### validateCyclesOnBaseSet

          public void validateCyclesOnBaseSet(DTSBase base,
                                     XBRLArcroleType arcRole,
                                     int cyclesAllowed)
                                       throws XBRLValidationException

      This is the internal method used by the API to validate cycles on a base set. The base set is obtained from the base using the specific arcrole. the value of the cyclesAllowed is not taken from the arcrole definition inside this method in order to allow other processors to call this method with different values than the official values in the arcroleType declaration. Note the cycles allowed value of the arcroles defined in the XBRL 2.1 specification are not declared in link:arcroleType definitions but in the specification wording.
      Parameters:
        `base` - the DTS base from which the Base Set will be obtained. The DTS container already handles a database of bases and base sets.
        `arcRole` - the arcrole that identifies the Base Set.
        `cyclesAllowed` - the value here is a constant integer defined in the `XBRLArcroleType` type.
      Throws:
        `XBRLValidationException` - the XBRL validation exception

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

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

    - #### setArcrolesToCheckCycles

          public void setArcrolesToCheckCycles(java.util.Collection<? extends XBRLArcroleType> xbrlArcroleTypes)

      Sets the arcroles to check cycles.
      Parameters:
        `xbrlArcroleTypes` - the new arcroles to check cycles

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