Ignore:
Timestamp:
2004-10-06T05:36:52+13:00 (20 years ago)
Author:
cs025
Message:

Extensions to underpin OAI - e.g. creation of the OAI classifier, adding
modified file dates and ensuring that documents know the parent classifiers
to which they belong.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/doc.pm

    r7929 r8220  
    3737use util;
    3838use ghtml;
     39use File::stat;
    3940##use hashdoc;
    4041
     
    5556              'text'=>"",
    5657              'OIDtype'=>"hash"}, $class;
     58
     59    #GRB: Added code to set lastmodified for OAI purposes
     60    if ((defined $doc_type) && (defined $source_filename) && (-e $source_filename)) {
     61    my $file_stat = stat($source_filename);
     62    my $mtime = $file_stat->mtime;
     63    $self->add_utf8_metadata($self->get_top_section(), "lastmodified", $file_stat->mtime);
     64    }
     65    #GRB: end inserted code
    5766
    5867    if (defined $source_filename) {
     
    10511060
    10521061# add_metadata assumes the text is in (extended) ascii form. For
    1053 # text which hash been already converted to the UTF-8 format use
     1062# text which has already been converted to the UTF-8 format use
    10541063# add_utf8_metadata.
    10551064sub add_metadata {
Note: See TracChangeset for help on using the changeset viewer.