Changeset 16392 for gsdl/trunk/perllib/plugins/SplitTextFile.pm
- Timestamp:
- 2008-07-14T14:57:38+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/SplitTextFile.pm
r16104 r16392 118 118 sub metadata_read { 119 119 my $self = shift (@_); 120 my ($pluginfo, $base_dir, $file, $ metadata, $extrametakeys, $extrametadata, $processor, $maxdocs, $gli) = @_;120 my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $extrametakeys, $extrametadata, $processor, $maxdocs, $gli) = @_; 121 121 122 122 # returns 1 if matches process_exp, and has done blocking in the meantime 123 my $matched = $self->SUPER::metadata_read($pluginfo, $base_dir, $file, 123 my $matched = $self->SUPER::metadata_read($pluginfo, $base_dir, $file, 124 $block_hash, 124 125 $metadata, $extrametakeys, 125 126 $extrametadata, $processor, … … 192 193 sub read { 193 194 my $self = shift (@_); 194 my ($pluginfo, $base_dir, $file, $ metadata, $processor, $maxdocs, $total_count, $gli) = @_;195 my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $processor, $maxdocs, $total_count, $gli) = @_; 195 196 my $outhandle = $self->{'outhandle'}; 196 197 my $verbosity = $self->{'verbosity'}; 197 198 198 # check process and block exps, smart block, etc199 my ($ block_status,$filename) = $self->read_block(@_);200 return $block_status if ((!defined $block_status) || ($block_status==0));199 # can we process this file?? 200 my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file); 201 return undef unless $self->can_process_this_file($filename_full_path); 201 202 202 203 $file =~ s/^[\/\\]+//; # $file often begins with / so we'll tidy it up … … 232 233 233 234 # create a new document 234 my $doc_obj = new doc ($filename , "indexed_doc");235 my $doc_obj = new doc ($filename_full_path, "indexed_doc"); 235 236 $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'}); 236 237 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Language", $language); … … 240 241 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "SourceSegment", "$segment"); 241 242 if ($self->{'cover_image'}) { 242 $self->associate_cover_image($doc_obj, $filename );243 $self->associate_cover_image($doc_obj, $filename_full_path); 243 244 } 244 245 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}");
Note:
See TracChangeset
for help on using the changeset viewer.