|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cysols.iodef.DBHandler
public class DBHandler
This class provides some methods accessing to the xml database.
| Constructor Summary | |
|---|---|
DBHandler()
|
|
| Method Summary | |
|---|---|
protected org.xmldb.api.base.Collection |
createCollection()
Returns a Collection instance from DatabaseManager. |
String[] |
getKeyList()
Returns the all key stored to xml database. |
void |
insert(String key,
Document doc)
Inserts the specified incident document to xml database. |
Node[] |
select()
Selects all Document node from xml database, returns the array of Document nodes. |
Node |
selectByKey(String key)
Selects Document node with specified key from xml database. |
Node[] |
selectByXPath(String xpath)
Selects the Document nodes with xpath from database, and returns the array of Node instance matched xpath. |
Node[] |
selectByXPath(String prefix,
String namespace,
String xpath)
Selects the Document nodes with xpath from database, and returns the array of Node instance matched xpath. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DBHandler()
| Method Detail |
|---|
protected org.xmldb.api.base.Collection createCollection()
throws org.xmldb.api.base.XMLDBException
org.xmldb.api.base.XMLDBException - If a DB error occurs
public void insert(String key,
Document doc)
throws org.xmldb.api.base.XMLDBException,
XMLWriteException
doc - - incident document
org.xmldb.api.base.XMLDBException - If a DB error occurs
XMLWriteException - If unable to create Collection instance.
public Node[] selectByXPath(String xpath)
throws org.xmldb.api.base.XMLDBException,
XMLReaderException
xpath - a xpth to select the document object from xml database
XMLReaderException - if unalbe to create Collection instance by url.
org.xmldb.api.base.XMLDBException - If a DB error occurs.
public Node[] selectByXPath(String prefix,
String namespace,
String xpath)
throws org.xmldb.api.base.XMLDBException,
XMLReaderException
xpath - a xpth to select the document object from xml database.
XMLReaderException - if unalbe to create Collection instance by url.
org.xmldb.api.base.XMLDBException - If a DB error occurs
public Node selectByKey(String key)
throws XMLReaderException,
org.xmldb.api.base.XMLDBException
key - document key
XMLReaderException - if unalbe to create Collection instance by url.
org.xmldb.api.base.XMLDBException - If a DB error occurs
public Node[] select()
throws XMLReaderException,
org.xmldb.api.base.XMLDBException
XMLReaderException - if unalbe to create Collection instance by url.
org.xmldb.api.base.XMLDBException - If a DB error occurs
public String[] getKeyList()
throws XMLReaderException,
org.xmldb.api.base.XMLDBException
XMLReaderException - if unalbe to create Collection instance by url.
org.xmldb.api.base.XMLDBException - If a DB error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||