public class SimpleDOReader extends Object implements DOReader
| Modifier and Type | Field and Description |
|---|---|
protected DigitalObject |
m_obj |
| Constructor and Description |
|---|
SimpleDOReader(Context context,
RepositoryReader repoReader,
DOTranslator translator,
String exportFormat,
String encoding,
DigitalObject obj)
Alternate constructor for when a DigitalObject is already available for
some reason.
|
SimpleDOReader(Context context,
RepositoryReader repoReader,
DOTranslator translator,
String exportFormat,
String storageFormat,
String encoding,
InputStream serializedObject) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
Export(String format,
String exportContext)
Gets the content of the entire digital object as XML, with public URIs as
references to managed content datastreams under the custodianship of the
repository.
|
InputStream |
ExportObject(String format,
String exportContext)
Deprecated.
in Fedora 3.0, use Export instead
|
List<AuditRecord> |
getAuditRecords()
Gets the entire list of audit records for the object.
|
List<String> |
getContentModels()
Gets a list of the content models of the object.
|
Date |
getCreateDate()
Gets the date of creation of this object.
|
Datastream |
GetDatastream(String datastreamID,
Date versDateTime)
Gets a particular Datastream in the digital object.
|
Datastream |
getDatastream(String dsID,
String versionID)
Gets a particular datastream in the digital object.
|
Datastream[] |
GetDatastreams(Date versDateTime,
String state)
Gets all datastreams as of a certain date and in a certain state.
|
Date[] |
getDatastreamVersions(String datastreamID)
Gets the creation dates of all versions of a particular datastream, in no
particular order.
|
Date |
getLastModDate()
Gets the date of the last modification of this object.
|
DigitalObject |
getObject()
Gets the underlying digital object this reader is working with.
|
String[] |
getObjectHistory(String PID)
Gets the change history of an object by returning a list of timestamps
that correspond to modification dates of components.
|
String |
GetObjectLabel()
Gets the label of the digital object.
|
String |
GetObjectPID()
Gets the PID of the digital object.
|
String |
GetObjectState()
Gets the state of the digital object.
|
InputStream |
GetObjectXML()
Return the object as an XML input stream in the internal serialization
format.
|
String |
getOwnerId()
Gets the userid of the user who owns the objects.
|
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.
|
protected String |
getWhenString(Date versDateTime) |
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 as 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.
|
String[] |
ListDatastreamIDs(String state)
Gets a list of Datastream identifiers for all Datastreams in the digital
object.
|
ObjectMethodsDef[] |
listMethods(Date versDateTime)
Gets list of ALL method definitions that are available on a particular
digital object.
|
protected final DigitalObject m_obj
public SimpleDOReader(Context context, RepositoryReader repoReader, DOTranslator translator, String exportFormat, String storageFormat, String encoding, InputStream serializedObject) throws ObjectIntegrityException, StreamIOException, UnsupportedTranslationException, ServerException
public SimpleDOReader(Context context, RepositoryReader repoReader, DOTranslator translator, String exportFormat, String encoding, DigitalObject obj)
public DigitalObject getObject()
public Date getCreateDate()
getCreateDate in interface DOReaderpublic Date getLastModDate()
getLastModDate in interface DOReaderpublic String getOwnerId()
getOwnerId in interface DOReaderpublic List<AuditRecord> getAuditRecords()
getAuditRecords in interface DOReaderpublic InputStream GetObjectXML() throws ObjectIntegrityException, StreamIOException, UnsupportedTranslationException, ServerException
GetObjectXML in interface DOReaderServerException - If there object could not be found or there was was a failure in
accessing the object for any reason.ObjectIntegrityExceptionStreamIOExceptionUnsupportedTranslationExceptionpublic InputStream Export(String format, String exportContext) throws ObjectIntegrityException, StreamIOException, UnsupportedTranslationException, ServerException
The intent of this method is to return the digital object along with valid URI pointers for ALL its datastreams.
Export in interface DOReaderformat - The format to export the object in. If null or "default", will use
the repository's configured default export format.exportContext - The use case for export (public, migrate, archive) which results
in different ways of representing datastream URLs or datastream
content in the output.ServerException - If there object could not be found or there was was a failure in
accessing the object for any reason.ObjectIntegrityExceptionStreamIOExceptionUnsupportedTranslationExceptionDOTranslationUtility.SERIALIZE_EXPORT_PUBLIC,
DOTranslationUtility.SERIALIZE_EXPORT_MIGRATE,
DOTranslationUtility.SERIALIZE_EXPORT_ARCHIVE@Deprecated public InputStream ExportObject(String format, String exportContext) throws ObjectIntegrityException, StreamIOException, UnsupportedTranslationException, ServerException
ExportObject in interface DOReaderObjectIntegrityExceptionStreamIOExceptionUnsupportedTranslationExceptionServerExceptionpublic String GetObjectPID()
GetObjectPID in interface DOReaderpublic String GetObjectLabel()
GetObjectLabel in interface DOReaderpublic String GetObjectState()
GetObjectState in interface DOReaderpublic List<String> getContentModels() throws ServerException
DOReadergetContentModels in interface DOReaderServerException - If any type of error occurred fulfilling the request.public boolean hasContentModel(org.jrdf.graph.ObjectNode contentModel)
throws ServerException
DOReaderhasContentModel in interface DOReadercontentModel - The object node of the content modelServerExceptionpublic String[] ListDatastreamIDs(String state)
ListDatastreamIDs in interface DOReaderstate - The state of the Datastreams to be listed.public Datastream getDatastream(String dsID, String versionID)
getDatastream in interface DOReaderdsID - The datastream identifierversionID - The identifier of the particular versionpublic Datastream GetDatastream(String datastreamID, Date versDateTime)
GetDatastream in interface DOReaderdatastreamID - The Datastream identifierversDateTime - The date-time stamp to get appropriate Datastream versionpublic Date[] getDatastreamVersions(String datastreamID)
getDatastreamVersions in interface DOReaderdatastreamID - The datastream identifierpublic Datastream[] GetDatastreams(Date versDateTime, String state)
GetDatastreams in interface DOReaderversDateTime - The date-time stamp to get appropriate Datastream versionsstate - The state, null for any.public String[] getObjectHistory(String PID)
getObjectHistory in interface DOReaderPID - The persistent identifier of the digitla object.public ObjectMethodsDef[] listMethods(Date versDateTime) throws ServerException
listMethods in interface DOReaderversDateTime - The date-time stamp to get appropriate version. If this is given
as null, the most recent version is used.ServerException - If any type of error occurred fulfilling the request.public boolean hasRelationship(org.jrdf.graph.SubjectNode subject,
org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object)
hasRelationship in interface DOReadersubject - 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 boolean hasRelationship(org.jrdf.graph.PredicateNode predicate,
org.jrdf.graph.ObjectNode object)
hasRelationship in interface DOReaderpredicate - 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.SubjectNode subject, org.jrdf.graph.PredicateNode predicate, org.jrdf.graph.ObjectNode object)
getRelationships in interface DOReadersubject - 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)
getRelationships in interface DOReaderpredicate - 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()
getRelationships in interface DOReaderCopyright © 2013 DuraSpace. All Rights Reserved.