Ignore:
Timestamp:
2011-04-20T21:27:19+12:00 (13 years ago)
Author:
ak19
Message:

GS3's OAIserver passes final official oaiserver validation tests: to do with earliestDatestamp. 1. Perl code (inexport, basebuilder, colcfg, buildconfigxml.pm perl files) write out the earliestDatestamp into GS3's buildconfig.xml. Whenever a full-build is performed, the archives directory is recreated. At this stage, inexport creates a new file in archives called earliestDatestamp containing the current time. Whenever an incremental build is performed, this file already exists in archive, so it is left untouched, preserving the time of the full-build (which is the earliestDatestamp). The other perl files are concerned with obtaining this value from the archives directory and writing it out to the build config file. 2. doc.pm and BasePlugout.pm write out the current date and time for each document processed under the new fields oailastmodified and oailastmodifieddate. Changes made in this commit are related to GS3 java src code changes that work in tandem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/doc.pm

    r23923 r23939  
    126126
    127127# set lastmodified for OAI purposes, added by GRB, moved by kjdon
     128sub set_oailastmodified {
     129    my $self = shift (@_);
     130
     131    my $source_path = $self->{'terse_source_path'};
     132   
     133    if (defined $source_path && (-e $source_path)) {
     134    my $current_time = time;
     135
     136    my ($seconds, $minutes, $hours, $day_of_month, $month, $year,
     137        $wday, $yday, $isdst) = localtime($current_time);
     138
     139    my $date_modified = sprintf("%d%02d%02d",1900+$year,$month+1,$day_of_month);
     140
     141    $self->add_utf8_metadata($self->get_top_section(), "oailastmodified", $current_time);
     142    $self->add_utf8_metadata($self->get_top_section(), "oailastmodifieddate", $date_modified);
     143    }
     144}
     145
     146# no longer used for OAI purposes, since lastmodified is not what we want as the
     147# Datestamp of a document. This doc metadata may be useful for general purposes.
    128148sub set_lastmodified {
    129149    my $self = shift (@_);
Note: See TracChangeset for help on using the changeset viewer.