public interface DigitalObject
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.
| Modifier and Type | Method and Description |
|---|---|
void |
addDatastreamVersion(Datastream ds,
boolean addNewVersion)
Adds a datastream to a digital object, respecting the versionable flag of
that datastream.
|
Iterator<String> |
datastreamIdIterator()
Gets an Iterator over the datastream ids in this object.
|
Iterable<Datastream> |
datastreams(String id)
Gets an interable view that consists of versions of the same datastream
that is identified by the requested datastream identifier.
|
Iterator<String> |
disseminatorIdIterator()
Deprecated.
|
List<Disseminator> |
disseminators(String id)
Deprecated.
|
List<AuditRecord> |
getAuditRecords()
Gets this object's mutable List of AuditRecord objects.
|
List<String> |
getContentModels()
Gets a list of the content models of the object.
|
Date |
getCreateDate()
Gets the date the object was created.
|
Map<String,String> |
getExtProperties()
Gets a Map containing all of the extended properties on the object.
|
String |
getExtProperty(String propName)
Gets an extended property value, given the property name.
|
String |
getLabel()
Gets the label.
|
Date |
getLastModDate()
Gets the date the object was last modified.
|
String |
getOwnerId()
Gets the userid of the user who owns the object.
|
String |
getPid()
Gets the pid.
|
Set<RelationshipTuple> |
getRelationships()
Get all RELS-EXT and RELS-INT relationships in the object.
|
Set<RelationshipTuple> |
getRelationships(org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object)
Get all matching RELS-EXT relationships in the object, assumes pid is the subject
|
Set<RelationshipTuple> |
getRelationships(org.jrdf.graph.SubjectNode subject,
org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object)
Get all matching RELS-EXT and RELS-INT relationships in the object.
|
String |
getState()
Gets the state.
|
boolean |
hasContentModel(org.jrdf.graph.ObjectNode contentModel)
Determins whether or not the object have the given uri as a content model.
|
boolean |
hasRelationship(org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object)
Determine if the object contains the given relationship, assumes pid is the subject
|
boolean |
hasRelationship(org.jrdf.graph.SubjectNode subject,
org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object)
Determine if the object contains the given relationship.
|
boolean |
isNew() |
String |
newAuditRecordID()
Generate a unique id for an audit record.
|
String |
newDatastreamID()
Generate a unique id for a datastream.
|
String |
newDatastreamID(String dsID)
Generate a unique id for a datastream version.
|
void |
removeDatastreamVersion(Datastream ds)
Removes a datastream from a digital object.
|
void |
setCreateDate(Date createDate)
Sets the date the object was created.
|
void |
setExtProperty(String propName,
String propValue)
Sets an extended property on the object.
|
void |
setLabel(String label)
Sets the label.
|
void |
setLastModDate(Date lastModDate)
Sets the date the object was last modified.
|
void |
setNew(boolean isNew) |
void |
setOwnerId(String owner)
Sets the owner of the object.
|
void |
setPid(String pid)
Sets the pid.
|
void |
setState(String state)
Sets the state.
|
boolean isNew()
void setNew(boolean isNew)
String getPid()
void setPid(String pid)
pid - The pid.String getState()
void setState(String state)
state - The state.String getOwnerId()
void setOwnerId(String owner)
user - The userid.String getLabel()
void setLabel(String label)
label - The label.Date getCreateDate()
void setCreateDate(Date createDate)
createDate - The date.Date getLastModDate()
void setLastModDate(Date lastModDate)
lastModDate - The date.List<AuditRecord> getAuditRecords()
Iterator<String> datastreamIdIterator()
The Iterator is not tied to the underlying Collection and cannot be used to remove datastreams.
Iterable<Datastream> datastreams(String id)
Datastreams within any iterators produced here are references to the
actual datastreams in this DigitalObject, so modifying their contents is
a persistent change. However, remove() is disabled, so to remove a
datastream from the object, use
removeDatastreamVersion(Datastream)
id - The datastream id.void addDatastreamVersion(Datastream ds, boolean addNewVersion)
ds - The datastream to add.addNewVersion - Controls whether to add a new version, or replace existing
version.void removeDatastreamVersion(Datastream ds)
ds - Datastream to remove.@Deprecated Iterator<String> disseminatorIdIterator()
The Iterator is not tied to the underlying Collection and cannot be used to remove datastreams.
@Deprecated List<Disseminator> disseminators(String id)
id - The disseminator id.String newDatastreamID()
String newAuditRecordID()
void setExtProperty(String propName, String propValue)
propName - The property name, either a string, or URI as string.String getExtProperty(String propName)
Map<String,String> getExtProperties()
boolean hasRelationship(org.jrdf.graph.SubjectNode subject,
org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object)
Returns results that are accurate for the current state of the object at the time of invocation. Thus, if there is some change to the object that changes the set of relationships contained within, the next call to hasRelationship will reflect those changes.
subject - Subject of the relationship, or null if unspecified (will match
any).predicate - Predicate of the relationship, or null if unspecified (will match
any).object - Object (target) of the relationship, or null if unspecified (will
match any).boolean hasRelationship(org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object)
Returns results that are accurate for the current state of the object at the time of invocation. Thus, if there is some change to the object that changes the set of relationships contained within, the next call to hasRelationship will reflect those changes.
predicate - Predicate of the relationship, or null if unspecified (will match
any).object - Object (target) of the relationship, or null if unspecified (will
match any).Set<RelationshipTuple> getRelationships()
Returns results that are accurate for the current state of the object at the time of invocation. Thus, if there is some change to the object that changes the set of relationships contained within, the next call to getRelationships will reflect those changes.
Set<RelationshipTuple> getRelationships(org.jrdf.graph.SubjectNode subject, org.jrdf.graph.PredicateNode predicate, org.jrdf.graph.ObjectNode object)
Returns results that are accurate for the current state of the object at the time of invocation. Thus, if there is some change to the object that changes the set of relationships contained within, the next call to getRelationships will reflect those changes.
subject - Subject of the relationship, or null if unspecified (will match
any).predicate - Predicate of the relationship, or null if unspecified (will match
any).object - Object (target) of the relationship, or null if unspecified (will
match any).Set<RelationshipTuple> getRelationships(org.jrdf.graph.PredicateNode predicate, org.jrdf.graph.ObjectNode object)
Returns results that are accurate for the current state of the object at the time of invocation. Thus, if there is some change to the object that changes the set of relationships contained within, the next call to getRelationships will reflect those changes.
predicate - Predicate of the relationship, or null if unspecified (will match
any).object - Object (target) of the relationship, or null if unspecified (will
match any).List<String> getContentModels()
boolean hasContentModel(org.jrdf.graph.ObjectNode contentModel)
contentModel - The object node of the content modelCopyright © 2013 DuraSpace. All Rights Reserved.