Ignore:
Timestamp:
2009-09-10T10:50:05+12:00 (15 years ago)
Author:
davidb
Message:

Changes to support new incremental_mode variable, and to track metadata.xml files more closely so incremental building works when a document is first build without any metadata attached, then then in a subsequent build has metadata from such a source as metadata.xml added.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/MetadataXMLPlugin.pm

    r19493 r20577  
    164164
    165165
     166sub file_block_read {
     167    my $self = shift (@_);
     168    my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $gli) = @_;
     169
     170    my $filename = &util::filename_cat($base_dir, $file);
     171    if ($filename !~ /metadata\.xml$/ || !-f $filename) {
     172        return undef;
     173    }
     174
     175    $block_hash->{'metadata_files'}->{$filename} = 1;
     176
     177    return 1;
     178}
     179
    166180sub metadata_read
    167181{
     
    179193    $self->{'metadata-filename'} = $filename;
    180194
     195
    181196    my $outhandle = $self->{'outhandle'};
    182197   
     
    185200    # add the file to the block list so that it won't be processed in read, as we will do all we can with it here
    186201    $block_hash->{'file_blocks'}->{$filename} = 1;
     202
    187203    $self->{'metadataref'} = $extrametadata;
    188204    $self->{'metafileref'} = $extrametafile;
Note: See TracChangeset for help on using the changeset viewer.