Changeset 14962 for gsdl/trunk/perllib/plugins/NULPlug.pm
- Timestamp:
- 2008-02-12T15:18:32+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/NULPlug.pm
r14117 r14962 118 118 # create a new document 119 119 my $doc_obj = new doc ($filename, "indexed_doc"); 120 my $top_section = $doc_obj->get_top_section(); 121 120 122 $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'}); 121 123 #$doc_obj->set_OIDtype ("incremental"); 122 $doc_obj->add_utf8_metadata($ doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}");123 $doc_obj->add_metadata($ doc_obj->get_top_section(), "Source", &ghtml::dmsafe($file)); # set the filename as Source metadata to be consistent with other plugins124 $doc_obj->add_utf8_metadata($top_section, "Plugin", "$self->{'plugin_type'}"); 125 $doc_obj->add_metadata($top_section, "Source", $file); # set the filename as Source metadata to be consistent with other plugins 124 126 125 $doc_obj->add_utf8_metadata($ doc_obj->get_top_section(), "FileSize", (-s $filename));127 $doc_obj->add_utf8_metadata($top_section, "FileSize", (-s $filename)); 126 128 127 129 # the metadata NoText is used to suppress the dummy text 'This document has no text.' 128 $doc_obj->add_metadata ($ doc_obj->get_top_section(), "NoText", "1");130 $doc_obj->add_metadata ($top_section, "NoText", "1"); 129 131 130 132 my $assoc_field = $self->{'assoc_field'} || "null_file"; 131 $doc_obj->add_metadata ($ doc_obj->get_top_section(), $assoc_field, $file);133 $doc_obj->add_metadata ($top_section, $assoc_field, $file); 132 134 133 135 if ($self->{'cover_image'}) {
Note:
See TracChangeset
for help on using the changeset viewer.