Fedora 3.0 API

DOMS metadata objects will be stored in Fedora-commons 3.0. Fedora 3.0 is currently in beta 2, but is expected to be final by the time we release DOMS.

The API is documented here: http://www.fedora-commons.org/documentation/3.0/userdocs/index.html#webservices

The following restrictions apply:

All ingested objects, and all updates, must lead to valid objects, as defined by the data model. The exception is that objects marked as "draft" or "intermediate" in the datamodel are always considered valid.

Making a call to any API method that changes the object to a state not valid as defined by the datamodel will fail. Any call to a state-changing API-call where the object is not first set to intermediate state will fail.

Examples

Saving seven new interrelated objects to DOMS

Since the datamodel may require that all seven objects are correctly ingested and interrelated before they are valid, ingest all seven objects in intermediate state, and then publish them

Updating fields and references for 8 interrelated objects

To make sure that the changes don't interfere with validity, first set the state to intermediate, then update state to published after modifications.

Usage of Fedora API-M and API-A

The following describes those methods of the Fedora API-M and API-A that may be called by the GUI.

Descriptions in the following were copied (in part) from the Fedora documentation at http://www.fedora-commons.org/confluence/display/FCR30/API-M.

API-M

addDatastream

Creates a new Datastream in the object.

Input parameters:

Returns:

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.

Input parameters:

Returns:

compareDatastreamChecksum

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

Input parameters:

Returns:

getDatastream

Gets the specified datastream.

Input parameters:

Returns:

getDatastreams

Gets all versions of a datastream, sorted from most to least recent.

Input parameters:

Returns:

getRelationships

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

Input parameters:

Returns:

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.

Input parameters:

Returns:

modifyDatastreamByReference

Input parameters:

Returns:

modifyDatastreamByValue

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

Input parameters:

Returns:

modifyObject

Modify an object.

Input parameters:

Returns:

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.

Input parameters:

Returns:

setDatastreamState

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

Input parameters:

Returns:

(export)

(getDatastreamHistory)?

(getObjectXML)?

API-A

Datastructures

Datastream

Contains the following private fields. Each has corresponding getter and setter methods.

DatastreamControlGroup

Contains the following public methods.

The allowed values are "E", "M", "X" and "R". (External Referenced, Managed Content, Inline XML, Redirect)

The two first (static) methods return a DatastreamControlGroup with the given value. (They do the same.)

RelationshipTuple

Contains the following private fields. Each has corresponding getter and setter methods.