- Timestamp:
- 2018-03-13T15:59:21+13:00 (6 years ago)
- Location:
- main/trunk/greenstone2/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm
r31492 r32159 252 252 $self->{'metadata-file'} = $file; 253 253 $self->{'metadata-filename'} = $filename; 254 254 255 255 my $outhandle = $self->{'outhandle'}; 256 256 257 257 print STDERR "\n<Processing n='$file' p='MetadataXMLPlugin'>\n" if ($gli); 258 258 print $outhandle "MetadataXMLPlugin: processing $file\n" if ($self->{'verbosity'})> 1; 259 260 # In order to prevent blind reprocessing of the same old docs upon *incremental* building 261 # whenever we encounter a default empty metadata.xml that has no content defined (attaches 262 # no meta), we write an entry for *each* metadata.xml into archiveinf-src.db 263 print $outhandle "MetadataXMLPlugin: writing an entry for this metadata.xml into archiveinf-src.db\n" if ($self->{'verbosity'})> 1; 264 $processor->add_metaxml_file_entry_to_archiveinfsrc($filename); # pass in the full filename, like BasePlugout::archiveinf_db() does 265 266 259 267 # 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 260 268 $self->block_raw_filename($block_hash,$filename); … … 277 285 return -1; #error 278 286 } 279 287 280 288 return 1; 281 289 -
main/trunk/greenstone2/perllib/plugouts/BasePlugout.pm
r29163 r32159 1001 1001 } 1002 1002 1003 # meta files not set in rever ese entry, but need to set the metadata flag1003 # meta files not set in reverse entry, but need to set the metadata flag 1004 1004 if (defined $doc_obj->get_meta_files()) { 1005 1005 foreach my $meta_file_rec(@{$doc_obj->get_meta_files()}) { … … 1008 1008 } 1009 1009 } 1010 } 1011 1012 # This sub is called for every metadata.xml accepted for processing by by MetdataXMLPlugin 1013 # and adds an entry into archiveinf-src.db for that file in the form: 1014 # [@THISCOLLECTPATH@/import/metadata.xml] 1015 # <meta-file>1 1016 # This prevents blind reprocessing of the same old docs upon *incremental* building whenever 1017 # we encounter a default empty metadata.xml that has no actual <FileSet> content defined. 1018 sub add_metaxml_file_entry_to_archiveinfsrc { 1019 my $self = shift (@_); 1020 my ($full_file) = @_; 1021 1022 print STDERR "**** Adding metaxml file entry for full_file: $full_file\n"; 1023 my $working_info = $self->{'output_info'}; 1024 $working_info->set_meta_file_flag($full_file); 1010 1025 } 1011 1026
Note:
See TracChangeset
for help on using the changeset viewer.