|
XBRLAPIA Java API for XBRL |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.xbrlapi.sax.BaseContentHandlerImpl
org.xbrlapi.sax.ContentHandlerImpl
public class ContentHandlerImpl
SAX content handler used to parse a document into an XBRL API data store. The content handler is responsible for identifying XML fragments to be loaded into the data store, as they are parsed and then passing them over to the data loader for creation and 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.
| Field Summary | |
|---|---|
protected List<Identifier> |
identifiers
The list of fragment identifiers |
| Fields inherited from class org.xbrlapi.sax.BaseContentHandlerImpl |
|---|
logger |
| Constructor Summary | |
|---|---|
ContentHandlerImpl(Loader loader,
URI uri)
Creates the content handler, starting out by identifying the DTS structure that the content handler is discovering. |
|
ContentHandlerImpl(Loader loader,
URI uri,
String xml)
Creates the content handler, starting out by identifying the data structure that the content handler is discovering. |
|
| Method Summary | |
|---|---|
protected void |
addIdentifier(Identifier identifier)
|
protected void |
addIdentifier(int index,
Identifier identifier)
|
void |
characters(char[] buf,
int offset,
int len)
Copy characters (trimming white space as required) to the DTSImpl. |
void |
endElement(String namespaceURI,
String lName,
String qName)
The end of an element triggers processing of an extended link if we have reached the end of an extended link. |
protected BaseURISAXResolver |
getBaseURISAXResolver()
|
void |
ignorableWhitespace(char[] buf,
int offset,
int len)
Ignore ignorable whitespace |
void |
processingInstruction(String target,
String data)
Copy across processing instructions to the DTSImpl |
protected void |
removeIdentifier(int index)
|
void |
setDocumentLocator(Locator locator)
The locator for a document is stored to facilitate resolution of CacheURIImpl's relative to that location. |
void |
startDocument()
On starting to parse a document the Base URI resolver is set up with the documents absolute URI. |
void |
startElement(String namespaceURI,
String lName,
String qName,
Attributes attrs)
Sets the element state. |
| Methods inherited from class org.xbrlapi.sax.BaseContentHandlerImpl |
|---|
error, fatalError, getElementState, getIdentifiers, getLoader, getURI, setElementState, setLoader, setURI, warning |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endDocument, endPrefixMapping, notationDecl, resolveEntity, skippedEntity, 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.xbrlapi.sax.ContentHandler |
|---|
error, fatalError, getElementState, getIdentifiers, getLoader, getURI, setElementState, setLoader, setURI, warning |
| Methods inherited from interface org.xml.sax.ContentHandler |
|---|
endDocument, endPrefixMapping, skippedEntity, startPrefixMapping |
| Field Detail |
|---|
protected List<Identifier> identifiers
| Constructor Detail |
|---|
public ContentHandlerImpl(Loader loader,
URI uri)
throws XBRLException
loader - The DTS loader that is using this content handler.uri - The URI of the document being parsed.
XBRLException - if any of the parameters
are null.
public ContentHandlerImpl(Loader loader,
URI uri,
String xml)
throws XBRLException
loader - The data loader that is using this content handler.uri - The URI of the document being parsed.xml - The string representation of the XML document being parsed.
XBRLException - if any of the parameters
are null.| Method Detail |
|---|
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerstartDocument in class DefaultHandlerSAXException
public void startElement(String namespaceURI,
String lName,
String qName,
Attributes attrs)
throws SAXException
startElement in interface ContentHandlerstartElement in class DefaultHandlerSAXExceptionContentHandler.startElement(String, String, String, Attributes)
public void endElement(String namespaceURI,
String lName,
String qName)
throws SAXException
endElement in interface ContentHandlerendElement in class DefaultHandlerSAXException
public void ignorableWhitespace(char[] buf,
int offset,
int len)
throws SAXException
ignorableWhitespace in interface ContentHandlerignorableWhitespace in class DefaultHandlerSAXException
public void processingInstruction(String target,
String data)
throws SAXException
processingInstruction in interface ContentHandlerprocessingInstruction in class DefaultHandlerSAXException
public void characters(char[] buf,
int offset,
int len)
throws SAXException
characters in interface ContentHandlercharacters in class DefaultHandlerSAXExceptionpublic void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlersetDocumentLocator in class DefaultHandlerprotected BaseURISAXResolver getBaseURISAXResolver()
protected void addIdentifier(Identifier identifier)
identifier - The identifier to add to the list of
fragment identifiers used by the content handler.
protected void addIdentifier(int index,
Identifier identifier)
index - The index of the position at which
the new identifier is to be inserted in the list of
fragment identifiers.identifier - The identifier to add to the list of
fragment identifiers used by the content handler.
protected void removeIdentifier(int index)
throws XBRLException
index - The index of the identifier to remove from the list of
fragment identifiers used by the content handler.
XBRLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||