Differences between revisions 7 and 8
Revision 7 as of 2008-10-16 16:31:42
Size: 13880
Editor: abr
Comment:
Revision 8 as of 2008-10-16 16:35:04
Size: 13958
Editor: abr
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:

[[Anchor(anchor_addDatastream)]]
== addDatastream ==
== Datastream managment ==

[[Anchor(addDatastream)]]
=== addDatastream ===
Line 36: Line 37:
== getDatastream == === getDatastream ===
Line 67: Line 68:
== getDatastreams == === getDatastreams ===
Line 85: Line 86:
== modifyDatastreamByReference == === modifyDatastreamByReference ===
Line 110: Line 111:
== modifyDatastreamByValue == === modifyDatastreamByValue ===
Line 136: Line 137:
== setDatastreamState == === setDatastreamState ===
Line 154: Line 155:

[[Anchor(compareDatastreamChecksum)]]
=== compareDatastreamChecksum ===
Verifies that the Datastream content has not changed since the checksum was initially computed.

Input parameters:
 * {{{String pid}}} The PID of the object.
 * {{{String dsID}}} The datastream ID.
 * {{{String versionDate}}} A dateTime indicating the version of the datastream to verify. If null, Fedora will use the most recent version.

Returns:
 * {{{String}}} The checksum if there is no difference, a message indicating checksum failure otherwise.

Throws:
 * {{{java.rmi.RemoteException}}}

=== (getDatastreamHistory)? ===


== Relationship managment ==
Line 159: Line 177:
== addRelationship == === addRelationship ===
Line 180: Line 198:
== getRelationships == === getRelationships ===
Line 201: Line 219:
== purgeRelationship == === purgeRelationship ===
Line 225: Line 243:



[[Anchor(anchor_compareDatastreamChecksum)]]
== compareDatastreamChecksum ==
Verifies that the Datastream content has not changed since the checksum was initially computed.

Input parameters:
 * {{{String pid}}} The PID of the object.
 * {{{String dsID}}} The datastream ID.
 * {{{String versionDate}}} A dateTime indicating the version of the datastream to verify. If null, Fedora will use the most recent version.

Returns:
 * {{{String}}} The checksum if there is no difference, a message indicating checksum failure otherwise.

Throws:
 * {{{java.rmi.RemoteException}}}

[[Anchor(anchor_ingest)]]
== ingest ==
== Object Managment ==

[[Anchor(ingest)]]
=== ingest ===
Line 260: Line 262:
[[Anchor(anchor_modifyObject)]]
== modifyObject ==
[[Anchor(modifyObject)]]
=== modifyObject ===
Line 281: Line 283:
== (getDatastreamHistory)? ==

API-M (Fedora Management service API)

TableOfContents

Datastream managment

Anchor(addDatastream)

addDatastream

Creates a new Datastream in the object.

If, after the call to this method, the object in question would have state "published" in its STATE datastream, then this method will perform validation of the object. In case of a failed validation, an exception will be thrown.

Input parameters:

  • String pid The PID of the object.

  • String dsID The datastream ID (64 characters max). If null, Fedora will generate the value.

  • String[] altIDs Alternate identifiers for the datastream.

  • String dsLabel The label for the datastream.

  • boolean versionable Enable versioning of the datastream. This should be on for DOMS GUI usages.

  • String MIMEType The mime-type of the datastream.

  • String formatURI The format URI of the datastream.

  • String dsLocation Location of managed, redirect, or external referenced datastream content.

  • String controlGroup One of "X", "M", "R", or "E" (Inline XML, Managed Content, Redirect, or External Referenced). For DOMS GUI, use Inline XML or External Referenced.

  • String dsState One of "A", "D", or "I" (Active, Deleted, or Inactive). Only Active and Deleted are used in DOMS. Inactive objects are not used in DOMS, see FedoraTransactionsReplacement.

  • String checksumType The algorithm used to compute the checksum. For DOMS GUI usage, may take value "DISABLED" or "MD5".

  • String checksum The value of the checksum represented as a hexadecimal string.

  • String logMessage A log message.

Returns:

  • String The datastreamID of the newly added datastream.

Throws:

  • java.rmi.RemoteException

Anchor(getDatastream)

getDatastream

Gets the specified datastream.

Input parameters:

  • String pid The pid of the object.

  • String dsID The datastream ID.

  • String asOfDateTime The date/time stamp specifying the desired version of the object. If null, the current version of the object (the most recent time) is assumed.

Returns:

  • Datastream

    • DatastreamControlGroup controlGroup - String restricted to the values of "X", "M", "R", or "E" (Inline *X*ML, *M*anaged Content, *R*edirect, or *E*xternal Referenced).

    • String ID - The datastream ID (64 characters max).

    • String versionID - The ID of the most recent datastream version

    • String[] altIDs - Alternative IDs for the datastream, if any.

    • String label - The Label of the datastream.

    • boolean versionable - Whether the datastream is versionable.

    • String MIMEType - The mime-type for the datastream, if set.

    • String formatURI - The format uri for the datastream, if set.

    • String createDate - The date the first version of the datastream was created.

    • long size - The size of the datastream in Fedora. Not the size of any referenced contents, but only the fedora stored xml. TODO: What for Managed?

    • String state - The state of the datastream. Will be "A" (active), "I" inactive or "D" deleted.

    • String location - If the datastream is an external reference or redirect, the url to the contents. TODO: Managed?

    • String checksumType - The algorithm used to compute the checksum. One of "DEFAULT", "DISABLED", "MD5", "SHA-1", "SHA-256", "SHA-385", "SHA-512", "HAVAL", "TIGER", "WHIRLPOOL".

    • String checksum - The value of the checksum represented as a hexadecimal string.

Throws:

  • java.rmi.RemoteException

Anchor(getDatastreams)

getDatastreams

Gets all datastreams in the object

Input parameters:

  • String pid The pid of the object.

  • String asOfDateTime The date/time stamp specifying the desired version of the object. If null, the current version of the object (the most recent time) is assumed.

  • String dsState One of "A", "D", or "I" (Active, Deleted, or Inactive).

Returns:

  • Datastream[] See [#getDatastream getDatastream]

Throws:

  • java.rmi.RemoteException

Anchor(anmodifyDatastreamByReference)

modifyDatastreamByReference

If, after the call to this method, the object in question would have state "published" in its STATE datastream, then this method will perform validation of the object. In case of a failed validation, an exception will be thrown.

Input parameters:

  • String pid The PID of the object.

  • String dsID The datastream ID.

  • String[] altIDs Alternate identifiers for the datastream, if any.

  • String dsLabel The label for the datastream.

  • String MIMEType The mime type.

  • String formatURI Optional format URI of the datastream.

  • String dsLocation Location of managed, redirect, or external referenced datastream content.

  • String checksumType The algorithm used to compute the checksum. For DOMS GUI usage, may take value "DISABLED" or "MD5".

  • String checksum The value of the checksum represented as a hexadecimal string.

  • String logMessage A log message.

  • boolean force Force the update even if it would break a data contract.

Returns:

  • String The timestamp of the operation according to the server, in ISO8601 format.

Throws:

  • java.rmi.RemoteException

Anchor(modifyDatastreamByValue)

modifyDatastreamByValue

Modifies an existing Datastream in an object, by value. This operation is only valid for Inline XML Datastreams (i.e. controlGroup "X").

If, after the call to this method, the object in question would have state "published" in its STATE datastream, then this method will perform validation of the object. In case of a failed validation, an exception will be thrown.

Input parameters:

  • String pid The PID of the object.

  • String dsID The datastream ID.

  • String[] altIDs Alternate identifiers for the datastream, if any.

  • String dsLabel The label for the datastream.

  • String MIMEType The mime type.

  • String formatURI Optional format URI of the datastream.

  • byte[] dsContent The content of the datastream.

  • String checksumType The algorithm used to compute the checksum. For DOMS GUI usage, may take value "DISABLED" or "MD5".

  • String checksum The value of the checksum represented as a hexadecimal string.

  • String logMessage A log message.

  • boolean force Force the update even if it would break a data contract.

Returns:

  • String The timestamp of the operation according to the server, in ISO8601 format.

Throws:

  • java.rmi.RemoteException

Anchor(setDatastreamState)

setDatastreamState

Sets the state of a Datastream to the specified state value.

If, after the call to this method, the object in question would have state "published" in its STATE datastream, then this method will perform validation of the object. In case of a failed validation, an exception will be thrown.

Input parameters:

  • String pid The PID of the object.

  • String dsID The datastream ID.

  • String dsState One of "A", "D", or "I" (Active, Deleted, or Inactive). Only Active and Deleted are used in DOMS. Inactive objects are not used in DOMS, as an inactive object would not be in the Triple Store. We need to be able to make queries about it, so that is unacceptable. Rather, we use the special STATE datastream, see FedoraTransactionsReplacement.

  • String logMessage A log message.

Returns:

  • String The timestamp of the operation according to the server, in ISO8601 format.

Throws:

  • java.rmi.RemoteException

Anchor(compareDatastreamChecksum)

compareDatastreamChecksum

Verifies that the Datastream content has not changed since the checksum was initially computed.

Input parameters:

  • String pid The PID of the object.

  • String dsID The datastream ID.

  • String versionDate A dateTime indicating the version of the datastream to verify. If null, Fedora will use the most recent version.

Returns:

  • String The checksum if there is no difference, a message indicating checksum failure otherwise.

Throws:

  • java.rmi.RemoteException

(getDatastreamHistory)?

Relationship managment

Anchor(addRelationship)

addRelationship

Creates a new relationship in the object. Adds the specified relationship to the object's RELS-EXT Datastream. If the Resource Index is enabled, the relationship will be added to the Resource Index.

A rdf tuple consist of an object, having a predicate relating it to a subject. The subject can either be a literal value, or another object.

If, after the call to this method, the object in question would have state "published" in its STATE datastream, then this method will perform validation of the object. In case of a failed validation, an exception will be thrown.

Input parameters:

  • String pid The PID of the object.

  • String relationship The predicate.

  • String object The object.

  • boolean isLiteral A boolean value indicating whether the object is a literal.

  • String datatype The datatype of the literal. Optional.

Returns:

  • boolean True if and only if the relationship was added.

Throws:

  • java.rmi.RemoteException

Anchor(anchor_getRelationships)

getRelationships

Get the relationships asserted in the object's RELS-EXT Datastream that match the given criteria.

Input parameters:

  • String pid The PID of the object.

  • String relationship The predicate to match. A null value matches all predicates.

Returns:

  • RelationshipTuple[]

    • String subject - The subject of the relation. Either a Fedora PID or a literal value.

    • String predicate - The predicate relating the subject and the object. Includes the namespace of the relation.

    • String object - The PID of the object of the relation

    • boolean isLiteral - If true, the subject should be read as a literal value, not a PID

    • String datatype - If the subject is a literal, the datatype to parse the value as. Optional.

Throws:

  • java.rmi.RemoteException

Anchor(purgeRelationship)

purgeRelationship

Delete the specified relationship. This method will remove the specified relationship(s) from the RELS-EXT datastream. If the Resource Index is enabled, this will also delete the corresponding triples from the Resource Index.

If, after the call to this method, the object in question would have state "published" in its STATE datastream, then this method will perform validation of the object. In case of a failed validation, an exception will be thrown.

Input parameters:

  • String pid The PID of the object.

  • String relationship The predicate, null matches any predicate.

  • String object The object, null matches any object.

  • boolean isLiteral A boolean value indicating whether the object is a literal.

  • String datatype The datatype of the literal. Optional.

Returns:

  • boolean True if and only if the relationship was purged.

Throws:

  • java.rmi.RemoteException

Object Managment

Anchor(ingest)

ingest

Creates a new digital object in the repository. The object's initial state will be A (active). If the XML document does not specify the OBJID attribute of the root element, the repository will generate and return a new pid for the object resulting from this request. That pid will have the namespace of the repository. If the XML document specifies a pid, it will be assigned to the digital object provided that 1. it conforms to the Fedora pid Syntax, 2. it uses a namespace that matches the "retainPIDs" value configured for the repository, and 3. it does not collide with an existing pid of an object in the repository.

If, after the call to this method, the object in question would have state "published" in its STATE datastream, then this method will perform validation of the object. In case of a failed validation, an exception will be thrown.

Input parameters:

  • byte[] objectXML The digital object in an XML submission format.

  • String format The XML format of objectXML, e.g. "info:fedora/fedora-system:FOXML-1.1", "info:fedora/fedora-system:FOXML-1.0", "info:fedora/fedora-system:METSFedoraExt-1.1", or "info:fedora/fedora-system:ATOM-1.0".

  • String logMessage A log message.

Returns:

  • String The pid of the newly created object.

Throws:

  • java.rmi.RemoteException

Anchor(modifyObject)

modifyObject

Modify an object.

If, after the call to this method, the object in question would have state "published" in its STATE datastream, then this method will perform validation of the object. In case of a failed validation, an exception will be thrown.

Input parameters:

  • String pid The PID of the object.

  • String state The new state, "A", "I" or "D". Null means leave unchanged. Only Active and Deleted are used in DOMS. Inactive objects are not used in DOMS, as an inactive object would not be in the Triple Store. We need to be able to make queries about it, so that is unacceptable. Rather, we use the special STATE datastream, see FedoraTransactionsReplacement.

  • String label the new label. Null means leave unchanged.

  • String ownerId The ownerId for the object.

  • String logMessage A log message.

Returns:

  • String The timestamp of the operation according to the server, in ISO8601 format.

Throws:

  • java.rmi.RemoteException

(export)

(getObjectXML)?

Fedora 3.0 API/Management (last edited 2010-03-17 13:08:52 by localhost)