|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfedora.server.StdoutLogging
fedora.server.storage.DirectoryBasedRepositoryReader
Title: DirectoryBasedRepositoryReader.java
Description: 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.
-----------------------------------------------------------------------------License and Copyright: The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/.
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The entire file consists of original code. Copyright © 2002-2005 by The Rector and Visitors of the University of Virginia and Cornell University. All rights reserved.
-----------------------------------------------------------------------------
| Field Summary |
| Fields inherited from class fedora.server.StdoutLogging |
CONFIG, FINE, FINER, FINEST, INFO, SEVERE, WARNING |
| Constructor Summary | |
DirectoryBasedRepositoryReader(java.io.File directory,
fedora.server.storage.translation.DOTranslator translator,
java.lang.String exportFormat,
java.lang.String storageFormat,
java.lang.String encoding,
Logging logTarget)
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 | |
BDefReader |
getBDefReader(Context context,
java.lang.String pid)
|
BMechReader |
getBMechReader(Context context,
java.lang.String pid)
|
DOReader |
getReader(Context context,
java.lang.String pid)
Gets a digital object reader. |
java.lang.String[] |
listObjectPIDs(Context context)
Gets a list of PIDs (accessible in the given context) of all objects in the repository. |
| Methods inherited from class fedora.server.StdoutLogging |
logConfig, logFine, logFiner, logFinest, loggingConfig, loggingFine, loggingFiner, loggingFinest, loggingInfo, loggingSevere, loggingWarning, logInfo, logSevere, logWarning, setLogLevel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DirectoryBasedRepositoryReader(java.io.File directory,
fedora.server.storage.translation.DOTranslator translator,
java.lang.String exportFormat,
java.lang.String storageFormat,
java.lang.String encoding,
Logging logTarget)
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 exportObject requests.storageFormat - the format of the objects on disk.encoding - The character encoding used across all formats.| Method Detail |
public DOReader getReader(Context context,
java.lang.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 BMechReader getBMechReader(Context context,
java.lang.String pid)
throws ObjectIntegrityException,
ObjectNotFoundException,
StreamIOException,
UnsupportedTranslationException,
ServerException
getBMechReader in interface RepositoryReaderObjectIntegrityException
ObjectNotFoundException
StreamIOException
UnsupportedTranslationException
ServerException
public BDefReader getBDefReader(Context context,
java.lang.String pid)
throws ObjectIntegrityException,
ObjectNotFoundException,
StreamIOException,
UnsupportedTranslationException,
ServerException
getBDefReader in interface RepositoryReaderObjectIntegrityException
ObjectNotFoundException
StreamIOException
UnsupportedTranslationException
ServerExceptionpublic java.lang.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 | ||||||||||