Approach, Discipline, and multiple dc.identifiers

Open Harvester Systems support questions and answers, bug reports, and development issues.

Moderators: jmacgreg, michael, John

Forum rules
The Public Knowledge Project Support Forum is moving to

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 22
Joined: Wed Mar 17, 2004 10:59 pm
Location: Vancouver, BC, Canada

Approach, Discipline, and multiple dc.identifiers

Postby mjordan » Wed May 19, 2004 10:11 pm


We are slowly but steadily popluating the CARL OAI Harvester (, which uses your teriffic application. I have made some modifications to your code and offer them here in the hope that you will consider implementing them as options in future versions of the Harvester. These changes have to do with the built-in "approach" and "discipline" fields in the Harvester's metadata table structure, and with the use of multiple dc.identifer elements (currently, the Harvester only allows use of a single identifier element).

I believe these changes make the Harvester more consistent with the OAI-PMH spec. While I can see the appeal of including metadata fields that describe the approach and discipline, neither Unqualified Dublin Core nor the OAI-PMH spec mentions them. Unless all harvested archives agreed on what constitutes "discipline", mapping the first dc:subject element to that field in the Harvester database assigns a discipline to records that don't necessarily describe that attribute. Similarly, mapping "approach" to the second dc:type element also adds the idea of approach where there may not be any in the originating records.

The following code removes the assignment of approach and discipline from the include/ code (original lines retained for comparison but commented out):

Code: Select all

        // record discipline and topic
        if(is_array($dc_metadata[subject])) {
                // $metadata[discipline] = array_shift($dc_metadata[subject]);
                $metadata[topic] = join("; ", $dc_metadata[subject]);       
         } else {               
                // $metadata[discipline] = $dc_metadata[subject];
                // $metadata[topic] = "";
                $metadata[topic] = $dc_metadata[subject];
        $metadata[discipline] = "";

Code: Select all

       // record type and approach
       if(is_array($dc_metadata[type])) {
                // $metadata[type] = $dc_metadata[type][0];
                //$metadata[approach] = $dc_metadata[type][1];
                $metadata[type] = join("; ", $dc_metadata[type]);
                $metadata[approach] = "";       
        } else {
                $metadata[type] = $dc_metadata[type];
                $metadata[approach] = "";

Multiple dc.identifiers are also valid, so I've changed the CARL Harvester to use this code (also in include/

Code: Select all

       // record identifier
        if(is_array($dc_metadata[identifier])) {               
                // $metadata[identifier] = $dc_metadata[identifier][0];
                $metadata[identifier] = join("; ", $dc_metadata[identifier]);
        } else {
                $metadata[identifier] = $dc_metadata[identifier];

For each of these three changes, corresponding modifications to the advanced search page and the full record display also have to be made.

Please let me know if you have any questions or want to see the corresponding code changes to the advanced search page and full record display.


Return to “Open Harvester Systems Support and Development”

Who is online

Users browsing this forum: No registered users and 1 guest