public class DisseminationService extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Hashtable<String,DatastreamMediation> |
dsRegistry
The hashtable containing information required for datastream mediation.
|
| Constructor and Description |
|---|
DisseminationService(Server server)
Constructs an instance of DisseminationService.
|
| Modifier and Type | Method and Description |
|---|---|
MIMETypedStream |
assembleDissemination(Context context,
String PID,
Hashtable<String,String> h_userParms,
DisseminationBindingInfo[] dissBindInfoArray,
String deploymentPID,
ServiceDeploymentReader bmReader,
String methodName)
Assembles a dissemination given an instance of
DisseminationBindingInfo which has the dissemination-related
information from the digital object and its associated Service Deployment
object. |
String |
extractTimestamp(String tempID)
The tempID that is used for datastream mediation consists of a
Timestamp plus a counter appended to the end to insure uniqueness. |
static void |
printBindingInfo(DisseminationBindingInfo[] info) |
String |
registerDatastreamLocation(String dsLocation,
String dsControlGroupType,
String beServiceCallbackRole,
String methodName)
Datastream locations are considered privileged information by the Fedora
repository.
|
protected static Hashtable<String,DatastreamMediation> dsRegistry
public DisseminationService(Server server)
Constructs an instance of DisseminationService. Initializes two class variables that contain the IP address and port number of the Fedora server. The port number is obtained from the Fedora server config file and the IP address of the server is obtained dynamically. These variables are needed to perform the datastream proxy service for datastream requests.
public MIMETypedStream assembleDissemination(Context context, String PID, Hashtable<String,String> h_userParms, DisseminationBindingInfo[] dissBindInfoArray, String deploymentPID, ServiceDeploymentReader bmReader, String methodName) throws ServerException
Assembles a dissemination given an instance of
DisseminationBindingInfo which has the dissemination-related
information from the digital object and its associated Service Deployment
object.
context - The current context.PID - The persistent identifier of the digital object.h_userParms - A hashtable of user-supplied method parameters.dissBindInfoArray - The associated dissemination binding information.ServerException - If unable to assemble the dissemination for any reason.public String registerDatastreamLocation(String dsLocation, String dsControlGroupType, String beServiceCallbackRole, String methodName) throws ServerException
Datastream locations are considered privileged information by the Fedora
repository. To prevent disclosing physical datastream locations to
external mechanism services, a proxy is used to disguise the datastream
locations. This method generates a temporary ID that maps to the physical
datastream location and registers this information in a memory resident
hashtable for subsequent resolution of the physical datastream location.
The servlet DatastreamResolverServlet provides the proxy
resolution service for datastreams.
The format of the tempID is derived from java.sql.Timestamp
with an arbitrary counter appended to the end to insure uniqueness. The
syntax is of the form:
YYYY-MM-DD HH:mm:ss.mmm:dddddd where
dsLocation - The physical location of the datastream.dsControlGroupType - The type of the datastream.ServerException - If an error occurs in registering a datastream location.public String extractTimestamp(String tempID)
The tempID that is used for datastream mediation consists of a
Timestamp plus a counter appended to the end to insure uniqueness.
This method is a utility method used to extract the Timestamp portion
from the tempID by stripping off the arbitrary counter at the end of the
string.
tempID - The tempID to be extracted.public static void printBindingInfo(DisseminationBindingInfo[] info)
Copyright © 2013 DuraSpace. All Rights Reserved.