dbXML API

com.dbxml.db.common.adapters
Class SAXAdapter

java.lang.Object
  extended bycom.dbxml.db.core.adapter.SimpleAdapter
      extended bycom.dbxml.db.common.adapters.SAXAdapter
All Implemented Interfaces:
Adapter

public final class SAXAdapter
extends SimpleAdapter

SAXAdapter adapts a dbXML Collection to support the management of Documents using the SAX API.


Constructor Summary
SAXAdapter(Collection col)
           
 
Method Summary
 void getDocument(Transaction tx, java.lang.Object key, org.xml.sax.ContentHandler handler)
          getDocument instantiates and returns a DOM Document based on the provided Key.
 org.xml.sax.ContentHandler insertDocument(Transaction tx)
          setDocument sets a Document using SAX events that are fed to the returned ContentHandler.
 org.xml.sax.ContentHandler insertDocument(Transaction tx, java.lang.Object key)
          insertDocument sets a Document using SAX events that are fed to the returned ContentHandler.
 org.xml.sax.ContentHandler setDocument(Transaction tx, java.lang.Object key)
          setDocument sets a Document using SAX events that are fed to the returned ContentHandler.
 
Methods inherited from class com.dbxml.db.core.adapter.SimpleAdapter
getCanonicalName, getCollection, getKeyCount, getName, listKeys, queryCollection, queryDocument, remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAXAdapter

public SAXAdapter(Collection col)
Method Detail

setDocument

public org.xml.sax.ContentHandler setDocument(Transaction tx,
                                              java.lang.Object key)
                                       throws DBException
setDocument sets a Document using SAX events that are fed to the returned ContentHandler. The document is stored in the Collection using the provided Key.

Parameters:
tx - The controlling Transaction
key - The Key to use
Returns:
a ContentHandler for feeding SAX events
Throws:
DBException - If a Database Exception occurs

insertDocument

public org.xml.sax.ContentHandler insertDocument(Transaction tx)
                                          throws DBException
setDocument sets a Document using SAX events that are fed to the returned ContentHandler. The document is stored in the Collection using a newly generated Key.

Parameters:
tx - The controlling Transaction
Returns:
a ContentHandler for feeding SAX events
Throws:
DBException - If a Database Exception occurs

insertDocument

public org.xml.sax.ContentHandler insertDocument(Transaction tx,
                                                 java.lang.Object key)
                                          throws DBException
insertDocument sets a Document using SAX events that are fed to the returned ContentHandler. The document is stored in the Collection using the provided Key.

Parameters:
tx - The controlling Transaction
key - The Key to use
Returns:
a ContentHandler for feeding SAX events
Throws:
DBException - If a Database Exception occurs

getDocument

public void getDocument(Transaction tx,
                        java.lang.Object key,
                        org.xml.sax.ContentHandler handler)
                 throws DBException
getDocument instantiates and returns a DOM Document based on the provided Key.

Parameters:
tx - The controlling Transaction
key - The Document Key
Returns:
a DOM Document
Throws:
DBException - If a Database Exception occurs

dbXML API

Copyright (c) 2004 The dbXML Group