|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface XmlDbAccess<E>
| Method Summary | |
|---|---|
boolean |
createCollection(String directoryPath)
Creates a collection specified by the directory name, if not already exists. |
ResultIterator<E> |
executePredefinedQuery(String name,
ParameterValue... parameterValues)
Execute predefined query. |
HashSet<String> |
getIdentifierByFile(String file)
Checks identity of an inserted object. |
HashSet<String> |
getIdentifierByTemporyResource(E resource,
String dir)
|
HashSet<String> |
getIdentifierByTemporyResource(String tempId,
String dir)
|
HashSet<String> |
getIdentifierByXQuery(String xquery)
This methods returns a set of document identifiers that correspond to the result of the xquery. |
String |
getIdentifierOfResource(E resource)
Get identifier of specific resource. |
ArrayList<String> |
getIdentifiesByRelation(E resource,
String relation)
Get referenced identifiers of a specified relationship based on a specified entity. |
ArrayList<String> |
getIdentifiesByRelation(String id,
String relation)
Get referenced identifiers of a specified relationship based on the entity with specified id. |
String |
getLocalDirectoryName(String docId)
Get the local name of the collection storing a specific entity. |
ArrayList<String> |
getRelationships(E resource)
Get the provided relationships of a persistent resource. |
ArrayList<String> |
getRelationships(String id)
Get the provided relationships of an object specified by its identifier. |
ArrayList<E> |
getResourcesByRelation(E resource,
String relation)
Get referenced objects of a specified relationship based on a specified entity. |
ArrayList<E> |
getResourcesByRelation(String id,
String relation)
Get referenced objects of a specified relationship based on the entity with specified id. |
void |
insertRelationship(String fromId,
String fromConcept,
String relationshipName,
String toId,
String toConcept)
Stores a relationship with specific name between two documents specified by their ids. |
E |
lookup(String docId)
Lookup a specific XML resource by its document identifier. |
E |
lookup(String docId,
String directoryPath)
Lookup a specific XML resource by its document identifier and the directoryPath it belongs to. |
ResultIterator<E> |
lookupByDirectory(String directoryPath)
Returns documents (resources) that are stored in the specified directory. |
ArrayList<E> |
lookupByFile(String file)
|
ArrayList<E> |
lookupByTemporaryResource(E resource,
String dir)
|
ResultIterator<E> |
query(String xquery)
Execute an xquery statement on the registry. |
void |
registerPredefinedQuery(String name,
String query,
String... parameterNames)
Register a predefined query expression with the database. |
void |
removeAllDocumentsFromRegistry(String directoryPath)
Removes all resources from the registry specified by the directory. |
void |
removeDocumentFromRegistry(String directoryPath,
String id)
Remove a resource (xml document) from a specified collection. |
void |
resetPredefinedQueries()
Reset the predefined queries. |
String |
storeDocumentInRegistry(String directoryPath,
Document content,
String id)
Stores a resource (dom) in the registry. |
String |
storeDocumentInRegistry(String directoryPath,
File file,
String id)
Stores a resource (xml document) that is specified by a file. |
String |
storeDocumentInRegistry(String directoryPath,
String filename,
String id)
Stores a resource (xml document) that is specified by a file. |
String |
storeDocumentInRegistry(String directoryPath,
URI uri,
String id)
Stores a resource (xml document) that is specified by a URI. |
void |
storePredefinedQuery(String name,
String query,
String... parameterNames)
Stores a predefined query in the database. |
String |
storeStringDocumentInRegistry(String directoryPath,
String content,
String id)
Stores a resource (xml document) that is specified by a string. |
| Methods inherited from interface uk.ac.soton.itinnovation.registry.icomponent.access.Access |
|---|
getCacheManagement |
| Methods inherited from interface uk.ac.soton.itinnovation.registry.component.xml.db.PermissionManagement |
|---|
setPermission, setPermission |
| Method Detail |
|---|
boolean createCollection(String directoryPath)
throws DatabaseException
directoryPath - dir has to start with an '/'
DatabaseException
String storeDocumentInRegistry(String directoryPath,
String filename,
String id)
throws DatabaseException,
IOException
directoryPath - concept under which the document is stored (beginning with '/')filename - id - identifier of the resource. If null then a new identifier will be generated.
DatabaseException
IOException
String storeDocumentInRegistry(String directoryPath,
URI uri,
String id)
throws DatabaseException,
IOException
directoryPath - concept under which the document is stored (beginning with '/')uri - id - identifier of the resource. If null then a new identifier will be generated.
DatabaseException
IOException
String storeDocumentInRegistry(String directoryPath,
File file,
String id)
throws DatabaseException,
IOException
directoryPath - concept under which the document is stored (beginning with '/')file - id - identifier of the resource. If null then a new identifier will be generated.
DatabaseException
IOException
String storeDocumentInRegistry(String directoryPath,
Document content,
String id)
throws DatabaseException,
IOException
directoryPath - content - id -
DatabaseException
IOException
String storeStringDocumentInRegistry(String directoryPath,
String content,
String id)
throws DatabaseException,
IOException
directoryPath - concept under which the document is stored (beginning with '/')content - xml contentid - identifier of the resource. If null then a new identifier will be generated.
DatabaseException
IOException
void removeDocumentFromRegistry(String directoryPath,
String id)
throws DatabaseException
directoryPath - directory under which the document is stored (beginning with '/')id -
DatabaseException
void removeAllDocumentsFromRegistry(String directoryPath)
throws DatabaseException
directoryPath -
DatabaseException
void insertRelationship(String fromId,
String fromConcept,
String relationshipName,
String toId,
String toConcept)
throws DatabaseException
fromId - fromConcept - relationshipName - toId - toConcept -
DatabaseException
ArrayList<String> getRelationships(String id)
throws DatabaseException
id -
DatabaseException
ArrayList<String> getRelationships(E resource)
throws DatabaseException
resource -
DatabaseException
ArrayList<String> getIdentifiesByRelation(String id,
String relation)
throws DatabaseException
id - relation -
DatabaseException
ArrayList<String> getIdentifiesByRelation(E resource,
String relation)
throws DatabaseException
resource - relation -
DatabaseException
ArrayList<E> getResourcesByRelation(String id,
String relation)
throws DatabaseException
id - relation -
DatabaseException
ArrayList<E> getResourcesByRelation(E resource,
String relation)
throws DatabaseException
resource - relation -
DatabaseException
ResultIterator<E> executePredefinedQuery(String name,
ParameterValue... parameterValues)
throws DatabaseException
name - name under with the query is stored.parameterValues -
DatabaseException
String getLocalDirectoryName(String docId)
throws DatabaseException,
AccessException
docId -
DatabaseException
AccessException
E lookup(String docId)
throws DatabaseException
docId -
DatabaseException
E lookup(String docId,
String directoryPath)
throws DatabaseException
docId - directoryPath - (begins with '/')
DatabaseException
ArrayList<E> lookupByFile(String file)
throws DatabaseException,
IOException
file -
DatabaseException
IOException
ArrayList<E> lookupByTemporaryResource(E resource,
String dir)
throws DatabaseException
resource -
DatabaseException
ResultIterator<E> lookupByDirectory(String directoryPath)
throws DatabaseException
directoryPath -
DatabaseException
HashSet<String> getIdentifierByFile(String file)
throws DatabaseException,
IOException
file -
DatabaseException
IOException
HashSet<String> getIdentifierByTemporyResource(String tempId,
String dir)
throws DatabaseException
tempId - identifier of temporal resourcedir - search directory
DatabaseException
HashSet<String> getIdentifierByTemporyResource(E resource,
String dir)
throws DatabaseException
resource - dir - search directory
DatabaseException
String getIdentifierOfResource(E resource)
throws DatabaseException
resource -
DatabaseException
HashSet<String> getIdentifierByXQuery(String xquery)
throws DatabaseException
xquery -
DatabaseException
ResultIterator<E> query(String xquery)
throws DatabaseException
xquery -
DatabaseException
void storePredefinedQuery(String name,
String query,
String... parameterNames)
throws DatabaseException
collection - name - name of the queryquery - xquery expressionparameterNames - parameters used in the query
DatabaseException
void registerPredefinedQuery(String name,
String query,
String... parameterNames)
throws DatabaseException
collection - name - query - parameterNames -
DatabaseExceptionvoid resetPredefinedQueries()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||