public class FilesystemRepository extends AbstractRepository implements Repository
| Constructor and Description |
|---|
FilesystemRepository(java.io.File root) |
| 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.
|
static byte |
decodeHexByte(byte ch1,
byte ch2) |
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.
|
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.
|
void |
lock(boolean shared) |
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.
|
void |
unlock() |
boolean |
verifyDigitalObject(java.lang.String handle)
Verifies whether a digital object with the given identifier can be accessed via this repository.
|
getHandle, getOrCreateDigitalObject, search, search, searchHandles, searchHandles, searchMappingequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHandle, getOrCreateDigitalObject, search, search, searchHandles, searchHandles, searchMappingpublic boolean verifyDigitalObject(java.lang.String handle)
throws RepositoryException
RepositoryverifyDigitalObject in interface RepositoryverifyDigitalObject in class AbstractRepositoryhandle - an identifier for a digital objectRepositoryExceptionpublic DigitalObject createDigitalObject(java.lang.String handle) throws CreationException, RepositoryException
Repositorynull requests that the repository assign a new unique identifier;
this method will throw UnsupportedOperationException if the given repository does not support that functionality.createDigitalObject in interface Repositoryhandle - 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 repositoryRepositoryExceptionpublic DigitalObject getDigitalObject(java.lang.String handle) throws RepositoryException
RepositorygetDigitalObject in interface Repositoryhandle - the identifier for the digital objectRepositoryExceptionpublic void deleteDigitalObject(java.lang.String handle)
throws RepositoryException
RepositorydeleteDigitalObject in interface RepositorydeleteDigitalObject in class AbstractRepositoryhandle - the identifier for the digital objectRepositoryExceptionpublic CloseableIterator<java.lang.String> listHandles()
RepositorylistHandles in interface RepositorylistHandles in class AbstractRepositorypublic CloseableIterator<DigitalObject> listObjects() throws RepositoryException
RepositorylistObjects in interface RepositorylistObjects in class AbstractRepositoryRepositoryExceptionpublic static final byte decodeHexByte(byte ch1,
byte ch2)
public void close()
Repositoryclose in interface Repositorypublic 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 lock(boolean shared)
throws RepositoryException
RepositoryExceptionpublic void unlock()