fedora.server.access
Class DynamicAccessImpl

java.lang.Object
  extended by fedora.server.access.DynamicAccessImpl

public class DynamicAccessImpl
extends java.lang.Object

Title: DynamicAccessImpl.java

Description: The implementation of the Dynamic Access module. The Dynamic Access module will associate dynamic disseminators with the 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 (BDefPID=fedora-system:3 and BMechPID=fedora-system:4) - Bootstrap (BDefPID=fedora-system:1 and BMechPID=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 behavior definition and behavior mechanism 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.

Version:
$Id: DynamicAccessImpl.java 4141 2005-05-18 22:21:15Z eddie $
Author:
payette@cs.cornell.edu

Constructor Summary
DynamicAccessImpl(Access m_access, java.io.File reposHomeDir, java.util.Hashtable dynamicBDefToMech)
           
 
Method Summary
 RepositoryInfo describeRepository(Context context)
           
 FieldSearchResult findObjects(Context context, java.lang.String[] resultFields, int maxResults, FieldSearchQuery query)
           
 java.lang.String[] getBehaviorDefinitions(Context context, java.lang.String PID, java.util.Date asOfDateTime)
          Get a list of behavior definition identifiers for dynamic disseminators associated with the digital object.
 MethodDef[] getBehaviorMethods(Context context, java.lang.String PID, java.lang.String bDefPID, java.util.Date asOfDateTime)
          Get the behavior method defintions for a given dynamic disseminator that is associated with the digital object.
 MIMETypedStream getBehaviorMethodsXML(Context context, java.lang.String PID, java.lang.String bDefPID, java.util.Date asOfDateTime)
          Get an XML encoding of the behavior defintions for a given dynamic disseminator that is associated with the digital object.
 MIMETypedStream getDatastreamDissemination(Context context, java.lang.String PID, java.lang.String dsID, java.util.Date asOfDateTime)
           
 MIMETypedStream getDissemination(Context context, java.lang.String PID, java.lang.String bDefPID, java.lang.String methodName, Property[] userParms, java.util.Date asOfDateTime, DOReader reader)
          Perform a dissemination for a behavior method that belongs to a dynamic disseminator that is associate with the digital object.
 java.lang.String[] getObjectHistory(Context context, java.lang.String PID)
           
 ObjectProfile getObjectProfile(Context context, java.lang.String PID, java.util.Date asOfDateTime)
          Get the profile information for the digital object.
 boolean isDynamicBehaviorDefinition(Context context, java.lang.String PID, java.lang.String bDefPID)
           
 DatastreamDef[] listDatastreams(Context context, java.lang.String PID, java.util.Date asOfDateTime)
           
 ObjectMethodsDef[] listMethods(Context context, java.lang.String PID, java.util.Date asOfDateTime)
          Get the definitions for all dynamic disseminations on the object.
 FieldSearchResult resumeFindObjects(Context context, java.lang.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,
                         java.io.File reposHomeDir,
                         java.util.Hashtable dynamicBDefToMech)
Method Detail

getBehaviorDefinitions

public java.lang.String[] getBehaviorDefinitions(Context context,
                                                 java.lang.String PID,
                                                 java.util.Date asOfDateTime)
                                          throws ServerException
Get a list of behavior 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 behavior definition PIDs
Throws:
ServerException

getBehaviorMethods

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

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

getBehaviorMethodsXML

public MIMETypedStream getBehaviorMethodsXML(Context context,
                                             java.lang.String PID,
                                             java.lang.String bDefPID,
                                             java.util.Date asOfDateTime)
                                      throws ServerException
Get an XML encoding of the behavior defintions for a given dynamic disseminator that is associated with the digital object. The dynamic disseminator is identified by the bDefPID.

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

getDissemination

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

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

listMethods

public ObjectMethodsDef[] listMethods(Context context,
                                      java.lang.String PID,
                                      java.util.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,
                                      java.lang.String PID,
                                      java.util.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,
                                     java.lang.String[] resultFields,
                                     int maxResults,
                                     FieldSearchQuery query)
                              throws ServerException
Throws:
ServerException

resumeFindObjects

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

describeRepository

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

getObjectHistory

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

isDynamicBehaviorDefinition

public boolean isDynamicBehaviorDefinition(Context context,
                                           java.lang.String PID,
                                           java.lang.String bDefPID)
                                    throws ServerException
Throws:
ServerException

getDatastreamDissemination

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

listDatastreams

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