public class MemoryRepository extends AbstractDirectRepository
| Constructor and Description |
|---|
MemoryRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the repository and release all resources.
|
DigitalObject |
createDigitalObject(java.lang.String handle)
Creates a new digital object with the given identifier in this repository.
|
void |
deleteDigitalObject(java.lang.String handle)
Deletes a digital object from the repository.
|
DigitalObject |
getDigitalObject(java.lang.String handle)
Returns the digital object with the given identifier from this repository.
|
java.io.File |
getFile(java.lang.String handle,
java.lang.String elementName)
Returns a file for the data of the data element.
|
DigitalObject |
getOrCreateDigitalObject(java.lang.String handle)
Returns the digital object with the given identifier from this repository, which is created if it does not exist.
|
CloseableIterator<java.lang.String> |
listHandles()
Provides a CloseableIterator view of the identifiers for digital objects accessible through this repository.
|
CloseableIterator<DigitalObject> |
listObjects()
Provides a CloseableIterator view of the digital objects accessible through this repository.
|
CloseableIterator<DigitalObject> |
search(Query query)
Provides a CloseableIterator view of the digital objects accessible through this repository under search bounds defined in the Query object with default parameters.
|
CloseableIterator<java.lang.String> |
searchHandles(Query query)
Provides a CloseableIterator view of the digital objects handles accessible through this repository under search bounds defined in the Query object with default parameters.
|
boolean |
verifyDigitalObject(java.lang.String handle)
Verifies whether a digital object with the given identifier can be accessed via this repository.
|
createDataElement, deleteAttribute, deleteAttributes, deleteDataElement, getAttribute, getAttributes, getSize, listAttributes, listDataElementNames, read, setAttribute, setAttributes, verifyDataElement, writegetHandle, search, search, searchHandles, searchHandles, searchMappingequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHandle, search, search, searchHandles, searchHandles, searchMappingpublic boolean verifyDigitalObject(java.lang.String handle)
RepositoryverifyDigitalObject in interface RepositoryverifyDigitalObject in class AbstractRepositoryhandle - an identifier for a digital objectpublic DigitalObject createDigitalObject(java.lang.String handle) throws CreationException
Repositorynull requests that the repository assign a new unique identifier;
this method will throw UnsupportedOperationException if the given repository does not support that functionality.handle - the identifier for the new digital object, or null to request that the repository assign a new unique identifier.CreationException - if an object with the given identifier already exists within the repositorypublic DigitalObject getDigitalObject(java.lang.String handle)
Repositoryhandle - the identifier for the digital objectpublic DigitalObject getOrCreateDigitalObject(java.lang.String handle) throws RepositoryException
RepositorygetOrCreateDigitalObject in interface RepositorygetOrCreateDigitalObject in class AbstractRepositoryhandle - the identifier for the digital objectRepositoryExceptionpublic void deleteDigitalObject(java.lang.String handle)
throws NoSuchDigitalObjectException
RepositorydeleteDigitalObject in interface RepositorydeleteDigitalObject in class AbstractRepositoryhandle - the identifier for the digital objectNoSuchDigitalObjectExceptionpublic CloseableIterator<java.lang.String> listHandles()
RepositorylistHandles in interface RepositorylistHandles in class AbstractRepositorypublic CloseableIterator<DigitalObject> listObjects()
RepositorylistObjects in interface RepositorylistObjects in class AbstractRepositorypublic CloseableIterator<DigitalObject> search(Query query) throws RepositoryException
Repositorysearch in interface Repositorysearch in class AbstractRepositoryquery - the query to performQueryResults.RepositoryExceptionpublic CloseableIterator<java.lang.String> searchHandles(Query query) throws RepositoryException
RepositorysearchHandles in interface RepositorysearchHandles in class AbstractRepositoryquery - the query to performQueryResults.RepositoryExceptionpublic void close()
Repositorypublic java.io.File getFile(java.lang.String handle,
java.lang.String elementName)
throws RepositoryException
DirectRepositorygetFile in interface DirectRepositorygetFile in class AbstractDirectRepositoryRepositoryException