|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.server.storage.DirectoryBasedRepositoryReader
public class DirectoryBasedRepositoryReader
A RepositoryReader that uses a directory of serialized objects as its working repository.
All files in the directory must be digital object serializations, and none may have the same PID. This is verified upon construction.
Note: This implementation does not recognize when files are added to the directory. What is in the directory at construction-time is what is assumed to be the extent of the repository for the life of the object.
| Constructor Summary | |
|---|---|
DirectoryBasedRepositoryReader(File directory,
DOTranslator translator,
String exportFormat,
String storageFormat,
String encoding)
Initializes the RepositoryReader by looking at all files in the provided directory and ensuring that they're all serialized digital objects and that there are no PID conflicts. |
|
| Method Summary | |
|---|---|
DOReader |
getReader(boolean UseCachedObject,
Context context,
String pid)
Gets a digital object reader. |
ServiceDefinitionReader |
getServiceDefinitionReader(boolean UseCachedObject,
Context context,
String pid)
|
ServiceDeploymentReader |
getServiceDeploymentReader(boolean UseCachedObject,
Context context,
String pid)
|
String[] |
listObjectPIDs(Context context)
Gets a list of PIDs (accessible in the given context) of all objects in the repository. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectoryBasedRepositoryReader(File directory,
DOTranslator translator,
String exportFormat,
String storageFormat,
String encoding)
throws StorageDeviceException,
ObjectIntegrityException,
StreamIOException,
UnsupportedTranslationException,
ServerException
directory - the directory where this repository is based.translator - the serialization/deserialization engine for objects.exportFormat - the format to use for export requests.storageFormat - the format of the objects on disk.encoding - The character encoding used across all formats.
StorageDeviceException
ObjectIntegrityException
StreamIOException
UnsupportedTranslationException
ServerException| Method Detail |
|---|
public DOReader getReader(boolean UseCachedObject,
Context context,
String pid)
throws ObjectIntegrityException,
ObjectNotFoundException,
StreamIOException,
UnsupportedTranslationException,
ServerException
RepositoryReader
getReader in interface RepositoryReadercontext - The context of this request.pid - The PID of the object.
ServerException - If anything went wrong.
ObjectIntegrityException
ObjectNotFoundException
StreamIOException
UnsupportedTranslationException
public ServiceDeploymentReader getServiceDeploymentReader(boolean UseCachedObject,
Context context,
String pid)
throws ObjectIntegrityException,
ObjectNotFoundException,
StreamIOException,
UnsupportedTranslationException,
ServerException
getServiceDeploymentReader in interface RepositoryReaderObjectIntegrityException
ObjectNotFoundException
StreamIOException
UnsupportedTranslationException
ServerException
public ServiceDefinitionReader getServiceDefinitionReader(boolean UseCachedObject,
Context context,
String pid)
throws ObjectIntegrityException,
ObjectNotFoundException,
StreamIOException,
UnsupportedTranslationException,
ServerException
getServiceDefinitionReader in interface RepositoryReaderObjectIntegrityException
ObjectNotFoundException
StreamIOException
UnsupportedTranslationException
ServerExceptionpublic String[] listObjectPIDs(Context context)
RepositoryReader
listObjectPIDs in interface RepositoryReader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||