fedora.server.storage.types
Interface DigitalObject

All Known Implementing Classes:
BasicDigitalObject

public interface DigitalObject

Title: DigitalObject.java

Description: A holder of Fedora digital object information.

A DigitalObject instance may be used by DOReader and DOWriter instances as temporary storage for an object's attributes and components.

Implementations of this interface are responsible for temporary storage of these items, by whatever mechanism they deem fit. The most obvious implementation would simply store everything in memory.

Implementations of this interface are not responsible for any sort of validation on these items, or serialization/deserialization to/from specific formats.

Version:
$Id: DigitalObject.java 5340 2006-12-06 21:28:36Z payette $
Author:
cwilper@cs.cornell.edu

Field Summary
static int FEDORA_BDEF_OBJECT
           
static int FEDORA_BMECH_OBJECT
           
static int FEDORA_OBJECT
           
 
Method Summary
 void addDatastreamVersion(Datastream ds, boolean addNewVersion)
          Adds a datastream to a digital object, respecting the versionable flag of that datastream.
 java.util.Iterator datastreamIdIterator()
          Gets an Iterator over the datastream ids in this object.
 java.util.List datastreams(java.lang.String id)
          Gets a mutable List of that consists of versions of the same datastream that is identified by the requested datastream identifier.
 java.util.Iterator disseminatorIdIterator()
          Gets an Iterator over the disseminator ids in this object.
 java.util.List disseminators(java.lang.String id)
          Gets a mutable List that consists of versions of the same disseminator which is identified by the requested disseminator identifier.
 java.util.List getAuditRecords()
          Gets this object's mutable List of AuditRecord objects.
 java.lang.String getContentModelId()
          Gets the content model id.
 java.util.Date getCreateDate()
          Gets the date the object was created.
 java.util.Map getExtProperties()
          Gets a Map containing all of the extended properties on the object.
 java.lang.String getExtProperty(java.lang.String propName)
          Gets an extended property value, given the property name.
 int getFedoraObjectType()
           
 java.lang.String getLabel()
          Gets the label.
 java.util.Date getLastModDate()
          Gets the date the object was last modified.
 java.util.Map getNamespaceMapping()
          Gets the preferred namespace uri-to-prefix map for XML renditions of this object.
 java.lang.String getOwnerId()
          Gets the userid of the user who owns the object.
 java.lang.String getPid()
          Gets the pid.
 java.lang.String getState()
          Gets the state.
 boolean isNew()
           
 java.lang.String newAuditRecordID()
          Generate a unique id for an audit record.
 java.lang.String newDatastreamBindingMapID()
          Generate a unique id for a datastreamBindingMap.
 java.lang.String newDatastreamID()
          Generate a unique id for a datastream.
 java.lang.String newDatastreamID(java.lang.String dsID)
          Generate a unique id for a datastream version.
 java.lang.String newDisseminatorID()
          Generate a unique id for a disseminator.
 java.lang.String newDisseminatorID(java.lang.String dissID)
          Generate a unique id for a disseminator version.
 void setContentModelId(java.lang.String id)
          Sets the content model id.
 void setCreateDate(java.util.Date createDate)
          Sets the date the object was created.
 void setExtProperty(java.lang.String propName, java.lang.String propValue)
          Sets an extended property on the object.
 void setFedoraObjectType(int t)
           
 void setLabel(java.lang.String label)
          Sets the label.
 void setLastModDate(java.util.Date lastModDate)
          Sets the date the object was last modified.
 void setNamespaceMapping(java.util.Map mapping)
          Sets the preferred namespace uri-to-prefix map for XML renditions of this object.
 void setNew(boolean isNew)
           
 void setOwnerId(java.lang.String owner)
          Sets the owner of the object.
 void setPid(java.lang.String pid)
          Sets the pid.
 void setState(java.lang.String state)
          Sets the state.
 

Field Detail

FEDORA_OBJECT

static final int FEDORA_OBJECT
See Also:
Constant Field Values

FEDORA_BDEF_OBJECT

static final int FEDORA_BDEF_OBJECT
See Also:
Constant Field Values

FEDORA_BMECH_OBJECT

static final int FEDORA_BMECH_OBJECT
See Also:
Constant Field Values
Method Detail

getFedoraObjectType

int getFedoraObjectType()

setFedoraObjectType

void setFedoraObjectType(int t)

isNew

boolean isNew()

setNew

void setNew(boolean isNew)

getPid

java.lang.String getPid()
Gets the pid.

Returns:
The pid, or null if it hasn't been set.

setPid

void setPid(java.lang.String pid)
Sets the pid.

Parameters:
pid - The pid.

getState

java.lang.String getState()
Gets the state.

Returns:
The state, or null if it hasn't been set.

setState

void setState(java.lang.String state)
Sets the state.

Parameters:
state - The state.

getOwnerId

java.lang.String getOwnerId()
Gets the userid of the user who owns the object.

Returns:
The userid

setOwnerId

void setOwnerId(java.lang.String owner)
Sets the owner of the object.

Parameters:
user - The userid.

getLabel

java.lang.String getLabel()
Gets the label.

Returns:
The label, or null if it hasn't been set.

setLabel

void setLabel(java.lang.String label)
Sets the label.

Parameters:
label - The label.

getContentModelId

java.lang.String getContentModelId()
Gets the content model id.

Returns:
The content model id.

setContentModelId

void setContentModelId(java.lang.String id)
Sets the content model id.

Parameters:
id - The content model id.

getCreateDate

java.util.Date getCreateDate()
Gets the date the object was created.

Returns:
The date, or null if it hasn't been set.

setCreateDate

void setCreateDate(java.util.Date createDate)
Sets the date the object was created.

Parameters:
createDate - The date.

getLastModDate

java.util.Date getLastModDate()
Gets the date the object was last modified.

Returns:
The date, or null if it hasn't been set.

setLastModDate

void setLastModDate(java.util.Date lastModDate)
Sets the date the object was last modified.

Parameters:
lastModDate - The date.

setNamespaceMapping

void setNamespaceMapping(java.util.Map mapping)
Sets the preferred namespace uri-to-prefix map for XML renditions of this object.

Parameters:
mapping - The uri-to-prefix mapping.

getNamespaceMapping

java.util.Map getNamespaceMapping()
Gets the preferred namespace uri-to-prefix map for XML renditions of this object.

Returns:
The uri-to-prefix mapping.

getAuditRecords

java.util.List getAuditRecords()
Gets this object's mutable List of AuditRecord objects.

Returns:
The List of AuditRecords, possibly of zero size but never null.

datastreamIdIterator

java.util.Iterator datastreamIdIterator()
Gets an Iterator over the datastream ids in this object.

The Iterator is not tied to the underlying Collection and cannot be used to remove datastreams.

Returns:
A new Iterator of datastream ids, possibly of zero size but never null.

datastreams

java.util.List datastreams(java.lang.String id)
Gets a mutable List of that consists of versions of the same datastream that is identified by the requested datastream identifier.

Parameters:
id - The datastream id.
Returns:
The list, possibly of zero size but never null.

addDatastreamVersion

void addDatastreamVersion(Datastream ds,
                          boolean addNewVersion)
Adds a datastream to a digital object, respecting the versionable flag of that datastream. Appending a new version of the datastream if the datastream is marked as versionable or replacing the existing version(s) of the datastream is it is marked as non-versionable identifier.

Parameters:
ds - The datastream to add.
addNewVersion - Controls whether to add a new version, or replace existing version.

disseminatorIdIterator

java.util.Iterator disseminatorIdIterator()
Gets an Iterator over the disseminator ids in this object.

The Iterator is not tied to the underlying Collection and cannot be used to remove datastreams.

Returns:
A new Iterator of disseminator ids, possibly of zero size but never null.

disseminators

java.util.List disseminators(java.lang.String id)
Gets a mutable List that consists of versions of the same disseminator which is identified by the requested disseminator identifier.

Parameters:
id - The disseminator id.
Returns:
The list, possibly of zero size but never null.

newDatastreamID

java.lang.String newDatastreamID()
Generate a unique id for a datastream.


newDatastreamID

java.lang.String newDatastreamID(java.lang.String dsID)
Generate a unique id for a datastream version.


newDisseminatorID

java.lang.String newDisseminatorID()
Generate a unique id for a disseminator.


newDisseminatorID

java.lang.String newDisseminatorID(java.lang.String dissID)
Generate a unique id for a disseminator version.


newDatastreamBindingMapID

java.lang.String newDatastreamBindingMapID()
Generate a unique id for a datastreamBindingMap.


newAuditRecordID

java.lang.String newAuditRecordID()
Generate a unique id for an audit record.


setExtProperty

void setExtProperty(java.lang.String propName,
                    java.lang.String propValue)
Sets an extended property on the object.

Parameters:
propName - The property name, either a string, or URI as string.

getExtProperty

java.lang.String getExtProperty(java.lang.String propName)
Gets an extended property value, given the property name.

Returns:
The property value.

getExtProperties

java.util.Map getExtProperties()
Gets a Map containing all of the extended properties on the object. Map key is property name.

Returns:
The property Map.