Interface Specification for RAPK


[Contents] [Prev] [Next]
Table of Contents

Overview

The RAPK interface describes a prototype of a Kahn-Wilensky style repository service. RAPK is an acronym for Repository Access Protocol for Knowbot Programs. The Intellectual Property Rights Management demo implements an Image Repository service that conforms to the RAPK inteface.

Notes

Imported Interfaces

This interface imports the Mapping interface.

Types

This interface defines the following non-object types:

String
An alias for ilu.CString
Strings
An alias for SEQUENCE OF String
Handle
A type representing a CNRI Handle, currently an alias for the String type.
Handles
An alias for SEQUENCE OF Handle
CardinalOrNull
An alias for OPTIONAL CARDINAL
Iterator
An alias for CARDINAL
TermsAndConditions
A type representing the terms and conditions of use of a digital object. Currently an alias for Mapping.StringMap
Metadata
A type representing a digital object's metadata. Currently an alias for Mapping.StringMap

Exceptions

This interface defines the following exceptions:

TypeError
A digital object cannot produce the requested dissemination type.

NotFound
A handle refers to a non-existent digital object.

LastDocument
An iterator has reached the last document.

BadIterator
An invalid iterator was used.

ReadError
An error occurs while reading a dissemination's data.

TermsAndConditionsFailure
The rights to a digital object have not been satisfied.

Objects

This interface defines the following object types:

Repository
The object representing a repository.

DigitalObject
This object represents the somewhat abstract notion of a "digital object". Digital objects have metadata associated with them, and may also have terms and conditions of use which must be satisfied before they can be legally used. A digital object may also have any number of "disseminations" which are used to retrieve the typed data of a digital object.

Note that the terms and conditions must be negotiated for a dissemination before that dissemination can be retrieved. Not all disseminations require terms and conditions negotiation, but all disseminations have an interface for negotiating terms and conditions.

Terms and conditions negotiation is currently very simple. To find out what terms you must satisfy, use the GetTermsAndConditions() method, which returns a Mapping object (disguised as a the TermsAndConditions type). The keys of this object are the terms which must be satisfied or conditions which can be queried. The values are either values used by clients negotiating the terms and conditions, or are expected to be set by the clients in order to satisfy a condition. The actual set of terms and conditions keys and the expected values are implementation dependent.

Dissemination
The object representing the typed data of a digital object. Clients use the Dissemination, for example, to read the JPEG data of a thumbnail image represented in a digital object.

Repository Objects

GetRepoMetadata () : Metadata
Return the repository's metadata object.

Scan () : Handles
Return a list of all handles registered in the repository.

GetMetadata (hdl : Handle) : Metadata
Return the metadata associated with the digital object referenced by the handle hdl. Raise NotFound if there is no digital object for the given handle.

GetDO (hdl : Handle) : DigitalObject
Return the digital object reference by handle hdl. Raise NotFound if there is no digital object for the given handle.

GetTermsAndConditions (hdl : Handle) : TermsAndConditions
Return the terms and conditions for the digital object reference by handle hdl. Raise NotFound if there is no digital object for the given handle.

CreateIterator () : Iterator
Create an iterator over the handles for the digital objects registered in the repository.

Iterate (token : Iterator) : Handle
Return the next handle in the set of handles iterated over via the given token. Raise LastDocument when the iterator has moved past the last document in the list. Raise BadIterator when the given token is not a valid iterator.

DigitalObject Objects

GetMetadata () : Metadata
Return the metadata for the digital object.

GetTermsAndConditions () : TermsAndConditions
Return the terms and conditions for the digital object.

GetDissemination (dtype : String) : Dissemination
Return a dissemination of the digital object, of the type specified by dtype. The list of dissemination types is typically defined in the metadata of the digital object. This method raises TypeError for if an invalid dissemination type is specified. It raises TermsAndConditions if the terms and conditions for use of the dissemination have not been satisfied.

Dissemination Objects

GetTermsAndConditions () : TermsAndConditions
Return the terms and conditions for the digital object.

Read (Size : CardinalOrNull) : String
Read Size bytes of the dissemination's data. Raise ReadError if the read fails. Raise TermsAndConditionsFailure if the terms and conditions for use of the dissemination have not been satisfied.

Table of Contents

[Contents] [Prev] [Next]
Copyright © 1998 by the Corporation for National Research Initiatives.