org.xbrlapi.sax
Class BaseContentHandlerImpl
java.lang.Object
org.xml.sax.helpers.DefaultHandler
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
|
| 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 |
logger
protected static org.apache.log4j.Logger logger
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.
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)