public class SimpleDOWriter extends SimpleDOReader implements Constants, 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.
Constants.FedoraHomeACCESS, ACTION, API, ATOM_APIM1_0, ATOM_ZIP1_1, ATOM1_1, AUDIT, AUDIT1_0, BATCH_MODIFY, BATCH_MODIFY1_1, BE_SECURITY, BE_SECURITY1_0, BINDING_SPEC, DATASTREAM, DC, DISSEMINATOR, DS_COMPOSITE_MODEL, DS_COMPOSITE_MODEL1_0, DS_INPUT_SPEC1_0, DS_INPUT_SPEC1_1, ENVIRONMENT, FCFG, FEDORA, FEDORA_APP_CONTEXT_NAME, FEDORA_DEFAULT_APP_CONTEXT, FEDORA_HOME, FEDORA_REPOSITORY_PID, FOXML, FOXML1_0, FOXML1_0_LEGACY, FOXML1_1, HTTP_REQUEST, MANAGEMENT, METHOD_MAP, METS, METS_EXT, METS_EXT1_0, METS_EXT1_0_LEGACY, METS_EXT1_1, MODEL, MULGARA, OAI_DC, OAI_DC2_0, OAI_FRIENDS, OAI_FRIENDS2_0, OAI_IDENTIFIER, OAI_IDENTIFIER2_0, OAI_PMH, OAI_PMH2_0, OAI_PROV, OAI_PROV2_0, OBJ_DATASTREAMS1_0, OBJ_HISTORY1_0, OBJ_ITEMS1_0, OBJ_METHODS1_0, OBJ_PROFILE1_0, OBJ_VALIDATION1_0, OBJECT, OLD_XLINK, PID_LIST1_0, RDF, RDF_XSD, RECOVERY, RELS_EXT, RELS_EXT1_0, RELS_INT1_0, REPO_DESC1_0, RESOURCE, SDEF, SDEF_METHOD_MAP1_0, SDEP, SDEP_METHOD_MAP1_0, SDEP_METHOD_MAP1_1, SERVICE_PROFILE, SOAP, SOAP_ENC, SUBJECT, TYPES, VIEW, WSDL, WSDL_HTTP, WSDL_MIME, XACML_POLICY, XACML_POLICY1_0, XACML1, XACML1_ACTION, XACML1_POLICY, XACML1_RESOURCE, XACML1_SUBJECT, XACML2_POLICY_SCHEMA, XLINK, XML_XSD, XMLNS, XSI| Constructor and Description |
|---|
SimpleDOWriter(Context context,
DefaultDOManager mgr,
DOTranslator translator,
String exportFormat,
String encoding,
DigitalObject obj) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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, listMethodsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitExport, ExportObject, getAuditRecords, getContentModels, getCreateDate, GetDatastream, getDatastream, GetDatastreams, getDatastreamVersions, getLastModDate, getObject, getObjectHistory, GetObjectLabel, GetObjectPID, GetObjectState, GetObjectXML, getOwnerId, getRelationships, getRelationships, getRelationships, hasContentModel, hasRelationship, hasRelationship, ListDatastreamIDs, listMethodspublic SimpleDOWriter(Context context, DefaultDOManager mgr, DOTranslator translator, String exportFormat, String encoding, DigitalObject obj)
public void setState(String state) throws ObjectIntegrityException
DOWritersetState in interface DOWriterstate - The state.ObjectIntegrityExceptionpublic void setOwnerId(String ownerId) throws ObjectIntegrityException
DOWritersetOwnerId in interface DOWriterownerId - The ownerId.ObjectIntegrityExceptionpublic void setDatastreamState(String datastreamID, String dsState) throws ServerException
DOWritersetDatastreamState 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
DOWritersetDatastreamVersionable in interface DOWriterdatastreamID - The datastream id.versionable - a boolean indicating if versionableServerException - If any type of error occurred fulfilling the request.public void setLabel(String label) throws ObjectIntegrityException
DOWritersetLabel in interface DOWriterlabel - The label.ObjectIntegrityExceptionpublic void remove()
throws ObjectIntegrityException
remove in interface DOWriterServerException - If any type of error occurred fulfilling the request.ObjectIntegrityExceptionpublic 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
DOWriteraddRelationship in interface DOWriterServerExceptionpublic boolean addRelationship(String dsId, String subject, String relationship, String object, boolean isLiteral, String datatype) throws ServerException
DOWriteraddRelationship in interface DOWriterServerExceptionpublic boolean purgeRelationship(String subject, String relationship, String object, boolean isLiteral, String datatype) throws ServerException
DOWriterpurgeRelationship in interface DOWriterServerExceptionpublic boolean purgeRelationship(String dsId, String subject, String relationship, String object, boolean isLiteral, String datatype) throws ServerException
DOWriterpurgeRelationship in interface DOWriterServerExceptionpublic 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()
DOWriterinvalidate 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()
DOWriterisCommitted in interface DOWriterCopyright © 2013 DuraSpace. All Rights Reserved.