Class Fedora.DigitalObject.DigitalObjectImpl
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Fedora.DigitalObject.DigitalObjectImpl

Object
   |
   +----ObjectImpl
           |
           +----DynamicImplementation
                   |
                   +----_DigitalObjectSkeleton
                           |
                           +----_DigitalObjectImplBase
                                   |
                                   +----Fedora.DigitalObject.DigitalObjectImpl

public class DigitalObjectImpl
extends _DigitalObjectImplBase
implements Serializable

Constructor Index

 o Fedora.DigitalObject.DigitalObjectImpl()
Default Constructor
 o Fedora.DigitalObject.DigitalObjectImpl(String)
Constructor - creates a new DigitalObject as named, empty wrapper

Method Index

 o CreateDataStream(String, String, byte[])
Creates a new DataStream in the DigitalObject by updating the DigitalObject's registry and persistent storage.
 o CreateDisseminator(DisseminatorID, String, DisseminatorKind)
Creates a new Disseminator in the DigitalObject by updating the DigitalObject's registry and persistent storage.
 o DeleteDataStream(String)
Deletes a DataStream from the DigitalObject's registry and from persistent storage.
 o DeleteDisseminator(DisseminatorID)
Deletes a Disseminator from the DigitalObject's registry and from persistent storage.
 o GetDataStream(String)
Returns a single DataStream given a unique DataStream id as input.
 o GetDataStreams()
Returns all of the DataStreams in the DigitalObject.
 o GetDigitalObjectID()
Returns the unique identifier (a URN) for the DigitalObject.
 o GetDissemination(DisseminatorID, MethodRequest)
Produce a dissemination of the DigitalObject.
 o GetDisseminator(DisseminatorID)
Returns a single Disseminator given a unique DisseminatorID as input.
 o GetDisseminatorTypeMethods(String)
Returns the Signature (set of methods) that are defined for a DisseminatorType.
 o GetDisseminators()
Returns the Disseminators associated with the DigitalObject.
 o GetKeyMetadata()
Returns the set of administrative attributes for the DigitalObject.
 o ListDataStreamIDs()
Returns the unique identifiers (system assigned IDs) for all of the DataStreams in the DigitalObject.
 o ListDisseminatorIDs()
Lists the identifiers (DisseminatorIDs) of the Disseminators associated with the DigitalObject.
 o ListDisseminatorTypes()
Lists the SignatureIDs for the Disseminator Types associated with the DigitalObject.
 o attachedToDisseminators(String)
Check and see if the datastream associated with the passed ID is associated with any disseminators for this digital object.
 o invokeMethodRequest(Object, MethodRequest)

Constructors

 o DigitalObjectImpl
public DigitalObjectImpl()
Default Constructor

 o DigitalObjectImpl
public DigitalObjectImpl(String digitalObjectID)
Constructor - creates a new DigitalObject as named, empty wrapper

Parameters:
digitalObjectID - the URN of the new DigitalObject

Methods

 o CreateDataStream
public RAP.DataStream CreateDataStream(String MIMEType,
                                       String descriptor,
                                       byte data) throws RepositorySystemError
Creates a new DataStream in the DigitalObject by updating the DigitalObject's registry and persistent storage. Adds an entry to the DigitalObject's internal DataStreamShadowTable, and writes the new DataStream object to persistent storage.

Parameters:
MIMEType - the MIME type of the stream of bytes to be put in the DataStream
descriptor - a unique descriptor for the DataStream
data - the stream of bytes that constitutes the "content" of the DataStream
Returns:
an instance of the new DataStream
Overrides:
CreateDataStream in class _DigitalObjectSkeleton
See Also:
DataStreamImpl, DataStreamShadow
 o CreateDisseminator
public RAP.Disseminator CreateDisseminator(DisseminatorID dissID,
                                           String servletID,
                                           DisseminatorKind enumKind) throws RepositorySystemError
Creates a new Disseminator in the DigitalObject by updating the DigitalObject's registry and persistent storage. Adds an entry to the DigitalObject's internal DisseminatorShadowTable, and writes the new Disseminator object to persistent storage.

Each Disseminator has a signatureID (part of the DisseminatorID) to identify the extended set of operations (Signature) that the Disseminator endows the DigitalObject with. Each Disseminator also has a servletID to identify the mechanism (executable program) that implements the operations defined by the Signature.

A Disseminator is a union object that can be one of three kinds: a StandardDisseminator, a SignatureDisseminator, or a ServletDisseminator. The RAP IDL defines an enumeration type called DisseminatorKind to be used to discriminate a particular kind of Disseminator. The CreateDisseminator method can be used to create any of the three kinds of Disseminators. One of these enum kinds must be specified when creating a new Disseminator.

IMPORTANT!! In the case of a SignatureDisseminator and a ServletDisseminator, it is essential that the dissID be standardized!! Specifically, the signatureID and disseminatorName must be set to values specified in the RAP IDL. These values are found in the constants named DISSEMINATOR_ID_SIGNATURE_ID and DISSEMINATOR_ID_DISSEMINATOR_NAME, both found in the interfaces for SignatureDisseminator and ServletDisseminator. These constants indicate that we are dealing with utility Disseminators that are part of the FEDORA architecture.

Parameters:
dissID - a structure containing a signatureID (a URN) and a disseminator name
servletID - a servletID, which is the URN of the servlet used by the Disseminator
enumKind - one of the DisseminatorKind enumeration values (see RAP IDL)
Returns:
an instance of the new Disseminator
Overrides:
CreateDisseminator in class _DigitalObjectSkeleton
See Also:
StandardDisseminator, SignatureDisseminator, ServletDisseminator, DisseminatorShadow
 o DeleteDataStream
public void DeleteDataStream(String dataStreamID) throws RepositorySystemError
Deletes a DataStream from the DigitalObject's registry and from persistent storage. Removes entries from the DigitalObject's DataStreamShadowTable, and removes all manifestations of the DataStream in persistent storage.

Parameters:
dataStreamID - the unique identifier (system assigned) for a DataStream
Overrides:
DeleteDataStream in class _DigitalObjectSkeleton
See Also:
DataStreamImpl, DataStreamShadow
 o DeleteDisseminator
public void DeleteDisseminator(DisseminatorID dissID) throws RepositorySystemError
Deletes a Disseminator from the DigitalObject's registry and from persistent storage. Removes entries from the DigitalObject's DisseminatorShadowTable, and removes all manifestations of the Disseminator in persistent storage.

Parameters:
dissID - a signatureID (a URN) and a disseminator name
Overrides:
DeleteDisseminator in class _DigitalObjectSkeleton
 o GetDataStream
public RAP.DataStream GetDataStream(String dataStreamID) throws RepositorySystemError
Returns a single DataStream given a unique DataStream id as input.

Parameters:
dataStreamID - unique identifier for a DataStream
Returns:
a single DataStream instance
Overrides:
GetDataStream in class _DigitalObjectSkeleton
See Also:
DataStreamImpl, DataStreamShadow
 o GetDataStreams
public RAP.DataStream[] GetDataStreams() throws RepositorySystemError
Returns all of the DataStreams in the DigitalObject. In this implementation of FEDORA, a list of DataStreams is maintained in the DataStreamShadowTable (a private hashtable variable of the DigitalObject). The GetDataStreams method uses this table to obtain DataStreamShadow objects. Each shadow object has a method to load the full DataStream object from persistent storage.

Returns:
an array of DataStream instances
Overrides:
GetDataStreams in class _DigitalObjectSkeleton
See Also:
DataStreamImpl, DataStreamShadow
 o GetDigitalObjectID
public java.lang.String GetDigitalObjectID() throws RepositorySystemError
Returns the unique identifier (a URN) for the DigitalObject.

Returns:
the URN of the DigitalObject
Overrides:
GetDigitalObjectID in class _DigitalObjectSkeleton
 o GetDissemination
public RAP._ResultHolder[] GetDissemination(DisseminatorID dissID,
                                            MethodRequest request) throws RepositorySystemError
Produce a dissemination of the DigitalObject. To run a dissemination, we must address a particular Disseminator and send it a request. Disseminators are identified by the DisseminatorID which contains the signatureID and a logical disseminatorName. A request names a particular method from the Disseminator Type (Signature). The request also has values for any method parameters.

The way a dissemination is actually produced is as follows. First we must use the DisseminatorID to find the instance of the right Disseminator. Once we have isolated the Disseminator, we then must determine the kind of Disseminator we are dealing with. If it is a StandardDisseminator we grab the servletID (a URN) and get an instance of the DigitalObject that will disseminate the servlet we need. The servlet is then disseminated from that DigitalObject. Once we have an instance of the servlet we can then send it the dissemination request. The servlet runs locally and processes the request. When the servlet sends the result, the GetDissemination method packages the result in an array of RAP.MethodResults and returns it.

NOTE! Most forms of "content" are disseminated using servlets. But, servlets and signatures are, themselves, forms of content. As such they can be disseminated from DigitalObjects. FEDORA produces disseminations of servlets and signatures differently than other forms of content -- FEDORA uses its own mechanisms to produce these disseminations. The implementations of ServletDisseminator and SignatureDisseminator do the work so there is no external servlet involved. Disseminating servlets and signatures from DigitalObjects is part of the native functionality of FEDORA.

Parameters:
dissID - identifier of Disseminator. The identifier contains a signatureID of the Disseminator Type and a disseminatorName which further describes the Disseminator
request - a dissemination method request, that includes a methods name and one or more parameters for the method.
Returns:
a dissemination which is an array of typed byte streams
Overrides:
GetDissemination in class _DigitalObjectSkeleton
See Also:
StandardDisseminator, SignatureDisseminator, ServletDisseminator
 o GetDisseminator
public RAP.Disseminator GetDisseminator(DisseminatorID dissID) throws RepositorySystemError
Returns a single Disseminator given a unique DisseminatorID as input.

Parameters:
dissID - a signatureID and a disseminatorName
Returns:
a single Disseminator instance
Overrides:
GetDisseminator in class _DigitalObjectSkeleton
 o GetDisseminatorTypeMethods
public RAP.MethodSignature[] GetDisseminatorTypeMethods(String signatureID) throws RepositorySystemError
Returns the Signature (set of methods) that are defined for a DisseminatorType.

Parameters:
signatureID - the identifier (URN or constant) of a Disseminator Type
Returns:
an array of Disseminator instances
Overrides:
GetDisseminatorTypeMethods in class _DigitalObjectSkeleton
 o GetDisseminators
public RAP.Disseminator[] GetDisseminators() throws RepositorySystemError
Returns the Disseminators associated with the DigitalObject. The Disseminators can be one of three types: a StandardDisseminator, a SignatureDisseminator, or a ServletDisseminator. The Disseminator is a union object that can be any one of these. The RAP-defined DisseminatorKind enumeration lists the three types, and can be used to discriminate the union to figure out what kind we are dealing with once we have an instance of a Disseminator.

Returns:
an array of Disseminator instances
Overrides:
GetDisseminators in class _DigitalObjectSkeleton
See Also:
CreateDisseminator(RAP.DisseminatorID, String, RAP.DisseminatorKind)
 o GetKeyMetadata
public RAP.DOKeyMetadata GetKeyMetadata() throws RepositorySystemError
Returns the set of administrative attributes for the DigitalObject.

Returns:
a structure containing administrative attributes
Overrides:
GetKeyMetadata in class _DigitalObjectSkeleton
 o ListDataStreamIDs
public java.lang.String[] ListDataStreamIDs() throws RepositorySystemError
Returns the unique identifiers (system assigned IDs) for all of the DataStreams in the DigitalObject.

Returns:
an array of DataStream identifiers
Overrides:
ListDataStreamIDs in class _DigitalObjectSkeleton
See Also:
DataStreamImpl, DataStreamShadow
 o ListDisseminatorIDs
public RAP.DisseminatorID[] ListDisseminatorIDs() throws RepositorySystemError
Lists the identifiers (DisseminatorIDs) of the Disseminators associated with the DigitalObject. A DisseminatorID is a structure that contains two member attributes: a SignatureID and a disseminatorName. The SignatureID defines the Disseminator Type. It is either the URN of the DigitalObject that disseminates the Signature for the type, or it is a RAP-defined constant that indicates that one of the FEDORA utility Disseminators (ServletDisseminator or SignatureDisseminator) is associated with the DigitalObject. The disseminatorName is a logical name used to further describe the Disseminator.

Returns:
a structure containing signatureID + disseminatorName
Overrides:
ListDisseminatorIDs in class _DigitalObjectSkeleton
 o ListDisseminatorTypes
public java.lang.String[] ListDisseminatorTypes() throws RepositorySystemError
Lists the SignatureIDs for the Disseminator Types associated with the DigitalObject. The SignatureIDs will typically be URNs representing community-developed Disseminator Types. However, if the DigitalObject happens to store a Signature or Servlet, the method ListDisseminatorTypes will return a pre-determined value defined in the RAP IDL constant DISSEMINATOR_ID_SIGNATAURE_ID. This indicates that the DigitalObject can disseminate a Signature or a Servlet by means of an associated SignatureDisseminator or ServletDisseminator. This is special behavior associated with some DigitalObjects, and this RAP-defined constant is part of a bootstrap mechanisms to deal with it.

Returns:
a list of SignatureIDs (URNs or utility constants)
Overrides:
ListDisseminatorTypes in class _DigitalObjectSkeleton
 o attachedToDisseminators
protected RAP.Disseminator[] attachedToDisseminators(String datastreamID) throws RepositorySystemError
Check and see if the datastream associated with the passed ID is associated with any disseminators for this digital object.

Parameters:
datastreamID - the datastreamID of the data stream we're checking
Returns:
an array containing the disseminators to which this datastream is attached or an empty array if none.
 o invokeMethodRequest
protected java.lang.Object invokeMethodRequest(Object target_object,
                                               MethodRequest request)

All Packages  Class Hierarchy  This Package  Previous  Next  Index