|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is used to insert XML documents in XML collections. A single filer can store several documents sequentially, however it is an error to try to use a filer before the current storage is finished. Objects implementing this interface can be plugged into a SAX2 XMLReader to process XML data as SAX2 events. Both org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler and org.xml.sax.ErrorHandler are supported, so that comments and processing instructions are not lost during storage.
Notes:
close()
method.
Method Summary | |
void |
clearBuffer()
Discards the XML data buffered by the filer since the last call to flushBuffer() method. |
void |
close()
Closes the object and frees its associated resources. |
void |
flushBuffer()
Sends buffered XML data to the data source. |
boolean |
getAutoFlush()
Retrieves the current buffering mode. |
XMLCollection |
getCollection()
Returns the XML collection that produced this object. |
java.lang.String |
getDocumentId()
Gets the identifier to be used by the next document to be stored through this object. |
XMLErrorHandler |
getErrorHandler()
Return the current error handler. |
XMLDocument |
insertDocument(org.w3c.dom.Document doc)
Inserts the XML document in the filer's collection. |
XMLDocument |
insertDocument(org.w3c.dom.Document doc,
java.lang.String id)
Inserts the XML document in the filer's collection with the specified identifier. |
XMLDocument |
insertDocument(org.xml.sax.InputSource input)
Inserts an XML document in the filer's collection using the SAX method. |
XMLDocument |
insertDocument(org.xml.sax.InputSource input,
java.lang.String id)
Inserts an XML document in the filer's collection using the SAX method. |
XMLDocument |
insertDocument(java.lang.String doc)
Inserts the XML document contained in the string in the filer's collection. |
XMLDocument |
insertDocument(java.lang.String doc,
java.lang.String id)
Inserts the XML document contained in the string in the filer's collection with the specified identifier. |
XMLDocument |
insertDocument(org.xml.sax.XMLReader parser,
org.xml.sax.InputSource input)
Inserts an XML document in the filer's collection using the SAX method. |
XMLDocument |
insertDocument(org.xml.sax.XMLReader parser,
org.xml.sax.InputSource input,
java.lang.String id)
Inserts an XML document in the filer's collection using the SAX method. |
void |
setAutoFlush(boolean activated)
Turns on or off the automatic buffering mode. |
void |
setDocumentId(java.lang.String id)
Sets the identifier of the next document to be stored through this object. |
void |
setErrorHandler(XMLErrorHandler handler)
Allow an application to register an error event handler for non-fatal errors. |
Methods inherited from interface org.xml.sax.ContentHandler |
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping |
Methods inherited from interface org.xml.sax.ErrorHandler |
error, fatalError, warning |
Methods inherited from interface org.xml.sax.ext.LexicalHandler |
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity |
Methods inherited from interface org.xquark.xml.xdbc.Configurable |
getFeature, getFeatureList, getProperty, getPropertyList, setFeature, setProperty |
Method Detail |
public void close() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public XMLCollection getCollection()
public void setDocumentId(java.lang.String id) throws XMLDBCException
id
- the identifier of the next document to be stored.
XMLDBCException
- if a data source access error occurs.public java.lang.String getDocumentId()
public XMLDocument insertDocument(org.xml.sax.InputSource input) throws XMLDBCException, org.xml.sax.SAXException
input
- the SAX InputSource.
XMLDBCException
- if a data source access error occurs.
org.xml.sax.SAXException
- if a parse exception occurs.public XMLDocument insertDocument(org.xml.sax.InputSource input, java.lang.String id) throws XMLDBCException, org.xml.sax.SAXException
input
- the SAX InputSource.id
- the document identifier in the collection.
XMLDBCException
- if a data source access error occurs.
org.xml.sax.SAXException
- if a parse exception occurs.public XMLDocument insertDocument(org.xml.sax.XMLReader parser, org.xml.sax.InputSource input) throws XMLDBCException, org.xml.sax.SAXException
parser
- the SAX 2 XMLReader implementation.input
- the SAX InputSource.
XMLDBCException
- if a data source access error occurs.
org.xml.sax.SAXException
- if a parse exception occurs.public XMLDocument insertDocument(org.xml.sax.XMLReader parser, org.xml.sax.InputSource input, java.lang.String id) throws XMLDBCException, org.xml.sax.SAXException
parser
- the SAX 2 XMLReader implementation.input
- the SAX InputSource.id
- the document identifier in the collection.
XMLDBCException
- if a data source access error occurs.
org.xml.sax.SAXException
- if a parse exception occurs.public XMLDocument insertDocument(org.w3c.dom.Document doc) throws XMLDBCException
doc
- the XML document as a DOM2 org.w3c.dom.Document.
XMLDBCException
- if a data source access error occurs.public XMLDocument insertDocument(org.w3c.dom.Document doc, java.lang.String id) throws XMLDBCException
doc
- the XML document as a DOM2 org.w3c.dom.Document.id
- the document identifier in the collection.
XMLDBCException
- if a data source access error occurs.public XMLDocument insertDocument(java.lang.String doc) throws XMLDBCException, org.xml.sax.SAXException
doc
- a string containing the XML document.
XMLDBCException
- if a data source access error occurs.
org.xml.sax.SAXException
- if a parse exception occurs.public XMLDocument insertDocument(java.lang.String doc, java.lang.String id) throws XMLDBCException, org.xml.sax.SAXException
doc
- a string containing the XML document.id
- the document identifier in the collection.
XMLDBCException
- if a data source access error occurs.
org.xml.sax.SAXException
- if a parse exception occurs.public void setAutoFlush(boolean activated) throws XMLDBCException
activated
- 'true' is the default and means that autoflush is on.
XMLDBCException
- if a data source access error occurs.public boolean getAutoFlush()
setAutoFlush(boolean)
public void flushBuffer() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.setAutoFlush(boolean)
public void clearBuffer() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.setAutoFlush(boolean)
public void setErrorHandler(XMLErrorHandler handler)
If the application does not register an error handler, all warning and non-fatal error events reported by the filer will be silently ignored and storage will continue.
Applications may register a new or different handler in the middle of a storage operation, and the filer must begin using the new handler immediately.
handler
- The error handler.
java.lang.NullPointerException
- If the handler
argument is null.getErrorHandler()
public XMLErrorHandler getErrorHandler()
setErrorHandler(org.xquark.xml.xdbc.XMLErrorHandler)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |