|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorage
public class XMLStorage
A thread safe manager to interact with the XML Storage repository. RESOURCE the type of the resource to store
| Nested Class Summary | |
|---|---|
static class |
XMLStorage.XMLStorageNotAvailableException
XMLStorage not initialized exception |
| Constructor Summary | |
|---|---|
XMLStorage()
Creates a new manager |
|
| Method Summary | |
|---|---|
boolean |
collectionExists(java.lang.String collectionName)
Checks whether a collection exists or not |
Collection |
createCollection(java.lang.String name)
Creates a collection in the XML storage. |
void |
deleteCollection(java.lang.String collectionName)
Deletes the collection from the storage |
void |
deleteResource(GCUBEXMLResource resource)
Deletes a resource |
GCUBEXMLResource |
executeXPathQuery(java.lang.String xpathquery)
|
org.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorage.STATUS |
getStatus()
|
void |
initialize(boolean... lock)
Initializes the local XML Storage repository |
void |
initialize(long maxOperationsPerConnection,
boolean... lock)
Initializes the local XML Storage repository |
boolean |
isLocked()
|
java.lang.String[] |
listAllCollectionResourceIDs(java.lang.String collectionName)
Lists all the identifiers of the resources belonging the collection |
Collection |
loadAllCollections()
Loads the root collection. |
void |
printResourcesIDs()
Prints all the IDs of the Resources stored in the DB instance |
boolean |
resourceExists(GCUBEXMLResource resource)
Checks if the resource does exist in the storage |
void |
retrieveResourceContent(GCUBEXMLResource resource)
Retrieves a resource's content from the storage |
void |
setStatus(org.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorage.STATUS status)
|
boolean |
shutdown(boolean lock)
Shutdowns the XML Storage repository |
void |
storeResource(GCUBEXMLResource resource)
Stores a XMLDBDocument in the current collection. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLStorage()
| Method Detail |
|---|
public void initialize(boolean... lock)
throws XMLStorage.XMLStorageNotAvailableException
lock - if the storage has to be locked or not during the initalization
XMLStorage.XMLStorageNotAvailableException - if the connection to eXist or its initialization fail
public void initialize(long maxOperationsPerConnection,
boolean... lock)
throws XMLStorage.XMLStorageNotAvailableException
maxOperationsPerConnection - max number of operation per active connectionlock - if the storage has to be locked or not during the initalization
XMLStorage.XMLStorageNotAvailableException - if the connection to eXist or its initialization fail
public Collection createCollection(java.lang.String name)
throws XMLDBException,
XMLStorage.XMLStorageNotAvailableException
name - the collection to create
XMLDBException
XMLStorage.XMLStorageNotAvailableExceptionpublic boolean shutdown(boolean lock)
public Collection loadAllCollections()
public void storeResource(GCUBEXMLResource resource)
throws XMLStorage.XMLStorageNotAvailableException,
GCUBEXMLResource.MalformedXMLResourceException
resource - the resource to store
GCUBEXMLResource.MalformedXMLResourceException
XMLStorage.XMLStorageNotAvailableException - if the storing failspublic boolean isLocked()
public void retrieveResourceContent(GCUBEXMLResource resource)
throws java.lang.Exception
resource -
XMLStorage.XMLStorageNotAvailableException
java.lang.Exception
public boolean resourceExists(GCUBEXMLResource resource)
throws GCUBEXMLResource.MalformedXMLResourceException,
XMLStorage.XMLStorageNotAvailableException
resource - the resource to check
GCUBEXMLResource.MalformedXMLResourceException - if the input resource is not valid
XMLStorage.XMLStorageNotAvailableExceptionpublic GCUBEXMLResource executeXPathQuery(java.lang.String xpathquery)
xpathquery -
public void deleteResource(GCUBEXMLResource resource)
throws java.lang.Exception
java.lang.Exceptionpublic void printResourcesIDs()
public boolean collectionExists(java.lang.String collectionName)
collectionName - the name of the collection to check
public void deleteCollection(java.lang.String collectionName)
throws XMLStorage.XMLStorageNotAvailableException
collectionName - the name of the collection to delete
XMLStorage.XMLStorageNotAvailableException
public java.lang.String[] listAllCollectionResourceIDs(java.lang.String collectionName)
throws XMLStorage.XMLStorageNotAvailableException
collectionName - the collection name
XMLStorage.XMLStorageNotAvailableExceptionpublic org.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorage.STATUS getStatus()
public void setStatus(org.gcube.informationsystem.collector.impl.xmlstorage.exist.XMLStorage.STATUS status)
status - the status to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||