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 and http://www.fedora-commons.org/confluence/display/FCR30/API-A.

API-M (Fedora Management service API)

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 (Fedora Access service API)

describeRepository

Gets information that describes the repository.

Returns:

getDatastreamDissemination

Gets the content of a datastream.

Input parameters:

Returns:

getDissemination

Disseminates the content produced by executing the method specified in the service definition associated the specified digital object.

Input parameters:

Returns:

getObjectHistory

Gets a list of timestamps that correspond to modification dates of components. This currently includes changes to Datastreams and disseminators.

Input parameters:

Returns:

getObjectProfile

Gets the ObjectProfile of an object, which includes key metadata fields and URLs for the object Dissemination Index and the object Item Index. Can be thought of as a default view of the object.

Input parameters:

Returns:

listDatastreams

Lists the datastreams of an object.

Input parameters:

Returns:

listMethods

Lists all the methods that the object supports.

Input parameters:

Returns:

Data structures

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.

RepositoryInfo

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

MIMETypedStream

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

Property

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

ObjectProfile

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

DatastreamDef

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

ObjectMethodsDef

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

MethodParmDef

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

PassByRef

Contains the following public methods.

The only allowed value is "URL_REF".

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

PassByValue

DatastreamInputType

UserInputType

DefaultInputType