XBRLAPI

A Java API for XBRL


org.xbrlapi.sax
Class BaseContentHandlerImpl

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.xbrlapi.sax.BaseContentHandlerImpl
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
Direct Known Subclasses:
ContentHandlerImpl

public class BaseContentHandlerImpl
extends DefaultHandler
implements ContentHandler

SAX content handler used in construction of an XBRL Discoverable Taxonomy Set (DTS). The content handler is responsible for building up the XBRL XML fragments as they are parsed and then passing them over to the underlying data representation for storage. The content handler needs to be supplied with a variety of helpers to assist with data storage and XLink processing. These are supplied by the loader.

Author:
Geoffrey Shuetrim (geoff@galexy.net)

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
BaseContentHandlerImpl(Loader loader, URI uri)
           
 
Method Summary
 void error(SAXParseException exception)
          Handles SAX parsing exceptions.
 void fatalError(SAXParseException exception)
          Handles fatal SAX parsing exceptions.
 ElementState getElementState()
           
 List<Identifier> getIdentifiers()
           
 Loader getLoader()
           
 URI getURI()
           
 void setElementState(ElementState state)
           
 void setLoader(Loader loader)
           
 void setURI(URI uri)
           
 void warning(SAXParseException exception)
          Handles warnings based on SAX parsing exceptions.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

BaseContentHandlerImpl

public BaseContentHandlerImpl(Loader loader,
                              URI uri)
                       throws XBRLException
Parameters:
loader - The DTS loader that is using this content handler.
uri - The URI of the document being parsed.
Throws:
XBRLException - if any of the parameters are null.
Method Detail

getLoader

public Loader getLoader()
Returns:
the loader using this content handler.
See Also:
ContentHandler.getLoader()

setLoader

public void setLoader(Loader loader)
               throws XBRLException
Parameters:
loader - The loader that will use the content handler.
Throws:
XBRLException - if the loader is null
See Also:
ContentHandler.setLoader(Loader)

getURI

public URI getURI()
Returns:
the URI of the document being parsed.
See Also:
ContentHandler.getURI()

setURI

public void setURI(URI uri)
            throws XBRLException
Parameters:
uri - The URI of the document being parsed.
Throws:
XBRLException - if the URI is null.
See Also:
ContentHandler.setURI(URI)

setElementState

public void setElementState(ElementState state)
Parameters:
state - The element state

getElementState

public ElementState getElementState()
Returns:
the state for the element currently being parsed.

getIdentifiers

public List<Identifier> getIdentifiers()
Returns:
the list of fragment identifiers used by the content handler.
See Also:
ContentHandler.getIdentifiers()

error

public void error(SAXParseException exception)
           throws SAXException
Description copied from interface: ContentHandler
Handles SAX parsing exceptions.

Specified by:
error in interface ErrorHandler
Overrides:
error in class DefaultHandler
Parameters:
exception - The SAX parsing exception
Throws:
SAXException
See Also:
ContentHandler.error(SAXParseException)

fatalError

public void fatalError(SAXParseException exception)
                throws SAXException
Description copied from interface: ContentHandler
Handles fatal SAX parsing exceptions.

Specified by:
fatalError in interface ErrorHandler
Overrides:
fatalError in class DefaultHandler
Parameters:
exception - The fatal SAX parsing exception.
Throws:
SAXException
See Also:
ContentHandler.fatalError(SAXParseException)

warning

public void warning(SAXParseException exception)
             throws SAXException
Description copied from interface: ContentHandler
Handles warnings based on SAX parsing exceptions.

Specified by:
warning in interface ErrorHandler
Overrides:
warning in class DefaultHandler
Parameters:
exception - the SAX parsing exception triggering the warning.
Throws:
SAXException
See Also:
ContentHandler.warning(SAXParseException)

Get Java XBRL API implementation at SourceForge.net. Fast, secure and Free Open Source software downloads