com.ihr.xbrl.util

## Class XBRLDocumentContentExplorer

- java.lang.Object
- - org.xml.sax.helpers.DefaultHandler
  - - com.ihr.xbrl.util.XBRLDocumentContentExplorer

- All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

      public class XBRLDocumentContentExplorer
      extends org.xml.sax.helpers.DefaultHandler

  Collects information about the instance while processing the nodes.
  Author:
    Ignacio

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `EXCEPTION_WHILE_READING_DOCUMENT` The Constant EXCEPTION_WHILE_READING_DOCUMENT.
    `static int` | `NOT_AN_XBRL_DOCUMENT` The Constant NOT_AN_XBRL_DOCUMENT.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBRLDocumentContentExplorer()` Instantiates a new XBRL document content explorer.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Exception` | `getException()` Access to the Exception message raised during parsing of this document.
    `int` | `getFileType()` Gets the file type.
    `java.util.ArrayList<java.lang.String>` | `getLinkbases()` Gets the linkbases.
    `java.util.ArrayList<java.lang.String>` | `getSchemas()` Gets the schemas.
    `void` | `setException(java.lang.Exception exception)` Called by the FastDocumentTypeIdentifier in case of an exception while reading the incoming file.
    `void` | `startElement(java.lang.String uri, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes attributes)`

    - ### Methods inherited from class org.xml.sax.helpers.DefaultHandler

      `characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning`

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

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

- - ### Field Detail

    - #### NOT_AN_XBRL_DOCUMENT

          public static final int NOT_AN_XBRL_DOCUMENT

      The Constant NOT_AN_XBRL_DOCUMENT.
      See Also:
        Constant Field Values

    - #### EXCEPTION_WHILE_READING_DOCUMENT

          public static final int EXCEPTION_WHILE_READING_DOCUMENT

      The Constant EXCEPTION_WHILE_READING_DOCUMENT.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### XBRLDocumentContentExplorer

          public XBRLDocumentContentExplorer()

      Instantiates a new XBRL document content explorer.

  - ### Method Detail

    - #### startElement

          public void startElement(java.lang.String uri,
                          java.lang.String localName,
                          java.lang.String name,
                          org.xml.sax.Attributes attributes)
                            throws org.xml.sax.SAXException

      Specified by:
        `startElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `startElement` in class `org.xml.sax.helpers.DefaultHandler`
      Throws:
        `org.xml.sax.SAXException`

    - #### getLinkbases

          public java.util.ArrayList<java.lang.String> getLinkbases()

      Gets the linkbases.
      Returns:
        the linkbases

    - #### getSchemas

          public java.util.ArrayList<java.lang.String> getSchemas()

      Gets the schemas.
      Returns:
        the schemas

    - #### getFileType

          public int getFileType()

      Gets the file type.
      Returns:
        the file type

    - #### setException

          public void setException(java.lang.Exception exception)

      Called by the FastDocumentTypeIdentifier in case of an exception while reading the incoming file. Sets the document type as EXCEPTION_WHILE_READING_DOCUMENT.
      Parameters:
        `exception` - the new exception

    - #### getException

          public java.lang.Exception getException()

      Access to the Exception message raised during parsing of this document. It null is the document type is not EXCEPTION_WHILE_READING_DOCUMENT
      Returns:
        Exception or null