|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfedora.server.Parameterized
fedora.server.Pluggable
fedora.server.Module
fedora.server.storage.DefaultDOManager
Title: DefaultDOManager.java
Description: Manages the reading and writing of digital objects by instantiating an appropriate object reader or writer. Also, manages the object ingest process and the object replication process.
-----------------------------------------------------------------------------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 | |
static java.lang.String |
DEFAULT_STATE
|
| Constructor Summary | |
DefaultDOManager(java.util.Map moduleParameters,
Server server,
java.lang.String role)
Creates a new DefaultDOManager. |
|
| Method Summary | |
void |
doCommit(Context context,
DigitalObject obj,
java.lang.String logMessage,
boolean remove)
The doCommit method finalizes an ingest/update/remove of a digital object. |
FieldSearchResult |
findObjects(Context context,
java.lang.String[] resultFields,
int maxResults,
FieldSearchQuery query)
|
BDefReader |
getBDefReader(Context context,
java.lang.String pid)
Gets a reader on an an existing behavior definition object. |
BMechReader |
getBMechReader(Context context,
java.lang.String pid)
Gets a reader on an an existing behavior mechanism object. |
ConnectionPool |
getConnectionPool()
|
ILowlevelStorage |
getDatastreamStore()
|
java.lang.String |
getDefaultExportFormat()
|
DOValidator |
getDOValidator()
|
DOWriter |
getIngestWriter(Context context,
java.io.InputStream in,
java.lang.String format,
java.lang.String encoding,
boolean newPid)
Manages the INGEST process which includes validation of the ingest XML file, deserialization of the XML into a Digital Object instance, setting of properties on the object by the system (dates and states), PID validation or generation, object registry functions, getting a writer for the digital object, and ultimately writing the object to persistent storage via the writer. |
java.lang.String[] |
getNextPID(int numPIDs,
java.lang.String namespace)
Gets a list of the requested next available PIDs. the number of PIDs. |
ILowlevelStorage |
getObjectStore()
|
java.lang.String |
getOwnerId(java.lang.String pid)
|
DOReader |
getReader(Context context,
java.lang.String pid)
Gets a reader on an an existing digital object. |
DOReplicator |
getReplicator()
|
java.lang.String[] |
getRequiredModuleRoles()
Gets the names of the roles that are required by this Pluggable.
|
java.lang.String |
getStorageCharacterEncoding()
|
java.lang.String |
getStorageFormat()
|
ILowlevelStorage |
getTempStore()
|
fedora.server.storage.translation.DOTranslator |
getTranslator()
|
DOWriter |
getWriter(Context context,
java.lang.String pid)
Gets a writer on an an existing object. |
void |
initModule()
Gets initial param values. |
java.lang.String[] |
listObjectPIDs(Context context)
Gets a list of PIDs (accessible in the given context) of all objects in the repository. |
boolean |
objectExists(java.lang.String pid)
Checks the object registry for the given object. |
void |
postInitModule()
Second stage of Module initialization. |
void |
releaseWriter(DOWriter writer)
Relinquishes control of a DOWriter back to the DOManager. |
FieldSearchResult |
resumeFindObjects(Context context,
java.lang.String sessionToken)
|
static java.lang.String |
toSql(java.lang.String name,
java.lang.String in)
|
| Methods inherited from class fedora.server.Module |
getRole, getServer, logConfig, logFine, logFiner, logFinest, loggingConfig, loggingFine, loggingFiner, loggingFinest, loggingInfo, loggingSevere, loggingWarning, logInfo, logSevere, logWarning, shutdownModule |
| Methods inherited from class fedora.server.Pluggable |
getHelp, getOptionalParameters, getParameterHelp, getRequiredParameters |
| Methods inherited from class fedora.server.Parameterized |
getParameter, getParameters, parameterNames, setParameter, setParameters |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static java.lang.String DEFAULT_STATE
| Constructor Detail |
public DefaultDOManager(java.util.Map moduleParameters,
Server server,
java.lang.String role)
throws ModuleInitializationException
| Method Detail |
public void initModule()
throws ModuleInitializationException
initModule in class ModuleModuleInitializationException - If initialization values are
invalid or initialization fails for some other reason.
public void postInitModule()
throws ModuleInitializationException
Module
postInitModule in class ModuleModuleInitializationException - If initialization values are
invalid or initialization fails for some other reason.public void releaseWriter(DOWriter writer)
DOManager
releaseWriter in interface DOManagerwriter - an instance of a digital object writer.public ILowlevelStorage getObjectStore()
public ILowlevelStorage getDatastreamStore()
public ILowlevelStorage getTempStore()
public ConnectionPool getConnectionPool()
public DOValidator getDOValidator()
public DOReplicator getReplicator()
public java.lang.String[] getRequiredModuleRoles()
PluggablePluggable.
By default, no roles need to be fulfilled.
getRequiredModuleRoles in class Pluggablepublic java.lang.String getStorageFormat()
public java.lang.String getDefaultExportFormat()
public java.lang.String getStorageCharacterEncoding()
public fedora.server.storage.translation.DOTranslator getTranslator()
public DOReader getReader(Context context,
java.lang.String pid)
throws ServerException
getReader in interface RepositoryReadercontext - The context of this request.pid - The PID of the object.
ServerException - If anything went wrong.
public BMechReader getBMechReader(Context context,
java.lang.String pid)
throws ServerException
getBMechReader in interface RepositoryReaderServerException
public BDefReader getBDefReader(Context context,
java.lang.String pid)
throws ServerException
getBDefReader in interface RepositoryReaderServerException
public DOWriter getWriter(Context context,
java.lang.String pid)
throws ServerException,
ObjectLockedException
getWriter in interface DOManagercontext - The context of this request.pid - The PID of the object.
ServerException - If anything went wrong.
ObjectLockedException
public DOWriter getIngestWriter(Context context,
java.io.InputStream in,
java.lang.String format,
java.lang.String encoding,
boolean newPid)
throws ServerException
getIngestWriter in interface DOManagercontext - in - the input stream that is the XML ingest file for a digital objectformat - the format of the XML ingest file (e.g., FOXML, Fedora METS)encoding - the character encoding of the XML ingest file (e.g., UTF-8)newPid - true if the system should generate a new PID for the object
ServerException - If anything went wrong.
public void doCommit(Context context,
DigitalObject obj,
java.lang.String logMessage,
boolean remove)
throws ServerException
ServerException
public boolean objectExists(java.lang.String pid)
throws StorageDeviceException
StorageDeviceException
public java.lang.String getOwnerId(java.lang.String pid)
throws StorageDeviceException,
ObjectNotFoundException
StorageDeviceException
ObjectNotFoundException
public java.lang.String[] listObjectPIDs(Context context)
throws StorageDeviceException
RepositoryReader
listObjectPIDs in interface RepositoryReaderStorageDeviceException
public static java.lang.String toSql(java.lang.String name,
java.lang.String in)
public FieldSearchResult findObjects(Context context,
java.lang.String[] resultFields,
int maxResults,
FieldSearchQuery query)
throws ServerException
findObjects in interface DOManagerServerException
public FieldSearchResult resumeFindObjects(Context context,
java.lang.String sessionToken)
throws ServerException
resumeFindObjects in interface DOManagerServerException
public java.lang.String[] getNextPID(int numPIDs,
java.lang.String namespace)
throws ServerException
Gets a list of the requested next available PIDs. the number of PIDs.
getNextPID in interface DOManagernumPIDs - The number of PIDs to generate. Defaults to 1 if the number
is not a positive integer.namespace - The namespace to be used when generating the PIDs. If
null, the namespace defined by the pidNamespace
parameter in the fedora.fcfg configuration file is used.
ServerException - If an error occurs in generating the PIDs.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||