|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines a Dao for the management of XML and binary files within a XML document such as inserting, updating, removing and retrieving documents and files from the database
Method Summary | |
java.lang.String |
insertUpdateBinaryFile(byte[] docBytes,
java.lang.String docID,
java.lang.String collectionPath)
Insert or update a binary byte array into a XML database. |
java.lang.String |
insertUpdateFile(java.io.File file,
java.lang.String docID,
java.lang.String collectionPath)
Insert or update a file (either XML or binary) from a File object
to the database. |
java.lang.String |
insertUpdateInputStream(java.io.InputStream stream,
java.lang.String docID,
java.lang.String collectionPath)
Insert or update information in a inputstream into a XML database. |
java.lang.String |
insertUpdateXMLDocument(org.w3c.dom.Document xmlDocument,
java.lang.String docID,
java.lang.String collectionPath)
Insert or update a XML document from a supplied DOM object to the database. |
java.lang.String |
insertUpdateXMLDocument(java.io.File xmlDocument,
java.lang.String docID,
java.lang.String collectionPath)
Insert or update a XML document from a File object
to the database. |
java.lang.String |
insertUpdateXMLDocument(java.lang.String xmlDocument,
java.lang.String docID,
java.lang.String collectionPath)
Insert or update a XML document specfied in the String supplied in the parameters. |
boolean |
removeDocument(java.lang.String docID,
java.lang.String collectionPath)
Remove a document (XML or binary) from a collection |
org.w3c.dom.Document |
retrieveDocumentAsDOM(java.lang.String docID,
java.lang.String collectionPath)
Retrieve an XML document as a w3c DOM object from a collection in the XML database |
org.xmldb.api.base.Resource |
retrieveDocumentAsResource(java.lang.String docID,
java.lang.String collectionPath)
Retrieve a XML:DB Resource which can be either a binary or XML document from a collection in the XML database |
java.lang.String |
retrieveDocumentAsString(java.lang.String docID,
java.lang.String collectionPath)
Retrieve an XML document as a String from a collection in the XML database |
Method Detail |
public java.lang.String insertUpdateXMLDocument(java.lang.String xmlDocument, java.lang.String docID, java.lang.String collectionPath) throws XMLDBDataAccessException
xmlDocument
- A String of the XML document to insert/updatedocID
- The document ID to usecollectionPath
- The collection path to insert under
XMLDBDataAccessException
- if anything goes wrong in the data accesspublic java.lang.String insertUpdateFile(java.io.File file, java.lang.String docID, java.lang.String collectionPath) throws XMLDBDataAccessException
File
object
to the database. If the supplied docID is null the dao will attempt to insert with a null id relying on the
database to supply a generated ID. If given a docID the dao will attempt to find an
existing document in the given collection path, if a document exists it will update that document
otherwise it will insert a new document with the supplied id.
file
- The File to insert/updatedocID
- The document ID to usecollectionPath
- The collection path to insert under
XMLDBDataAccessException
- if anything goes wrong in the data accesspublic java.lang.String insertUpdateXMLDocument(java.io.File xmlDocument, java.lang.String docID, java.lang.String collectionPath) throws XMLDBDataAccessException
File
object
to the database. If the supplied docID is null the dao will attempt to insert with a null id relying on the
database to supply a generated ID. If given a docID the dao will attempt to find an
existing document in the given collection path, if a document exists it will update that document
otherwise it will insert a new document with the supplied id.
xmlDocument
- The File containing a XML documentdocID
- The document ID to usecollectionPath
- The collection path to insert under
XMLDBDataAccessException
- if anything goes wrong in the data accesspublic java.lang.String insertUpdateXMLDocument(org.w3c.dom.Document xmlDocument, java.lang.String docID, java.lang.String collectionPath) throws XMLDBDataAccessException
docID
- The document ID to usecollectionPath
- The collection path to insert under
XMLDBDataAccessException
- if anything goes wrong in the data accesspublic boolean removeDocument(java.lang.String docID, java.lang.String collectionPath) throws XMLDBDataAccessException
docID
- The document ID to removecollectionPath
- The collection path to find the document
XMLDBDataAccessException
- if anything goes wrong in the data accesspublic org.w3c.dom.Document retrieveDocumentAsDOM(java.lang.String docID, java.lang.String collectionPath) throws XMLDBDataAccessException
docID
- The document ID to retrievecollectionPath
- The collection path to find the document
XMLDBDataAccessException
- if anything goes wrong in the data accesspublic java.lang.String retrieveDocumentAsString(java.lang.String docID, java.lang.String collectionPath) throws XMLDBDataAccessException
docID
- The document ID to retrievecollectionPath
- The collection path to find the document
XMLDBDataAccessException
- if anything goes wrong in the data accesspublic org.xmldb.api.base.Resource retrieveDocumentAsResource(java.lang.String docID, java.lang.String collectionPath) throws XMLDBDataAccessException
docID
- The document ID to retrievecollectionPath
- The collection path to find the document
XMLDBDataAccessException
- if anything goes wrong in the data accesspublic java.lang.String insertUpdateBinaryFile(byte[] docBytes, java.lang.String docID, java.lang.String collectionPath) throws XMLDBDataAccessException
docBytes
- The byte array to insert or updatedocID
- The document ID to usecollectionPath
- The collection path to insert under
XMLDBDataAccessException
- if anything goes wrong in the data accesspublic java.lang.String insertUpdateInputStream(java.io.InputStream stream, java.lang.String docID, java.lang.String collectionPath) throws XMLDBDataAccessException
stream
- The input stream to insert or updatedocID
- The document ID to usecollectionPath
- The collection path to insert under
XMLDBDataAccessException
- if anything goes wrong in the data access
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |