|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.server.storage.SimpleDOReader
org.fcrepo.server.storage.SimpleDOWriter
public class SimpleDOWriter
A DigitalObject-backed DOWriter.
This interface supports transaction behavior with the commit(String) and rollBack() methods. When a DOWriter is instantiated, there is an implicit transaction. Write methods may be called, but they won't affect the the underlying data store until commit(String) is invoked. This also has the effect of creating another implicit transaction. If temporary changes are no longer wanted, rollBack() may be called to return the object to it's original form. rollBack() is only valid for the current transaction.
The read methods of DOWriter reflect on the composition of the object in the context of the current transaction.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.fcrepo.common.Constants |
|---|
Constants.FedoraHome |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
SimpleDOWriter(Context context,
DefaultDOManager mgr,
DOTranslator translator,
String exportFormat,
String encoding,
DigitalObject obj)
|
|
| Method Summary | |
|---|---|
void |
addDatastream(Datastream datastream,
boolean addNewVersion)
Adds a datastream to the object. |
boolean |
addRelationship(String subject,
String relationship,
String object,
boolean isLiteral,
String datatype)
Adds a RDF triple to a reserved datastream (based on the subject) |
boolean |
addRelationship(String dsId,
String subject,
String relationship,
String object,
boolean isLiteral,
String datatype)
Adds a RDF triple to the specified (RDF) datastream |
void |
commit(String logMessage)
Saves the changes thus far to the permanent copy of the digital object. |
void |
invalidate()
Marks this DOWriter handle invalid (unusable). |
boolean |
isCommitted()
Marks whether the object has been successfully committed. |
boolean |
isNew()
Marks whether the object is new. |
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. |
boolean |
purgeRelationship(String subject,
String relationship,
String object,
boolean isLiteral,
String datatype)
Purges a RDF triple from a reserved datastream (based on the subject) |
boolean |
purgeRelationship(String dsId,
String subject,
String relationship,
String object,
boolean isLiteral,
String datatype)
Purges a RDF triple from the specified (RDF) datastream |
void |
remove()
Removes the entire digital object. |
Date[] |
removeDatastream(String id,
Date start,
Date end)
Removes a datastream from the object. |
void |
setDatastreamState(String datastreamID,
String dsState)
Sets the state for all versions of the specified datastream. |
void |
setDatastreamVersionable(String datastreamID,
boolean versionable)
Sets the indicator as to whether the datastream is subject to versioning. |
void |
setLabel(String label)
Sets the label of the digital object. |
void |
setOwnerId(String ownerId)
Sets the ownerId for the digital object. |
void |
setState(String state)
Sets the state of the entire digital object. |
| Methods inherited from class org.fcrepo.server.storage.SimpleDOReader |
|---|
Export, ExportObject, getAuditRecords, getContentModels, getCreateDate, GetDatastream, getDatastream, GetDatastreams, getDatastreamVersions, getLastModDate, getObject, getObjectHistory, GetObjectLabel, GetObjectPID, GetObjectState, GetObjectXML, getOwnerId, getRelationships, getRelationships, getRelationships, getWhenString, hasContentModel, hasRelationship, hasRelationship, ListDatastreamIDs, listMethods |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.fcrepo.server.storage.DOReader |
|---|
Export, ExportObject, getAuditRecords, getContentModels, getCreateDate, GetDatastream, getDatastream, GetDatastreams, getDatastreamVersions, getLastModDate, getObject, getObjectHistory, GetObjectLabel, GetObjectPID, GetObjectState, GetObjectXML, getOwnerId, getRelationships, getRelationships, getRelationships, hasContentModel, hasRelationship, hasRelationship, ListDatastreamIDs, listMethods |
| Constructor Detail |
|---|
public SimpleDOWriter(Context context,
DefaultDOManager mgr,
DOTranslator translator,
String exportFormat,
String encoding,
DigitalObject obj)
| Method Detail |
|---|
public void setState(String state)
throws ObjectIntegrityException
DOWriter
setState in interface DOWriterstate - The state.
ObjectIntegrityException
public void setOwnerId(String ownerId)
throws ObjectIntegrityException
DOWriter
setOwnerId in interface DOWriterownerId - The ownerId.
ObjectIntegrityException
public void setDatastreamState(String datastreamID,
String dsState)
throws ServerException
DOWriter
setDatastreamState in interface DOWriterdatastreamID - The datastream id.dsState - The state.
ServerException - If any type of error occurred fulfilling the request.
public void setDatastreamVersionable(String datastreamID,
boolean versionable)
throws ServerException
DOWriter
setDatastreamVersionable in interface DOWriterdatastreamID - The datastream id.versionable - a boolean indicating if versionable
ServerException - If any type of error occurred fulfilling the request.
public void setLabel(String label)
throws ObjectIntegrityException
DOWriter
setLabel in interface DOWriterlabel - The label.
ObjectIntegrityException
public void remove()
throws ObjectIntegrityException
remove in interface DOWriterServerException - If any type of error occurred fulfilling the request.
ObjectIntegrityException
public void addDatastream(Datastream datastream,
boolean addNewVersion)
throws ServerException
addDatastream in interface DOWriterdatastream - The datastream.
ServerException - If any type of error occurred fulfilling the request.
public Date[] removeDatastream(String id,
Date start,
Date end)
throws ServerException
removeDatastream in interface DOWriterid - The id of the datastream.start - The start date (inclusive) of versions to remove. If
null, this is taken to be the smallest possible
value.end - The end date (inclusive) of versions to remove. If
null, this is taken to be the greatest possible
value.
ServerException - If any type of error occurred fulfilling the request.
public boolean addRelationship(String subject,
String relationship,
String object,
boolean isLiteral,
String datatype)
throws ServerException
DOWriter
addRelationship in interface DOWriterServerException
public boolean addRelationship(String dsId,
String subject,
String relationship,
String object,
boolean isLiteral,
String datatype)
throws ServerException
DOWriter
addRelationship in interface DOWriterServerException
public boolean purgeRelationship(String subject,
String relationship,
String object,
boolean isLiteral,
String datatype)
throws ServerException
DOWriter
purgeRelationship in interface DOWriterServerException
public boolean purgeRelationship(String dsId,
String subject,
String relationship,
String object,
boolean isLiteral,
String datatype)
throws ServerException
DOWriter
purgeRelationship in interface DOWriterServerException
public void commit(String logMessage)
throws ServerException
commit in interface DOWriterlogMessage - An explanation of the change(s).
ServerException - If any type of error occurred fulfilling the request.public void invalidate()
DOWriter
invalidate in interface DOWriterpublic String newDatastreamID()
newDatastreamID in interface DOWriterpublic String newDatastreamID(String dsID)
newDatastreamID in interface DOWriterpublic String newAuditRecordID()
newAuditRecordID in interface DOWriterpublic boolean isCommitted()
DOWriter
isCommitted in interface DOWriterpublic boolean isNew()
DOWriter
isNew in interface DOWriter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||