com.ihr.xbrl.om

## Class XBRLValidationReport

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

- All Implemented Interfaces:
    java.io.Serializable

      public class XBRLValidationReport
      extends java.lang.Object
      implements java.io.Serializable

  This objects holds the result of the XBRL validation.
  Author:
    Ignacio
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `XBRLValidationReport.ReportParts` This enumeration can be used by report serializers.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLValidationReport(DTSContainer dts)` Creates a new empty validation report.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAssertionTest(XBRLAssertionResult xbrlAssertionResult)` Adds the assertion test.
    `void` | `addException(XBRLValidationException e)` Adds a new error to this report.
    `void` | `addInconsistency(XBRLInconsistency e)` Adds an inconsistency to thie report.
    `boolean` | `assertionResultsAvailable()` If the validation process includes the formula processor.
    `static XBRLValidationReport` | `assumeIfEmpty(XBRLValidationReport other)` This method checks if the incoming XBRLValidation report is empty (contains no errors or inconsistencies) and if so, returns another empty XBRLValidationReport that has been stored as a thread local variable.
    `void` | `clear()` Clear all exceptions and inconsistencies in this report.
    `XBRLAssertionResult[]` | `getAssertionResult(java.lang.String assertionId)` returns an array of assertion results for a specific assertionId.
    `java.util.Collection<java.lang.String>` | `getAssertionResultIDs()` Gets the assertion result i ds.
    `DTSContainer` | `getContainer()` Access to the DTSContainer object for which this XBRLValidationReport has been created.
    `int` | `getCountAssertionsNotSatisfied(java.lang.String id)` Gets the count assertions not satisfied.
    `int` | `getCountAssertionsSatisfied(java.lang.String id)` Gets the count assertions satisfied.
    `java.util.Iterator<XBRLValidationException>` | `getExceptions()` Access to the exceptions in this report.
    `int` | `getExceptionsCount()` Returns the number of exceptions in the report.
    `XBRLInstance` | `getFormulaProcessorGeneratedInstance()` If the DTS contains formula linkbases this method returns the output instance generated using formulas.
    `java.util.Iterator<XBRLInconsistency>` | `getInconsistencies()` Access to the inconsistencies in this report.
    `int` | `getInconsistenciesCount()` Returns the number of inconsistencies in the report.
    `void` | `inconsistenciesAsExceptions()` Considers the inconsistencias as XBRLValidationExceptions Useful to be consistent with old versions of the library.
    `boolean` | `isEmpty()` Checks if is empty.
    `void` | `merge(XBRLValidationReport other)` Adds to this report the content of another XBRLValidationReport.
    `void` | `removeExceptions(int code)` Remove from current report all exceptions that matches the code indicated in the parameter.
    `void` | `serialize(XBRLValidationReportSerializer serializer)` Sends the current report to the report serializer.
    `void` | `setContainer(DTSContainer dts)` Sets the container.
    `void` | `setFormulaInstance(XBRLInstance instance)` Used by the processor internally to set the generated instance.
    `void` | `throwExceptions()` If the report contains XBRL Errors this method takes one of them and throws it.
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### XBRLValidationReport

          public XBRLValidationReport(DTSContainer dts)

      Creates a new empty validation report.
      Parameters:
        `dts` - the dts

  - ### Method Detail

    - #### setContainer

          public void setContainer(DTSContainer dts)

      Sets the container.
      Parameters:
        `dts` - the new container

    - #### merge

          public void merge(XBRLValidationReport other)

      Adds to this report the content of another XBRLValidationReport.
      Parameters:
        `other` - XBRLValidationReport whose content will be added to this report

    - #### inconsistenciesAsExceptions

          public void inconsistenciesAsExceptions()
                                           throws XBRLValidationException

      Considers the inconsistencias as XBRLValidationExceptions Useful to be consistent with old versions of the library.
      Throws:
        `XBRLValidationException` - the XBRL validation exception

    - #### addException

          public void addException(XBRLValidationException e)

      Adds a new error to this report. Errors are XBRLValidationExceptions
      Parameters:
        `e` - the e

    - #### addInconsistency

          public void addInconsistency(XBRLInconsistency e)

      Adds an inconsistency to thie report. Inconsistencies are XBRLInconsistency objects
      Parameters:
        `e` - the e

    - #### throwExceptions

          public void throwExceptions()
                               throws XBRLValidationException

      If the report contains XBRL Errors this method takes one of them and throws it. If there are no XBRL Errors this method does noting.
      Throws:
        `XBRLValidationException` - the XBRL validation exception

    - #### getExceptions

          public java.util.Iterator<XBRLValidationException> getExceptions()

      Access to the exceptions in this report.
      Returns:
        Iterator<XBRLValidationException>

    - #### getInconsistencies

          public java.util.Iterator<XBRLInconsistency> getInconsistencies()

      Access to the inconsistencies in this report.
      Returns:
        Iterator<XBRLInconsistency>

    - #### clear

          public void clear()

      Clear all exceptions and inconsistencies in this report.

    - #### removeExceptions

          public void removeExceptions(int code)

      Remove from current report all exceptions that matches the code indicated in the parameter.
      Parameters:
        `code` - a constact defined in the XBRLValidationException class

    - #### getFormulaProcessorGeneratedInstance

          public XBRLInstance getFormulaProcessorGeneratedInstance()

      If the DTS contains formula linkbases this method returns the output instance generated using formulas.
      Returns:
        XBRLInstance
      Since:
        2.7.0

    - #### setFormulaInstance

          public void setFormulaInstance(XBRLInstance instance)

      Used by the processor internally to set the generated instance.
      Parameters:
        `instance` - the new formula instance

    - #### getContainer

          public DTSContainer getContainer()

      Access to the DTSContainer object for which this XBRLValidationReport has been created.
      Returns:
        DTSContainer

    - #### serialize

          public void serialize(XBRLValidationReportSerializer serializer)

      Sends the current report to the report serializer. This method will convert the errors and inconsistencies in something human readable.
      Parameters:
        `serializer` - the serializer

    - #### getExceptionsCount

          public int getExceptionsCount()

      Returns the number of exceptions in the report.
      Returns:
        integer

    - #### getInconsistenciesCount

          public int getInconsistenciesCount()

      Returns the number of inconsistencies in the report.
      Returns:
        integer

    - #### addAssertionTest

          public void addAssertionTest(XBRLAssertionResult xbrlAssertionResult)

      Adds the assertion test.
      Parameters:
        `xbrlAssertionResult` - the xbrl assertion result

    - #### getCountAssertionsSatisfied

          public int getCountAssertionsSatisfied(java.lang.String id)

      Gets the count assertions satisfied.
      Parameters:
        `id` - the id
      Returns:
        the count assertions satisfied

    - #### getCountAssertionsNotSatisfied

          public int getCountAssertionsNotSatisfied(java.lang.String id)

      Gets the count assertions not satisfied.
      Parameters:
        `id` - the id
      Returns:
        the count assertions not satisfied

    - #### getAssertionResultIDs

          public java.util.Collection<java.lang.String> getAssertionResultIDs()

      Gets the assertion result i ds.
      Returns:
        the assertion result i ds

    - #### assumeIfEmpty

          public static XBRLValidationReport assumeIfEmpty(XBRLValidationReport other)

      This method checks if the incoming XBRLValidation report is empty (contains no errors or inconsistencies) and if so, returns another empty XBRLValidationReport that has been stored as a thread local variable.
      Parameters:
        `other` - the other
      Returns:
        the XBRL validation report

    - #### isEmpty

          public boolean isEmpty()

      Checks if is empty.
      Returns:
        true, if is empty

    - #### assertionResultsAvailable

          public boolean assertionResultsAvailable()

      If the validation process includes the formula processor. And the validation process has evaluated assertions, this method returns true. If the formula processor has evaluated but no assertions exists then this method will return false. If there are no assertion results this method will return false.
      Returns:
        boolean value

    - #### getAssertionResult

          public XBRLAssertionResult[] getAssertionResult(java.lang.String assertionId)

      returns an array of assertion results for a specific assertionId.
      Parameters:
        `assertionId` - String
      Returns:
        XBRLAssertionResult[]

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`