Changeset 15872 for gsdl/trunk/perllib/plugins/ConvertToRogPlugin.pm
- Timestamp:
- 2008-06-05T09:29:32+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/ConvertToRogPlugin.pm
r15865 r15872 1 1 ########################################################################### 2 2 # 3 # ConvertToRogPlug .pm -- plugin that inherits from RogPlug3 # ConvertToRogPlugin.pm -- plugin that inherits from RogPlugin 4 4 # 5 5 # A component of the Greenstone digital library software … … 26 26 27 27 28 package ConvertToRogPlug; 29 30 use BasPlug; 31 use RogPlug; 28 package ConvertToRogPlugin; 29 30 use RogPlugin; 32 31 use strict; 33 32 no strict 'refs'; # allow filehandles to be variables and viceversa 34 33 35 34 sub BEGIN { 36 @ConvertToRogPlug ::ISA = ('RogPlug');35 @ConvertToRogPlugin::ISA = ('RogPlugin'); 37 36 } 38 37 39 38 my $arguments = [ 40 39 ]; 41 my $options = { 'name' => "ConvertToRogPlug ",42 'desc' => "{ConvertToRogPlug .desc}",40 my $options = { 'name' => "ConvertToRogPlugin", 41 'desc' => "{ConvertToRogPlugin.desc}", 43 42 'abstract' => "yes", 44 43 'inherits' => "yes" }; … … 49 48 push(@$pluginlist, $class); 50 49 51 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}52 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};53 54 my $self = new RogPlug ($pluginlist, $inputargs, $hashArgOptLists);50 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 51 push(@{$hashArgOptLists->{"OptList"}},$options); 52 53 my $self = new RogPlugin($pluginlist, $inputargs, $hashArgOptLists); 55 54 56 55 $self->{'convert_to'} = "Rog"; … … 171 170 172 171 173 # Exact copy of read_rog_record from RogPlug 172 # Exact copy of read_rog_record from RogPlugin 174 173 # Needed for FILE in right scope 175 174 … … 271 270 } 272 271 273 # Override RogPlug function so rog files are stored as sections (not docs)272 # Override RogPlugin function so rog files are stored as sections (not docs) 274 273 275 274 sub process_rog_record … … 307 306 308 307 309 # Override Bas Plugread308 # Override BasePlugin read 310 309 # We don't want to get language encoding stuff until after we've converted 311 310 # our file to Rog format … … 347 346 $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'}); 348 347 my ($filemeta) = $file =~ /([^\\\/]+)$/; 349 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Source", &ghtml::dmsafe($filemeta)); 348 $self->set_Source_metadata($doc_obj, $filemeta); 349 350 350 if ($self->{'cover_image'}) { 351 351 $self->associate_cover_image($doc_obj, $filename); … … 436 436 my $ret_val = 1; 437 437 438 # $ret_val = &RogPlug ::process($self, $textref, $pluginfo,438 # $ret_val = &RogPlugin::process($self, $textref, $pluginfo, 439 439 # $tmp_dirname, $tmp_tailname, 440 440 # $metadata, $doc_obj);
Note:
See TracChangeset
for help on using the changeset viewer.