Show
Ignore:
Timestamp:
16.01.2012 17:47:14 (8 years ago)
Author:
ak19
Message:

All perlcode that accesses extrametakeys, extrametadata, extrametafile data structures has been moved into a new perl module called extrametautil.pm. The next step will be to ensure that the file_regexes used to index into these data structures are consistent (using consistent slashes, like URL style slashes).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/OAIPlugin.pm

    r24547 r24951  
    2727package OAIPlugin; 
    2828 
     29use extrametautil; 
    2930use unicode; 
    3031use util; 
     
    256257    # extrametadata keys should be regular expressions 
    257258    $filename_for_metadata = &util::filename_to_regex($filename_for_metadata); 
    258     $extrametadata->{$filename_for_metadata} = $new_metadata; 
    259     push(@$extrametakeys, $filename_for_metadata); 
    260     if ($srcdoc_exists) { 
    261     if (!defined $extrametafile->{$filename_for_metadata}) { 
    262         $extrametafile->{$filename_for_metadata} = {}; 
     259    &extrametautil::setmetadata($extrametadata, $filename_for_metadata, $new_metadata); 
     260    &extrametautil::addmetakey($extrametakeys, $filename_for_metadata); 
     261    if ($srcdoc_exists) {    
     262    if (!defined &extrametautil::getmetafile($extrametafile, $filename_for_metadata)) { 
     263        &extrametautil::setmetafile($extrametafile, $filename_for_metadata, {}); 
    263264    } 
    264265     #maps the file to full path 
    265     $extrametafile->{$filename_for_metadata}->{$file} = $filename_full_path; 
     266    &extrametautil::setmetafile_for_named_file($extrametafile, $filename_for_metadata, $file, $filename_full_path); 
     267     
    266268    } 
    267269    return 1;