public interface Repository
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.lang.String |
getHandle()
Returns the handle of the repository.
|
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<DigitalObject> |
search(Query query,
QueryParams queryParams)
Provides a CloseableIterator view of the digital objects accessible through this repository under search bounds defined in the Query object and the parameters defined in the QueryParams object.
|
CloseableIterator<DigitalObject> |
search(java.lang.String query)
Deprecated.
|
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.
|
CloseableIterator<java.lang.String> |
searchHandles(Query query,
QueryParams queryParams)
Provides a CloseableIterator view of the digital objects handles accessible through this repository under search bounds defined in the Query object and the parameters defined in the QueryParams object.
|
CloseableIterator<java.lang.String> |
searchHandles(java.lang.String query)
Deprecated.
|
CloseableIterator<java.util.Map<java.lang.String,java.lang.String>> |
searchMapping(java.lang.String query)
Deprecated.
|
boolean |
verifyDigitalObject(java.lang.String handle)
Verifies whether a digital object with the given identifier can be accessed via this repository.
|
java.lang.String getHandle()
null
for local repositories.null
if not available.boolean verifyDigitalObject(java.lang.String handle) throws RepositoryException
handle
- an identifier for a digital objectRepositoryException
DigitalObject createDigitalObject(java.lang.String handle) throws CreationException, RepositoryException
null
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 repositoryRepositoryException
DigitalObject getDigitalObject(java.lang.String handle) throws RepositoryException
handle
- the identifier for the digital objectRepositoryException
DigitalObject getOrCreateDigitalObject(java.lang.String handle) throws RepositoryException
handle
- the identifier for the digital objectRepositoryException
void deleteDigitalObject(java.lang.String handle) throws RepositoryException
handle
- the identifier for the digital objectRepositoryException
CloseableIterator<java.lang.String> listHandles() throws RepositoryException
RepositoryException
CloseableIterator<DigitalObject> listObjects() throws RepositoryException
RepositoryException
CloseableIterator<DigitalObject> search(Query query, QueryParams queryParams) throws RepositoryException
query
- the query to performqueryParams
- parameters for the query, or null
for default parametersQueryResults
.RepositoryException
CloseableIterator<java.lang.String> searchHandles(Query query, QueryParams queryParams) throws RepositoryException
query
- the query to performqueryParams
- parameters for the query, or null
for default parametersQueryResults
.RepositoryException
CloseableIterator<DigitalObject> search(Query query) throws RepositoryException
query
- the query to performQueryResults
.RepositoryException
CloseableIterator<java.lang.String> searchHandles(Query query) throws RepositoryException
query
- the query to performQueryResults
.RepositoryException
@Deprecated CloseableIterator<DigitalObject> search(java.lang.String query) throws RepositoryException
RepositoryException
@Deprecated CloseableIterator<java.lang.String> searchHandles(java.lang.String query) throws RepositoryException
searchHandles(Query,QueryParams)
with first argument a RawQuery
and second argument null
.RepositoryException
@Deprecated CloseableIterator<java.util.Map<java.lang.String,java.lang.String>> searchMapping(java.lang.String query) throws RepositoryException
RepositoryException
void close()