Opened 11 years ago

Last modified 11 years ago

#783 new enhancement

Order dc.Identifier that's shown by OAI server by user preference

Reported by: ak19 Owned by: nobody
Priority: moderate Milestone: Possible 2.88 Release
Component: Greenstone2&3 Severity: major
Keywords: Cc:


Mariana Pichinini wanted more control over the dc.Resource Identifier displayed by the OAI server.

The idea is now to have two more properties in oai.cfg:

  • identifier cutoff (threshhold): how many dc.Identifiers get displayed
  • identifier order (by collection?): user specified order. E.g. dc.Resource Identifier, gs.OAI Resource URL, autogenerated GS URL to source doc.
  • identifier order default: the default ordering is given above. Or it can be overridden in this property, to specify the default ordering behaviour for all collections, with exceptions given above under identifier order by collection.

The code needs to be changed in runtime-src/src/oaiservr/dublincore.cpp's output_custom_metadata() where it works out which URL to display for oai_dc.Identifier.

It needs to create a HashMap of (label, value) pairs, where label is dc.Resource Identifier, gs.OAI Resource URL, greenstone autoIdentifier, and their associated (comma-separated) values.

Then the code reads the user-defined ordering from oai.cfg and orders the keys of the map accordingly for the collection.

Next, the code outputs the values for the ordered elements in the mapping one after the other (stopping output when the cutoff/threshold is reached, which is another property defined in oai.cfg). Note that there may be multiple values per key in the map. For instance, there can be multiple dc.Resource Identifiers, there can be up to 2 GS autogenerated URLs.

OAI itself does not seem to specify any ordering of dc.Resource Identifier or any primary preference for URL over ISBN number, for instance. This leaves it open for Greenstone to allow users to specify the ordering.

Not just GS2 but also GS3 code needs to be modified to exhibit the same behaviour.

Change History (1)

comment:1 by ak19, 11 years ago

Type: defectenhancement
Note: See TracTickets for help on using tickets.