|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.globus.ogsa.impl.base.db.xindice.XindiceDriver
Class wrapper for common Xindice operations using XML:DB API. Essentially just a refactoring of the Xindice command-line tool functions into a single class for simplified runtime access.
Field Summary | |
static int |
XINDICE_DOCTYPE_DOM
|
static int |
XINDICE_DOCTYPE_SAX
|
static int |
XINDICE_DOCTYPE_STRING
|
static java.lang.String |
XINDICE_NAME_INDEXER
|
static java.lang.String |
XINDICE_VAL_INDEXER
|
static java.lang.String |
XINDICELOCALURI
|
static java.lang.String |
XINDICEURI
|
static java.lang.String |
XMLDBAPIVERSION
|
static java.lang.String |
XMLDBURI
|
Constructor Summary | |
XindiceDriver()
Creates a new instance of XindiceDriver |
|
XindiceDriver(boolean isLocal)
Creates a new instance of XindiceDriver |
Method Summary | |
java.lang.String |
addDocumentDOM(java.lang.String parentCol,
org.w3c.dom.Document doc,
java.lang.String docName)
Adds a document file to a collection. |
java.lang.String |
addDocumentFile(java.lang.String parentCol,
java.lang.String fileName,
java.lang.String docName)
Adds a document file to a collection. |
java.lang.String |
addDocumentString(java.lang.String parentCol,
java.lang.String docstr,
java.lang.String docName)
Adds a Document to a collection, where the input Document is in String form. |
void |
addIndexer(java.lang.String parentCol,
java.lang.String name,
java.lang.String type,
java.lang.String pattern)
|
void |
checkInitialized()
|
void |
createCollection(java.lang.String parentCol,
java.lang.String colName)
Creates a new Xindice collection. |
java.lang.String |
createUniqueID(java.lang.String parentCol)
|
void |
deleteDocument(java.lang.String parentCol,
java.lang.String docID)
Deletes a document from a collection. |
void |
dropAllCollections(java.lang.String parentCol)
|
void |
dropCollection(java.lang.String parentCol,
java.lang.String colName)
Drops a collection from Xindice. |
void |
dropIndexer(java.lang.String parentCol,
java.lang.String indexName)
|
boolean |
findCollection(java.lang.String parentCol,
java.lang.String collectionName)
|
boolean |
findDocument(java.lang.String parentCol,
java.lang.String documentName)
|
org.w3c.dom.Node |
getDocumentAsDOM(java.lang.String parentCol,
java.lang.String docID)
Gets a Document from a collection, reutrns the result in Node representation. |
java.lang.String |
getDocumentAsString(java.lang.String parentCol,
java.lang.String docID)
Gets a Document from a collection, reutrns the result in String representation. |
void |
init()
This method is invoked by the default constructor of a new instance of this class or may be used to explicity reactivate an instance of this class that has had the #shutdown method invoked on it. |
java.lang.String[] |
listChildCollections(java.lang.String parentCol)
Gets a list of the collections beneath a parent collection. |
java.lang.String[] |
listCollectionDocuments(java.lang.String collection)
Gets a list of the documents in a collection. |
java.lang.String[] |
listIndexers(java.lang.String parentCol)
Gets a list of document indexers from a collection. |
static void |
main(java.lang.String[] args)
|
protected java.lang.String |
normalizeCollectionURI(java.lang.String uri,
boolean local)
|
void |
scalabilityTest()
|
void |
selfTest()
|
void |
setProfiling(boolean isProfiling)
|
void |
setVerbose(boolean isVerbose)
|
void |
shutdown(java.lang.String collection)
Use this method to explicitly checkpoint the database and free open memory and file resources held by Xindice. |
java.lang.Object[] |
XPathQuery(java.lang.String parentCol,
java.lang.String query,
java.lang.String namespaces,
int returnType)
|
void |
XUpdate(java.lang.String parentCol,
java.lang.String xupdate,
java.lang.String namespaces)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String XINDICEURI
public static final java.lang.String XINDICELOCALURI
public static final java.lang.String XMLDBURI
public static final java.lang.String XMLDBAPIVERSION
public static final java.lang.String XINDICE_VAL_INDEXER
public static final java.lang.String XINDICE_NAME_INDEXER
public static final int XINDICE_DOCTYPE_STRING
public static final int XINDICE_DOCTYPE_DOM
public static final int XINDICE_DOCTYPE_SAX
Constructor Detail |
public XindiceDriver() throws java.lang.Exception
public XindiceDriver(boolean isLocal) throws java.lang.Exception
Method Detail |
public static void main(java.lang.String[] args)
public void init()
public void shutdown(java.lang.String collection) throws java.lang.Exception
collection
- - name of the parent collection.
java.lang.Exception
public void checkInitialized() throws java.lang.Exception
java.lang.Exception
public void setVerbose(boolean isVerbose)
public void setProfiling(boolean isProfiling)
public java.lang.String createUniqueID(java.lang.String parentCol) throws java.lang.Exception
java.lang.Exception
public void createCollection(java.lang.String parentCol, java.lang.String colName) throws java.lang.Exception
parentCol
- - name of the parent collectioncolName
- - name of the new collection
java.lang.Exception
- Description of Exceptionpublic void dropCollection(java.lang.String parentCol, java.lang.String colName) throws java.lang.Exception
parentCol
- - name of the parent collectioncolName
- - name of the new collection
java.lang.Exception
- Description of Exceptionpublic java.lang.String[] listChildCollections(java.lang.String parentCol) throws java.lang.Exception
parentCol
- - name of the parent collection.
java.lang.Exception
- Description of Exceptionpublic java.lang.String[] listCollectionDocuments(java.lang.String collection) throws java.lang.Exception
collection
- - name of the collection
java.lang.Exception
- Description of Exceptionpublic boolean findCollection(java.lang.String parentCol, java.lang.String collectionName) throws java.lang.Exception
java.lang.Exception
public boolean findDocument(java.lang.String parentCol, java.lang.String documentName) throws java.lang.Exception
java.lang.Exception
public void dropAllCollections(java.lang.String parentCol) throws java.lang.Exception
java.lang.Exception
public java.lang.String[] listIndexers(java.lang.String parentCol) throws java.lang.Exception
parentCol
- - name of the collection
java.lang.Exception
- Description of Exceptionpublic java.lang.String addDocumentFile(java.lang.String parentCol, java.lang.String fileName, java.lang.String docName) throws java.lang.Exception
parentCol
- - name of the parent collectionfileName
- - name of the filedocName
- - name of the document
java.lang.Exception
- - if the collection does not exist.public java.lang.String addDocumentDOM(java.lang.String parentCol, org.w3c.dom.Document doc, java.lang.String docName) throws java.lang.Exception
parentCol
- - name of the parent collectiondoc
- - the document to adddocName
- - name of the document
java.lang.Exception
- - if the collection does not exist.public java.lang.String addDocumentString(java.lang.String parentCol, java.lang.String docstr, java.lang.String docName) throws java.lang.Exception
parentCol
- - name of the parent collectiondocstr
- - String representation of the Document to adddocName
- - name of the document
java.lang.Exception
public void deleteDocument(java.lang.String parentCol, java.lang.String docID) throws java.lang.Exception
parentCol
- - name of the parent collectiondocID
- - id of the document to delete
java.lang.Exception
- -public java.lang.String getDocumentAsString(java.lang.String parentCol, java.lang.String docID) throws java.lang.Exception
parentCol
- - name of the parent collectiondocID
- - id of the document
java.lang.Exception
- - if docId is null, collection not found, or document not foundpublic org.w3c.dom.Node getDocumentAsDOM(java.lang.String parentCol, java.lang.String docID) throws java.lang.Exception
parentCol
- - name of the parent collectiondocID
- - id of the document
java.lang.Exception
- - if docId is null, collection not found, or document not foundpublic void addIndexer(java.lang.String parentCol, java.lang.String name, java.lang.String type, java.lang.String pattern) throws java.lang.Exception
java.lang.Exception
public void dropIndexer(java.lang.String parentCol, java.lang.String indexName) throws java.lang.Exception
java.lang.Exception
public java.lang.Object[] XPathQuery(java.lang.String parentCol, java.lang.String query, java.lang.String namespaces, int returnType) throws java.lang.Exception
java.lang.Exception
public void XUpdate(java.lang.String parentCol, java.lang.String xupdate, java.lang.String namespaces) throws java.lang.Exception
java.lang.Exception
public void selfTest() throws java.lang.Exception
java.lang.Exception
public void scalabilityTest() throws java.lang.Exception
java.lang.Exception
protected java.lang.String normalizeCollectionURI(java.lang.String uri, boolean local)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |