- Timestamp:
- 2008-02-12T15:18:32+13:00 (16 years ago)
- Location:
- gsdl/trunk/perllib/plugins
- Files:
-
- 2 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'}) { -
gsdl/trunk/perllib/plugins/UnknownPlug.pm
r14117 r14962 194 194 # create a new document 195 195 my $doc_obj = new doc ($filename, "indexed_doc"); 196 my $top_section = $doc_obj->get_top_section(); 197 196 198 $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'}); 197 $doc_obj->add_utf8_metadata($ doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}");198 $doc_obj->add_metadata($ doc_obj->get_top_section(), "Source", &ghtml::dmsafe($file)); # set the filename as Source metadata to be consistent with other plugins199 $doc_obj->add_utf8_metadata($ doc_obj->get_top_section(), "FileSize", (-s $filename));199 $doc_obj->add_utf8_metadata($top_section, "Plugin", "$self->{'plugin_type'}"); 200 $doc_obj->add_metadata($top_section, "Source", $file); # set the filename as Source metadata to be consistent with other plugins 201 $doc_obj->add_utf8_metadata($top_section, "FileSize", (-s $filename)); 200 202 201 203 # URL metadata (even invalid ones) are used to support internal … … 203 205 204 206 my $web_url = "http://$file"; 205 $doc_obj->add_metadata($ doc_obj->get_top_section(), "URL", $web_url);207 $doc_obj->add_metadata($top_section, "URL", $web_url); 206 208 207 209
Note:
See TracChangeset
for help on using the changeset viewer.