<<

OAI::DC Dublin Core formating helper

OAI::DC is an helper class for Dublin Core metadata. As Dublin Core have a well known set of fields, OAI::DC is a subclass of the OAI::DP class and it implements a default behavior to build correct answers. The data references returned by Archive_GetRecord and Archive_ListRecords must be instance providing the following method (they are used to translate your own data to Dublin Core) : Title(), Identifier(), Subject(), Creator(), Date(), Description(), Publisher(), Language() and Type(). The semantic of these methods is the same as the corresponding Dublin Core field.

To return correct metadata, you must provide or overide theses methods:

new: initialization step,
dispose: clean up step,
Archive_ListSets: return list of defined sets,
Archive_GetRecord: return a record,
Archive_ListRecords: return a list of records,
Archive_ListIdentifiers: return a list of record identifiers,

new

Object of this method is to build a new instance of your OAI data provider. At this step you can overide somme default information about the repository, you can also initiate connexion to a database... Parameters to the new method are user defined.

dispose

It's time to disconnect from database (if required). Must explicitly call SUPER::dispose().

Archive_ListSets

Return a reference to an array of list set. Each list set is a reference to a two element array. The first element is the set name of the set and the second is its short description.

        sub Archive_ListSets {
                [
                        [ 'SET1', 'Description of the SET1'],
                        [ 'SET2', 'Description of the SET2'],
                ];
        }

Archive_GetRecord

This method take a record identifier and metadata format as parameter. It must return a reference to the data associated to identifier. Data are reference to a hash and must provide methodes describe at the begining of DC section.

Archive_ListRecords

Object of this method is to return a list of records occording to the user query. Parameters of the method are the set, the from date, the until date, the metadata type required and a resumption token if supported.

The method must return a reference to a list of records, the metadata type of the answer and reference to token information. Token information must be undefined or a reference to a hash with the completeListSize and the cursor keys set.

<<