public class BasicDigitalObject extends Object implements DigitalObject
| Constructor and Description |
|---|
BasicDigitalObject() |
| 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 id)
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.
|
public boolean isNew()
isNew in interface DigitalObjectpublic void setNew(boolean isNew)
setNew in interface DigitalObjectpublic String getPid()
DigitalObjectgetPid in interface DigitalObjectpublic void setPid(String pid)
DigitalObjectsetPid in interface DigitalObjectpid - The pid.public String getState()
DigitalObjectgetState in interface DigitalObjectpublic void setState(String state)
DigitalObjectsetState in interface DigitalObjectstate - The state.public String getOwnerId()
DigitalObjectgetOwnerId in interface DigitalObjectpublic void setOwnerId(String owner)
DigitalObjectsetOwnerId in interface DigitalObjectpublic String getLabel()
DigitalObjectgetLabel in interface DigitalObjectpublic void setLabel(String label)
DigitalObjectsetLabel in interface DigitalObjectlabel - The label.public Date getCreateDate()
DigitalObjectgetCreateDate in interface DigitalObjectpublic void setCreateDate(Date createDate)
DigitalObjectsetCreateDate in interface DigitalObjectcreateDate - The date.public Date getLastModDate()
DigitalObjectgetLastModDate in interface DigitalObjectpublic void setLastModDate(Date lastModDate)
DigitalObjectsetLastModDate in interface DigitalObjectlastModDate - The date.public List<AuditRecord> getAuditRecords()
DigitalObjectgetAuditRecords in interface DigitalObjectpublic Iterator<String> datastreamIdIterator()
DigitalObjectThe Iterator is not tied to the underlying Collection and cannot be used to remove datastreams.
datastreamIdIterator in interface DigitalObjectpublic Iterable<Datastream> datastreams(String id)
DigitalObject
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
DigitalObject.removeDatastreamVersion(Datastream)
datastreams in interface DigitalObjectid - The datastream id.public void removeDatastreamVersion(Datastream ds)
DigitalObjectremoveDatastreamVersion in interface DigitalObjectds - Datastream to remove.public void addDatastreamVersion(Datastream ds, boolean addNewVersion)
DigitalObjectaddDatastreamVersion in interface DigitalObjectds - The datastream to add.addNewVersion - Controls whether to add a new version, or replace existing
version.@Deprecated public Iterator<String> disseminatorIdIterator()
DigitalObjectThe Iterator is not tied to the underlying Collection and cannot be used to remove datastreams.
disseminatorIdIterator in interface DigitalObject@Deprecated public List<Disseminator> disseminators(String id)
DigitalObjectdisseminators in interface DigitalObjectid - The disseminator id.public String newDatastreamID()
DigitalObjectnewDatastreamID in interface DigitalObjectpublic String newDatastreamID(String id)
DigitalObjectnewDatastreamID in interface DigitalObjectpublic String newAuditRecordID()
DigitalObjectnewAuditRecordID in interface DigitalObjectpublic void setExtProperty(String propName, String propValue)
setExtProperty in interface DigitalObjectpropName - The extende property name, either a string, or URI as string.public String getExtProperty(String propName)
getExtProperty in interface DigitalObjectpublic Map<String,String> getExtProperties()
getExtProperties in interface DigitalObjectpublic boolean hasRelationship(org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object)
DigitalObjectReturns 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.
hasRelationship in interface DigitalObjectpredicate - Predicate of the relationship, or null if unspecified (will match
any).object - Object (target) of the relationship, or null if unspecified (will
match any).public boolean hasRelationship(org.jrdf.graph.SubjectNode subject,
org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object)
DigitalObjectReturns 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.
hasRelationship in interface DigitalObjectsubject - 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).public Set<RelationshipTuple> getRelationships(org.jrdf.graph.PredicateNode predicate, org.jrdf.graph.ObjectNode object)
DigitalObjectReturns 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.
getRelationships in interface DigitalObjectpredicate - Predicate of the relationship, or null if unspecified (will match
any).object - Object (target) of the relationship, or null if unspecified (will
match any).public Set<RelationshipTuple> getRelationships()
DigitalObjectReturns 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.
getRelationships in interface DigitalObjectpublic Set<RelationshipTuple> getRelationships(org.jrdf.graph.SubjectNode subject, org.jrdf.graph.PredicateNode predicate, org.jrdf.graph.ObjectNode object)
DigitalObjectReturns 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.
getRelationships in interface DigitalObjectsubject - 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).public List<String> getContentModels()
DigitalObjectgetContentModels in interface DigitalObjectpublic boolean hasContentModel(org.jrdf.graph.ObjectNode contentModel)
DigitalObjecthasContentModel in interface DigitalObjectcontentModel - The object node of the content modelCopyright © 2013 DuraSpace. All Rights Reserved.