org.fcrepo.server.access
Class DynamicAccessImpl

java.lang.Object
  extended by org.fcrepo.server.access.DynamicAccessImpl

public class DynamicAccessImpl
extends Object

The implementation of the Dynamic Access module.

The Dynamic Access module will associate dynamic disseminators with a digital object. It will look to the Fedora repository configuration file to obtain a list of dynamic disseminators. Currently, the system supports two types of dynamic disseminators: - Default (SDefPID=fedora-system:3 and SDepPID=fedora-system:4) - Bootstrap (SDefPID=fedora-system:1 and SDepPID=fedora-system:2). The Default disseminator that is associated with every object in the repository. The Default Disseminator endows the objects with a set of basic generic behaviors that enable a simplistic view of the object contents (the Item Index) and a list of all disseminations available on the object (the Dissemination Index). The Bootstrap disseminator is associated with every Service Definition and Service Deployment object. It defines methods to get the special metadata datastreams out of them, and some other methods. (NOTE: The Bootstrap Disseminator functionality is NOT YET IMPLEMENTED.

Author:
Sandy Payette

Constructor Summary
DynamicAccessImpl(Access m_access, File reposHomeDir, Hashtable dynamicSDefToDep)
           
 
Method Summary
 RepositoryInfo describeRepository(Context context)
           
 FieldSearchResult findObjects(Context context, String[] resultFields, int maxResults, FieldSearchQuery query)
           
 MIMETypedStream getDatastreamDissemination(Context context, String PID, String dsID, Date asOfDateTime)
           
 MIMETypedStream getDissemination(Context context, String PID, String sDefPID, String methodName, Property[] userParms, Date asOfDateTime, DOReader reader)
          Perform a dissemination for a method that belongs to a dynamic disseminator that is associate with the digital object.
 MethodDef[] getMethods(Context context, String PID, String sDefPID, Date asOfDateTime)
          Get the method defintions for a given dynamic disseminator that is associated with the digital object.
 MIMETypedStream getMethodsXML(Context context, String PID, String sDefPID, Date asOfDateTime)
          Get an XML encoding of the service defintions for a given dynamic disseminator that is associated with the digital object.
 String[] getObjectHistory(Context context, String PID)
           
 ObjectProfile getObjectProfile(Context context, String PID, Date asOfDateTime)
          Get the profile information for the digital object.
 String[] getServiceDefinitions(Context context, String PID, Date asOfDateTime)
          Get a list of Service Definition identifiers for dynamic disseminators associated with the digital object.
 boolean isDynamicDeployment(Context context, String PID, String sDefPID)
           
 DatastreamDef[] listDatastreams(Context context, String PID, Date asOfDateTime)
           
 ObjectMethodsDef[] listMethods(Context context, String PID, Date asOfDateTime)
          Get the definitions for all dynamic disseminations on the object.
 FieldSearchResult resumeFindObjects(Context context, String sessionToken)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicAccessImpl

public DynamicAccessImpl(Access m_access,
                         File reposHomeDir,
                         Hashtable dynamicSDefToDep)
Method Detail

getServiceDefinitions

public String[] getServiceDefinitions(Context context,
                                      String PID,
                                      Date asOfDateTime)
                               throws ServerException
Get a list of Service Definition identifiers for dynamic disseminators associated with the digital object.

Parameters:
context -
PID - identifier of digital object being reflected upon
asOfDateTime -
Returns:
an array of Service Definition PIDs
Throws:
ServerException

getMethods

public MethodDef[] getMethods(Context context,
                              String PID,
                              String sDefPID,
                              Date asOfDateTime)
                       throws ServerException
Get the method defintions for a given dynamic disseminator that is associated with the digital object. The dynamic disseminator is identified by the sDefPID.

Parameters:
context -
PID - identifier of digital object being reflected upon
sDefPID - identifier of dynamic Service Definition
asOfDateTime -
Returns:
an array of method definitions
Throws:
ServerException

getMethodsXML

public MIMETypedStream getMethodsXML(Context context,
                                     String PID,
                                     String sDefPID,
                                     Date asOfDateTime)
                              throws ServerException
Get an XML encoding of the service defintions for a given dynamic disseminator that is associated with the digital object. The dynamic disseminator is identified by the sDefPID.

Parameters:
context -
PID - identifier of digital object being reflected upon
sDefPID - identifier of dynamic Service Definition
asOfDateTime -
Returns:
MIME-typed stream containing XML-encoded method definitions
Throws:
ServerException

getDissemination

public MIMETypedStream getDissemination(Context context,
                                        String PID,
                                        String sDefPID,
                                        String methodName,
                                        Property[] userParms,
                                        Date asOfDateTime,
                                        DOReader reader)
                                 throws ServerException
Perform a dissemination for a method that belongs to a dynamic disseminator that is associate with the digital object. The method belongs to the dynamic Service Definition and is implemented by a dynamic Service Deployment (which is an internal service in the repository access subsystem).

Parameters:
context -
PID - identifier of the digital object being disseminated
sDefPID - identifier of dynamic Service Definition
methodName -
userParms -
asOfDateTime -
Returns:
a MIME-typed stream containing the dissemination result
Throws:
ServerException

listMethods

public ObjectMethodsDef[] listMethods(Context context,
                                      String PID,
                                      Date asOfDateTime)
                               throws ServerException
Get the definitions for all dynamic disseminations on the object. This will return the method definitions for all methods for all of the dynamic disseminators associated with the object.

Parameters:
context -
PID - identifier of digital object being reflected upon
asOfDateTime -
Returns:
an array of object method definitions
Throws:
ServerException

getObjectProfile

public ObjectProfile getObjectProfile(Context context,
                                      String PID,
                                      Date asOfDateTime)
                               throws ServerException
Get the profile information for the digital object. This contain key metadata and URLs for the Dissemination Index and Item Index of the object.

Parameters:
context -
PID - identifier of digital object being reflected upon
asOfDateTime -
Returns:
an object profile data structure
Throws:
ServerException

findObjects

public FieldSearchResult findObjects(Context context,
                                     String[] resultFields,
                                     int maxResults,
                                     FieldSearchQuery query)
                              throws ServerException
Throws:
ServerException

resumeFindObjects

public FieldSearchResult resumeFindObjects(Context context,
                                           String sessionToken)
                                    throws ServerException
Throws:
ServerException

describeRepository

public RepositoryInfo describeRepository(Context context)
                                  throws ServerException
Throws:
ServerException

getObjectHistory

public String[] getObjectHistory(Context context,
                                 String PID)
                          throws ServerException
Throws:
ServerException

isDynamicDeployment

public boolean isDynamicDeployment(Context context,
                                   String PID,
                                   String sDefPID)
                            throws ServerException
Throws:
ServerException

getDatastreamDissemination

public MIMETypedStream getDatastreamDissemination(Context context,
                                                  String PID,
                                                  String dsID,
                                                  Date asOfDateTime)
                                           throws ServerException
Throws:
ServerException

listDatastreams

public DatastreamDef[] listDatastreams(Context context,
                                       String PID,
                                       Date asOfDateTime)
                                throws ServerException
Throws:
ServerException


Copyright © 2012 DuraSpace. All Rights Reserved.