- Timestamp:
- 2017-03-13T11:12:37+13:00 (7 years ago)
- Location:
- main/trunk/greenstone2/perllib/plugins
- Files:
-
- 55 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/ArchivesInfPlugin.pm
r31479 r31492 33 33 use FileUtils; 34 34 use doc; 35 use EncodingUtil;35 use CommonUtil; 36 36 use plugin; 37 37 use arcinfo; … … 43 43 44 44 BEGIN { 45 @ArchivesInfPlugin::ISA = (' EncodingUtil');45 @ArchivesInfPlugin::ISA = ('CommonUtil'); 46 46 } 47 47 … … 79 79 push(@{$hashArgOptLists->{"OptList"}},$options); 80 80 81 my $self = new EncodingUtil($pluginlist, $inputargs, $hashArgOptLists);81 my $self = new CommonUtil($pluginlist, $inputargs, $hashArgOptLists); 82 82 83 83 return bless $self, $class; -
main/trunk/greenstone2/perllib/plugins/AutoExtractMetadata.pm
r22859 r31492 25 25 26 26 # This plugin uses the supporting Extractors to add metadata extraction 27 # functionality to Base Plugin.27 # functionality to BaseImporter. 28 28 29 29 … … 34 34 no strict 'refs'; # allow filehandles to be variables and viceversa 35 35 36 use Base Plugin;36 use BaseImporter; 37 37 use AcronymExtractor; 38 38 use KeyphraseExtractor; … … 42 42 43 43 sub BEGIN { 44 @AutoExtractMetadata::ISA = ( 'Base Plugin', 'AcronymExtractor', 'KeyphraseExtractor', 'EmailAddressExtractor', 'DateExtractor','GISExtractor' );44 @AutoExtractMetadata::ISA = ( 'BaseImporter', 'AcronymExtractor', 'KeyphraseExtractor', 'EmailAddressExtractor', 'DateExtractor','GISExtractor' ); 45 45 } 46 46 … … 76 76 new DateExtractor($pluginlist, $inputargs, $hashArgOptLists); 77 77 new GISExtractor($pluginlist, $inputargs, $hashArgOptLists); 78 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists,$auxiliary);78 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists,$auxiliary); 79 79 80 80 return bless $self, $class; -
main/trunk/greenstone2/perllib/plugins/AutoLoadConverters.pm
r24728 r31492 117 117 my $pi_self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists, 1); 118 118 push (@self_array, $pi_self); 119 $self = Base Plugin::merge_inheritance(@self_array);119 $self = BaseImporter::merge_inheritance(@self_array); 120 120 121 121 return bless $self, $class; -
main/trunk/greenstone2/perllib/plugins/BaseImporter.pm
r31491 r31492 1 1 ########################################################################### 2 2 # 3 # Base Plugin.pm -- base class for all the import plugins3 # BaseImporter.pm -- base class for all the import plugins 4 4 # A component of the Greenstone digital library software 5 5 # from the New Zealand Digital Library Project at the … … 24 24 ########################################################################### 25 25 26 package Base Plugin;26 package BaseImporter; 27 27 28 28 use strict; … … 42 42 use FileUtils; 43 43 44 use EncodingUtil;44 use CommonUtil; 45 45 46 46 BEGIN { 47 @Base Plugin::ISA = ( 'EncodingUtil' );47 @BaseImporter::ISA = ( 'CommonUtil' ); 48 48 } 49 49 … … 52 52 our $file_rename_method_list = 53 53 [ { 'name' => "url", 54 'desc' => "{Base Plugin.rename_method.url}" },54 'desc' => "{BaseImporter.rename_method.url}" }, 55 55 { 'name' => "base64", 56 'desc' => "{Base Plugin.rename_method.base64}" },56 'desc' => "{BaseImporter.rename_method.base64}" }, 57 57 { 'name' => "none", 58 'desc' => "{Base Plugin.rename_method.none}",58 'desc' => "{BaseImporter.rename_method.none}", 59 59 'hiddengli' => "yes" } ]; 60 60 … … 63 63 our $oidtype_list = 64 64 [ { 'name' => "auto", 65 'desc' => "{Base Plugin.OIDtype.auto}" },65 'desc' => "{BaseImporter.OIDtype.auto}" }, 66 66 { 'name' => "hash", 67 67 'desc' => "{import.OIDtype.hash}" }, … … 83 83 my $arguments = 84 84 [ { 'name' => "process_exp", 85 'desc' => "{Base Plugin.process_exp}",85 'desc' => "{BaseImporter.process_exp}", 86 86 'type' => "regexp", 87 87 'deft' => "", 88 88 'reqd' => "no" }, 89 89 { 'name' => "store_original_file", 90 'desc' => "{Base Plugin.store_original_file}",90 'desc' => "{BaseImporter.store_original_file}", 91 91 'type' => "flag", 92 92 'reqd' => "no" }, 93 93 { 'name' => "associate_ext", 94 'desc' => "{Base Plugin.associate_ext}",94 'desc' => "{BaseImporter.associate_ext}", 95 95 'type' => "string", 96 96 'reqd' => "no" }, 97 97 { 'name' => "associate_tail_re", 98 'desc' => "{Base Plugin.associate_tail_re}",98 'desc' => "{BaseImporter.associate_tail_re}", 99 99 'type' => "string", 100 100 'reqd' => "no" }, … … 112 112 'reqd' => "no" }, 113 113 # { 'name' => "use_as_doc_identifier", 114 # 'desc' => "{Base Plugin.use_as_doc_identifier}",114 # 'desc' => "{BaseImporter.use_as_doc_identifier}", 115 115 # 'type' => "string", 116 116 # 'reqd' => "no" , 117 117 # 'deft' => "" } , 118 118 { 'name' => "no_cover_image", 119 'desc' => "{Base Plugin.no_cover_image}",119 'desc' => "{BaseImporter.no_cover_image}", 120 120 'type' => "flag", 121 121 'reqd' => "no" }, 122 122 # { 'name' => "filename_encoding", 123 # 'desc' => "{Base Plugin.filename_encoding}",123 # 'desc' => "{BaseImporter.filename_encoding}", 124 124 # 'type' => "enum", 125 125 # 'deft' => "auto", … … 127 127 # 'reqd' => "no" }, 128 128 { 'name' => "smart_block", 129 'desc' => "{common.deprecated}. {Base Plugin.smart_block}",129 'desc' => "{common.deprecated}. {BaseImporter.smart_block}", 130 130 'type' => "flag", 131 131 'reqd' => "no", 132 132 'hiddengli' => "yes" }, # deprecated, but leave in for old collections 133 133 { 'name' => "file_rename_method", 134 'desc' => "{Base Plugin.file_rename_method}",134 'desc' => "{BaseImporter.file_rename_method}", 135 135 'type' => "enum", 136 136 'deft' => &get_default_file_rename_method(), # by default rename imported files and assoc files using this encoding … … 142 142 143 143 144 my $options = { 'name' => "Base Plugin",145 'desc' => "{Base Plugin.desc}",144 my $options = { 'name' => "BaseImporter", 145 'desc' => "{BaseImporter.desc}", 146 146 'abstract' => "yes", 147 147 'inherits' => "yes", … … 157 157 push(@{$hashArgOptLists->{"OptList"}},$options); 158 158 159 my $self = new EncodingUtil($pluginlist, $inputargs, $hashArgOptLists,$auxiliary);159 my $self = new CommonUtil($pluginlist, $inputargs, $hashArgOptLists,$auxiliary); 160 160 161 161 if ($self->{'info_only'}) { … … 238 238 } 239 239 240 # initialize Base Pluginoptions241 # if init() is overridden in a sub-class, remember to call Base Plugin::init()240 # initialize BaseImporter options 241 # if init() is overridden in a sub-class, remember to call BaseImporter::init() 242 242 sub init { 243 243 my $self = shift (@_); … … 612 612 } 613 613 614 # The Base Pluginread_into_doc_obj() function. This function does all the614 # The BaseImporter read_into_doc_obj() function. This function does all the 615 615 # right things to make general options work for a given plugin. It doesn't do anything with the file other than setting reads in 616 616 # a file and sets up a slew of metadata all saved in doc_obj, which … … 694 694 695 695 # lookup_string with extra '1' arg returns perl internal unicode aware text, so we use add_utf8_text so no encoding is done on it. 696 $doc_obj->add_utf8_text($section, &gsprintf::lookup_string("{Base Plugin.dummy_text}",1));697 #$doc_obj->add_text($section, &gsprintf::lookup_string("{Base Plugin.dummy_text}",1));696 $doc_obj->add_utf8_text($section, &gsprintf::lookup_string("{BaseImporter.dummy_text}",1)); 697 #$doc_obj->add_text($section, &gsprintf::lookup_string("{BaseImporter.dummy_text}",1)); 698 698 699 699 … … 740 740 741 741 742 # The Base Pluginread() function. This function calls read_into_doc_obj()742 # The BaseImporter read() function. This function calls read_into_doc_obj() 743 743 # to ensure all the right things to make general options work for a 744 744 # given plugin are done. It then calls the process() function which … … 790 790 my ($textref, $pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_; 791 791 792 gsprintf(STDERR, "Base Plugin::process {common.must_be_implemented}\n");792 gsprintf(STDERR, "BaseImporter::process {common.must_be_implemented}\n"); 793 793 794 794 my ($cpackage,$cfilename,$cline,$csubr,$chas_args,$cwantarray) = caller(1); -
main/trunk/greenstone2/perllib/plugins/BibTexPlugin.pm
r24548 r31492 56 56 my $arguments = 57 57 [ { 'name' => "process_exp", 58 'desc' => "{Base Plugin.process_exp}",58 'desc' => "{BaseImporter.process_exp}", 59 59 'type' => "regexp", 60 60 'reqd' => "no", -
main/trunk/greenstone2/perllib/plugins/BookPlugin.pm
r15872 r31492 62 62 my $arguments = 63 63 [ { 'name' => "process_exp", 64 'desc' => "{Base Plugin.process_exp}",64 'desc' => "{BaseImporter.process_exp}", 65 65 'type' => "regexp", 66 66 'reqd' => "no", 67 67 'deft' => &get_default_process_exp() }, 68 68 { 'name' => "block_exp", 69 'desc' => "{Base Plugin.block_exp}",69 'desc' => "{BaseImporter.block_exp}", 70 70 'type' => "regexp", 71 71 'reqd' => "no", -
main/trunk/greenstone2/perllib/plugins/CONTENTdmPlugin.pm
r28563 r31492 71 71 'reqd' => "no" }, 72 72 { 'name' => "process_exp", 73 'desc' => "{Base Plugin.process_exp}",73 'desc' => "{BaseImporter.process_exp}", 74 74 'type' => "regexp", 75 75 'deft' => &get_default_process_exp(), 76 76 'reqd' => "no" }, 77 77 { 'name' => "block_exp", 78 'desc' => "{Base Plugin.block_exp}",78 'desc' => "{BaseImporter.block_exp}", 79 79 'type' => "regexp", 80 80 'deft' => &get_default_block_exp() } … … 585 585 586 586 587 # Override ConvertBinaryFile (ie Base Plugin) read587 # Override ConvertBinaryFile (ie BaseImporter) read 588 588 # Needed so multiple .item files generated are sent down secondary plugin 589 589 # and the resulting doc_objs all processed. -
main/trunk/greenstone2/perllib/plugins/CSVPlugin.pm
r28782 r31492 42 42 my $arguments = 43 43 [ { 'name' => "process_exp", 44 'desc' => "{Base Plugin.process_exp}",44 'desc' => "{BaseImporter.process_exp}", 45 45 'type' => "regexp", 46 46 'reqd' => "no", -
main/trunk/greenstone2/perllib/plugins/CommonUtil.pm
r31491 r31492 1 1 ########################################################################### 2 2 # 3 # EncodingUtil.pm -- base class for file and directory plugins - aims to4 # handle all encoding stuff, to keep it in one place3 # CommonUtil.pm -- base class for file and directory plugins - aims to 4 # handle all encoding stuff, blocking stuff, to keep it in one place 5 5 # A component of the Greenstone digital library software 6 6 # from the New Zealand Digital Library Project at the … … 25 25 ########################################################################### 26 26 27 package EncodingUtil;27 package CommonUtil; 28 28 29 29 use strict; … … 39 39 40 40 BEGIN { 41 @ EncodingUtil::ISA = ( 'PrintInfo' );41 @CommonUtil::ISA = ( 'PrintInfo' ); 42 42 } 43 43 44 44 our $encoding_list = 45 45 [ { 'name' => "ascii", 46 'desc' => "{Base Plugin.encoding.ascii}" },46 'desc' => "{BaseImporter.encoding.ascii}" }, 47 47 { 'name' => "utf8", 48 'desc' => "{Base Plugin.encoding.utf8}" },48 'desc' => "{BaseImporter.encoding.utf8}" }, 49 49 { 'name' => "unicode", 50 'desc' => "{Base Plugin.encoding.unicode}" } ];50 'desc' => "{BaseImporter.encoding.unicode}" } ]; 51 51 52 52 … … 63 63 our $encoding_plus_auto_list = 64 64 [ { 'name' => "auto", 65 'desc' => "{Base Plugin.filename_encoding.auto}" },65 'desc' => "{BaseImporter.filename_encoding.auto}" }, 66 66 { 'name' => "auto-language-analysis", 67 'desc' => "{Base Plugin.filename_encoding.auto_language_analysis}" }, # textcat67 'desc' => "{BaseImporter.filename_encoding.auto_language_analysis}" }, # textcat 68 68 { 'name' => "auto-filesystem-encoding", 69 'desc' => "{Base Plugin.filename_encoding.auto_filesystem_encoding}" }, # locale69 'desc' => "{BaseImporter.filename_encoding.auto_filesystem_encoding}" }, # locale 70 70 { 'name' => "auto-fl", 71 'desc' => "{Base Plugin.filename_encoding.auto_fl}" }, # locale followed by textcat71 'desc' => "{BaseImporter.filename_encoding.auto_fl}" }, # locale followed by textcat 72 72 { 'name' => "auto-lf", 73 'desc' => "{Base Plugin.filename_encoding.auto_lf}" } ]; # texcat followed by locale73 'desc' => "{BaseImporter.filename_encoding.auto_lf}" } ]; # texcat followed by locale 74 74 75 75 push(@{$encoding_plus_auto_list},@{$encoding_list}); … … 77 77 my $arguments = 78 78 [ { 'name' => "block_exp", 79 'desc' => "{Base Plugin.block_exp}",79 'desc' => "{BaseImporter.block_exp}", 80 80 'type' => "regexp", 81 81 'deft' => "", 82 82 'reqd' => "no" }, 83 83 { 'name' => "no_blocking", 84 'desc' => "{Base Plugin.no_blocking}",84 'desc' => "{BaseImporter.no_blocking}", 85 85 'type' => "flag", 86 86 'reqd' => "no"}, 87 87 { 'name' => "filename_encoding", 88 'desc' => "{Base Plugin.filename_encoding}",88 'desc' => "{BaseImporter.filename_encoding}", 89 89 'type' => "enum", 90 90 'deft' => "auto", … … 93 93 ]; 94 94 95 my $options = { 'name' => " EncodingUtil",96 'desc' => "{ EncodingUtil.desc}",95 my $options = { 'name' => "CommonUtil", 96 'desc' => "{CommonUtil.desc}", 97 97 'abstract' => "yes", 98 98 'inherits' => "no", … … 140 140 my $filename_encoding = $self->guess_filesystem_encoding(); 141 141 142 # copied this from set_Source_metadata in Base Plugin142 # copied this from set_Source_metadata in BaseImporter 143 143 if ((defined $filename_encoding) && ($filename_encoding ne "ascii")) { 144 144 # Use filename_encoding to map raw filename to a Perl unicode-aware string … … 267 267 my $outhandle = $self->{'outhandle'}; 268 268 269 print $outhandle "****!!!!**** Base Plugin::filename_to_utf8_metadata now deprecated\n";269 print $outhandle "****!!!!**** BaseImporter::filename_to_utf8_metadata now deprecated\n"; 270 270 my ($cpackage,$cfilename,$cline,$csubr,$chas_args,$cwantarray) = caller(0); 271 271 print $outhandle "Calling method: $cfilename:$cline $cpackage->$csubr\n"; … … 363 363 { 364 364 if ($self->{'verbosity'}) { 365 gsprintf($outhandle, "Base Plugin: {ReadTextFile.unsupported_encoding}\n", $text, $best_encoding, "undef");365 gsprintf($outhandle, "BaseImporter: {ReadTextFile.unsupported_encoding}\n", $text, $best_encoding, "undef"); 366 366 } 367 367 $best_encoding = undef; -
main/trunk/greenstone2/perllib/plugins/ConvertToRogPlugin.pm
r28563 r31492 309 309 310 310 311 # Override Base Pluginread311 # Override BaseImporter read 312 312 # We don't want to get language encoding stuff until after we've converted 313 313 # our file to Rog format -
main/trunk/greenstone2/perllib/plugins/DSpacePlugin.pm
r31480 r31492 62 62 my $arguments = 63 63 [ { 'name' => "process_exp", 64 'desc' => "{Base Plugin.process_exp}",64 'desc' => "{BaseImporter.process_exp}", 65 65 'type' => "string", 66 66 'deft' => &get_default_process_exp(), … … 79 79 'reqd' => "no" }, 80 80 { 'name' => "block_exp", 81 'desc' => "{Base Plugin.block_exp}",81 'desc' => "{BaseImporter.block_exp}", 82 82 'type' => "regexp", 83 83 'deft' => &get_default_block_exp(), … … 320 320 321 321 # Temporarily store associate file info in metadata table 322 # This will be removed in 'extra_metadata' in Base Pluginand used322 # This will be removed in 'extra_metadata' in BaseImporter and used 323 323 # to perform the actual file association (once the doc obj has 324 324 # been formed -
main/trunk/greenstone2/perllib/plugins/DatabasePlugin.pm
r24548 r31492 49 49 my $arguments = 50 50 [ { 'name' => "process_exp", 51 'desc' => "{Base Plugin.process_exp}",51 'desc' => "{BaseImporter.process_exp}", 52 52 'type' => "regexp", 53 53 'deft' => &get_default_process_exp(), … … 260 260 my $cursection = $doc_obj->get_top_section(); 261 261 262 # if $language not set in config file, will use Base Plugin's default262 # if $language not set in config file, will use BaseImporter's default 263 263 if (defined($language)) { 264 264 $doc_obj->add_utf8_metadata($cursection, "Language", $language); 265 265 } 266 # if $encoding not set in config file, will use Base Plugin's default266 # if $encoding not set in config file, will use BaseImporter's default 267 267 if (defined($encoding)) { 268 268 # allow some common aliases -
main/trunk/greenstone2/perllib/plugins/DirectoryPlugin.pm
r31477 r31492 31 31 32 32 use extrametautil; 33 use EncodingUtil;33 use CommonUtil; 34 34 use plugin; 35 35 use util; … … 47 47 48 48 BEGIN { 49 @DirectoryPlugin::ISA = (' EncodingUtil');49 @DirectoryPlugin::ISA = ('CommonUtil'); 50 50 } 51 51 52 52 my $arguments = 53 53 [ { 'name' => "block_exp", 54 'desc' => "{Base Plugin.block_exp}",54 'desc' => "{BaseImporter.block_exp}", 55 55 'type' => "regexp", 56 56 'deft' => &get_default_block_exp(), … … 81 81 push(@{$hashArgOptLists->{"OptList"}},$options); 82 82 83 my $self = new EncodingUtil($pluginlist, $inputargs, $hashArgOptLists);83 my $self = new CommonUtil($pluginlist, $inputargs, $hashArgOptLists); 84 84 85 85 if ($self->{'info_only'}) { -
main/trunk/greenstone2/perllib/plugins/EmailPlugin.pm
r28563 r31492 85 85 ]; 86 86 87 # add in all the standard options from Base Plugin88 unshift (@$extended_oidtype_list, @{$Base Plugin::oidtype_list});87 # add in all the standard options from BaseImporter 88 unshift (@$extended_oidtype_list, @{$BaseImporter::oidtype_list}); 89 89 90 90 my $arguments = 91 91 [ { 'name' => "process_exp", 92 'desc' => "{Base Plugin.process_exp}",92 'desc' => "{BaseImporter.process_exp}", 93 93 'type' => "regexp", 94 94 'reqd' => "no", -
main/trunk/greenstone2/perllib/plugins/EmbeddedMetadataPlugin.pm
r31474 r31492 28 28 package EmbeddedMetadataPlugin; 29 29 30 use Base Plugin;30 use BaseImporter; 31 31 use extrametautil; 32 32 use util; … … 41 41 sub BEGIN 42 42 { 43 @EmbeddedMetadataPlugin::ISA = ('Base Plugin');43 @EmbeddedMetadataPlugin::ISA = ('BaseImporter'); 44 44 binmode(STDERR, ":utf8"); 45 45 } … … 48 48 'name' => "auto", 49 49 'desc' => "{ReadTextFile.input_encoding.auto}" }]; 50 push(@{$encoding_plus_auto_list},@{$ EncodingUtil::encoding_list});50 push(@{$encoding_plus_auto_list},@{$CommonUtil::encoding_list}); 51 51 52 52 my $arguments = [{ … … 104 104 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)}; 105 105 106 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);106 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 107 107 108 108 # Create a new Image::ExifTool object -
main/trunk/greenstone2/perllib/plugins/ExcelPlugin.pm
r23751 r31492 45 45 my $arguments = 46 46 [ { 'name' => "process_exp", 47 'desc' => "{Base Plugin.process_exp}",47 'desc' => "{BaseImporter.process_exp}", 48 48 'type' => "regexp", 49 49 'reqd' => "no", … … 87 87 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 88 88 my $cbf_self = new ConvertBinaryFile($pluginlist, $inputargs, $hashArgOptLists); 89 my $self = Base Plugin::merge_inheritance($auto_converter_self, $cbf_self);89 my $self = BaseImporter::merge_inheritance($auto_converter_self, $cbf_self); 90 90 91 91 -
main/trunk/greenstone2/perllib/plugins/FOXPlugin.pm
r18327 r31492 31 31 package FOXPlugin; 32 32 33 use Base Plugin;33 use BaseImporter; 34 34 use util; 35 35 use doc; … … 41 41 42 42 sub BEGIN { 43 @FOXPlugin::ISA = ('Base Plugin');43 @FOXPlugin::ISA = ('BaseImporter'); 44 44 } 45 45 46 46 my $arguments = 47 47 [ { 'name' => "process_exp", 48 'desc' => "{Base Plugin.process_exp}",48 'desc' => "{BaseImporter.process_exp}", 49 49 'type' => "regexp", 50 50 'reqd' => "no", 51 51 'deft' => &get_default_process_exp() }, 52 52 { 'name' => "block_exp", 53 'desc' => "{Base Plugin.block_exp}",53 'desc' => "{BaseImporter.block_exp}", 54 54 'type' => "regexp", 55 55 'reqd' => "no", … … 70 70 push(@{$hashArgOptLists->{"OptList"}},$options); 71 71 72 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);72 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 73 73 74 74 return bless $self, $class; -
main/trunk/greenstone2/perllib/plugins/FavouritesPlugin.pm
r21759 r31492 40 40 my $arguments = 41 41 [ { 'name' => "process_exp", 42 'desc' => "{Base Plugin.process_exp}",42 'desc' => "{BaseImporter.process_exp}", 43 43 'type' => "regexp", 44 44 'deft' => &get_default_process_exp(), -
main/trunk/greenstone2/perllib/plugins/GreenstoneMETSPlugin.pm
r22840 r31492 47 47 48 48 my $arguments = [ { 'name' => "process_exp", 49 'desc' => "{Base Plugin.process_exp}",49 'desc' => "{BaseImporter.process_exp}", 50 50 'type' => "regexp", 51 51 'reqd' => "no", -
main/trunk/greenstone2/perllib/plugins/GreenstoneXMLPlugin.pm
r31480 r31492 57 57 my $arguments = 58 58 [ { 'name' => "process_exp", 59 'desc' => "{Base Plugin.process_exp}",59 'desc' => "{BaseImporter.process_exp}", 60 60 'type' => "regexp", 61 61 'deft' => &get_default_process_exp(), -
main/trunk/greenstone2/perllib/plugins/HBPlugin.pm
r18327 r31492 41 41 42 42 use ghtml; 43 use Base Plugin;43 use BaseImporter; 44 44 use unicode; 45 45 use util; … … 50 50 51 51 sub BEGIN { 52 @HBPlugin::ISA = ('Base Plugin');52 @HBPlugin::ISA = ('BaseImporter'); 53 53 } 54 54 my $encoding_list = 55 55 [ { 'name' => "ascii", 56 'desc' => "{Base Plugin.encoding.ascii}" },56 'desc' => "{BaseImporter.encoding.ascii}" }, 57 57 { 'name' => "iso_8859_1", 58 58 'desc' => "{HBPlugin.encoding.iso_8859_1}" } ]; … … 60 60 my $arguments = 61 61 [ { 'name' => "process_exp", 62 'desc' => "{Base Plugin.process_exp}",62 'desc' => "{BaseImporter.process_exp}", 63 63 'type' => "regexp", 64 64 'reqd' => "no", … … 86 86 push(@{$hashArgOptLists->{"OptList"}},$options); 87 87 88 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);88 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 89 89 90 90 return bless $self, $class; … … 92 92 93 93 # this is included only to prevent warnings being printed out 94 # from Base Plugin::init. The process_exp is not used by this plugin94 # from BaseImporter::init. The process_exp is not used by this plugin 95 95 sub get_default_process_exp { 96 96 my $self = shift (@_); -
main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm
r31480 r31492 62 62 my $arguments = 63 63 [ { 'name' => "process_exp", 64 'desc' => "{Base Plugin.process_exp}",64 'desc' => "{BaseImporter.process_exp}", 65 65 'type' => "regexp", 66 66 'deft' => &get_default_process_exp() }, 67 67 { 'name' => "block_exp", 68 'desc' => "{Base Plugin.block_exp}",68 'desc' => "{BaseImporter.block_exp}", 69 69 'type' => 'regexp', 70 70 'deft' => &get_default_block_exp() }, … … 127 127 'type' => "flag"}, 128 128 {'name' => "processing_tmp_files", 129 'desc' => "{Base Plugin.processing_tmp_files}",129 'desc' => "{BaseImporter.processing_tmp_files}", 130 130 'type' => "flag", 131 131 'hiddengli' => "yes"} … … 1284 1284 my $filename_encoding = $self->guess_filesystem_encoding(); 1285 1285 1286 # copied this from set_Source_metadata in Base Plugin1286 # copied this from set_Source_metadata in BaseImporter 1287 1287 if ((defined $filename_encoding) && ($filename_encoding ne "ascii")) { 1288 1288 # Use filename_encoding to map raw filename to a Perl unicode-aware string -
main/trunk/greenstone2/perllib/plugins/HathiTrustMETSPlugin.pm
r31480 r31492 82 82 my $arguments = 83 83 [ { 'name' => "process_exp", 84 'desc' => "{Base Plugin.process_exp}",84 'desc' => "{BaseImporter.process_exp}", 85 85 'type' => "string", 86 86 'deft' => &get_default_process_exp(), … … 101 101 # 'reqd' => "no" }, 102 102 {'name' => "processing_tmp_files", 103 'desc' => "{Base Plugin.processing_tmp_files}",103 'desc' => "{BaseImporter.processing_tmp_files}", 104 104 'type' => "flag", 105 105 'hiddengli' => "yes"} … … 141 141 my $rxf_self = new ReadXMLFile($pluginlist, $inputargs, $hashArgOptLists); 142 142 143 my $self = Base Plugin::merge_inheritance($imc_self,$rtf_self,$rxf_self);143 my $self = BaseImporter::merge_inheritance($imc_self,$rtf_self,$rxf_self); 144 144 145 145 # Update $self used by XML::Parser so it finds callback functions … … 188 188 189 189 190 # want to use Base Plugin's version of this, not ReadXMLFile's190 # want to use BaseImporter's version of this, not ReadXMLFile's 191 191 sub can_process_this_file { 192 192 my $self = shift(@_); 193 return $self->Base Plugin::can_process_this_file(@_);193 return $self->BaseImporter::can_process_this_file(@_); 194 194 } 195 195 … … 213 213 } 214 214 215 # we want to use Base Plugin's read, not ReadXMLFile's215 # we want to use BaseImporter's read, not ReadXMLFile's 216 216 sub read 217 217 { 218 218 my $self = shift (@_); 219 219 220 $self->Base Plugin::read(@_);220 $self->BaseImporter::read(@_); 221 221 } 222 222 -
main/trunk/greenstone2/perllib/plugins/ISISPlugin.pm
r31480 r31492 46 46 my $arguments = 47 47 [ { 'name' => "process_exp", 48 'desc' => "{Base Plugin.process_exp}",48 'desc' => "{BaseImporter.process_exp}", 49 49 'type' => "regexp", 50 50 'reqd' => "no", 51 51 'deft' => &get_default_process_exp() }, 52 52 { 'name' => "block_exp", 53 'desc' => "{Base Plugin.block_exp}",53 'desc' => "{BaseImporter.block_exp}", 54 54 'type' => "regexp", 55 55 'reqd' => "no", -
main/trunk/greenstone2/perllib/plugins/ImageConverter.pm
r27787 r31492 155 155 } 156 156 157 # needs to be called after Base Plugininit, so that outhandle is set up.157 # needs to be called after BaseImporter init, so that outhandle is set up. 158 158 sub init { 159 159 my $self = shift(@_); … … 318 318 } 319 319 320 #overwrite the ones added in Base Plugin320 #overwrite the ones added in BaseImporter 321 321 $doc_obj->set_metadata_element ($section, "FileFormat", $type); 322 322 my $sys_file_size = &FileUtils::fileSize($filename_full_path); -
main/trunk/greenstone2/perllib/plugins/ImagePlugin.pm
r27787 r31492 26 26 package ImagePlugin; 27 27 28 use Base Plugin;28 use BaseImporter; 29 29 use ImageConverter; 30 30 … … 36 36 37 37 sub BEGIN { 38 @ImagePlugin::ISA = ('Base Plugin', 'ImageConverter');38 @ImagePlugin::ISA = ('BaseImporter', 'ImageConverter'); 39 39 } 40 40 41 41 my $arguments = 42 42 [ { 'name' => "process_exp", 43 'desc' => "{Base Plugin.process_exp}",43 'desc' => "{BaseImporter.process_exp}", 44 44 'type' => "regexp", 45 45 'deft' => &get_default_process_exp(), … … 65 65 66 66 new ImageConverter($pluginlist, $inputargs, $hashArgOptLists); 67 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);67 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 68 68 69 69 return bless $self, $class; -
main/trunk/greenstone2/perllib/plugins/IndexPlugin.pm
r16392 r31492 53 53 54 54 use plugin; 55 use Base Plugin;55 use BaseImporter; 56 56 use doc; 57 57 use util; … … 62 62 63 63 sub BEGIN { 64 @IndexPlugin::ISA = ('Base Plugin');64 @IndexPlugin::ISA = ('BaseImporter'); 65 65 } 66 66 … … 81 81 push(@{$hashArgOptLists->{"OptList"}},$options); 82 82 83 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);83 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 84 84 85 85 return bless $self, $class; -
main/trunk/greenstone2/perllib/plugins/LOMPlugin.pm
r28560 r31492 52 52 my $arguments = 53 53 [ { 'name' => "process_exp", 54 'desc' => "{Base Plugin.process_exp}",54 'desc' => "{BaseImporter.process_exp}", 55 55 'type' => "string", 56 56 'deft' => &get_default_process_exp(), -
main/trunk/greenstone2/perllib/plugins/LaTeXPlugin.pm
r24548 r31492 40 40 my $arguments = 41 41 [ { 'name' => "process_exp", 42 'desc' => "{Base Plugin.process_exp}",42 'desc' => "{BaseImporter.process_exp}", 43 43 'type' => "regexp", 44 44 'reqd' => "no", -
main/trunk/greenstone2/perllib/plugins/MARCPlugin.pm
r29476 r31492 42 42 # precedence in the order given in the ISA list. We want MetaPlugins to 43 43 # call MetadataRead's can_process_this_file_for_metadata(), rather than 44 # calling Base Plugin's version of the same method, so list inherited44 # calling BaseImporter's version of the same method, so list inherited 45 45 # superclasses in this order. 46 46 sub BEGIN { … … 62 62 'reqd' => "no" }, 63 63 { 'name' => "process_exp", 64 'desc' => "{Base Plugin.process_exp}",64 'desc' => "{BaseImporter.process_exp}", 65 65 'type' => "regexp", 66 66 'reqd' => "no", -
main/trunk/greenstone2/perllib/plugins/MARCXMLPlugin.pm
r28803 r31492 49 49 'reqd' => "no" }, 50 50 { 'name' => "process_exp", 51 'desc' => "{Base Plugin.process_exp}",51 'desc' => "{BaseImporter.process_exp}", 52 52 'type' => "regexp", 53 53 'deft' => &get_default_process_exp(), -
main/trunk/greenstone2/perllib/plugins/MP3Plugin.pm
r24225 r31492 28 28 package MP3Plugin; 29 29 30 use Base Plugin;30 use BaseImporter; 31 31 32 32 use strict; … … 39 39 40 40 sub BEGIN { 41 @MP3Plugin::ISA = ('Base Plugin');41 @MP3Plugin::ISA = ('BaseImporter'); 42 42 } 43 43 44 44 my $arguments = 45 45 [ { 'name' => "process_exp", 46 'desc' => "{Base Plugin.process_exp}",46 'desc' => "{BaseImporter.process_exp}", 47 47 'type' => "regexp", 48 48 'deft' => &get_default_process_exp(), … … 62 62 'deft' => "Title,Artist,Genre" }, 63 63 { 'name' => "file_rename_method", 64 'desc' => "{Base Plugin.file_rename_method}",64 'desc' => "{BaseImporter.file_rename_method}", 65 65 'type' => "enum", 66 66 'deft' => &get_default_file_rename_method(), # by default rename imported files and assoc files using this encoding 67 'list' => $Base Plugin::file_rename_method_list,67 'list' => $BaseImporter::file_rename_method_list, 68 68 'reqd' => "no" 69 69 } ]; … … 83 83 push(@{$hashArgOptLists->{"OptList"}},$options); 84 84 85 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);85 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 86 86 87 87 return bless $self, $class; … … 120 120 } 121 121 122 my $text = &gsprintf::lookup_string("{Base Plugin.dummy_text}",1);122 my $text = &gsprintf::lookup_string("{BaseImporter.dummy_text}",1); 123 123 if ($self->{'assoc_images'}) { 124 124 $text .= "[img1]<br>"; … … 338 338 339 339 340 # we want to use ex.id3.Title if its there, otherwise we'll use Base Pluginmethod340 # we want to use ex.id3.Title if its there, otherwise we'll use BaseImporter method 341 341 sub title_fallback 342 342 { … … 350 350 } 351 351 else { 352 $self->Base Plugin::title_fallback($doc_obj, $section, $file);352 $self->BaseImporter::title_fallback($doc_obj, $section, $file); 353 353 } 354 354 } -
main/trunk/greenstone2/perllib/plugins/MediainfoOGVPlugin.pm
r24546 r31492 50 50 package MediainfoOGVPlugin; 51 51 52 use Base Plugin;52 use BaseImporter; 53 53 54 54 use strict; … … 57 57 58 58 sub BEGIN { 59 @MediainfoOGVPlugin::ISA = ('Base Plugin');59 @MediainfoOGVPlugin::ISA = ('BaseImporter'); 60 60 } 61 61 62 62 my $arguments = 63 63 [ { 'name' => "process_exp", 64 'desc' => "{Base Plugin.process_exp}",64 'desc' => "{BaseImporter.process_exp}", 65 65 'type' => "regexp", 66 66 'deft' => &get_default_process_exp(), … … 88 88 push(@{$hashArgOptLists->{"OptList"}},$options); 89 89 90 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);90 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 91 91 92 92 return bless $self, $class; … … 97 97 my ($verbosity, $outhandle, $failhandle) = @_; 98 98 99 $self->Base Plugin::init($verbosity, $outhandle, $failhandle);99 $self->BaseImporter::init($verbosity, $outhandle, $failhandle); 100 100 101 101 # Check that Mediainfo is installed and available on the path (except for Windows 95/98) -
main/trunk/greenstone2/perllib/plugins/MetadataCSVPlugin.pm
r31480 r31492 28 28 29 29 30 use Base Plugin;30 use BaseImporter; 31 31 use MetadataRead; 32 32 … … 42 42 # methods with identical signatures take precedence in the order given in the ISA list. 43 43 sub BEGIN { 44 @MetadataCSVPlugin::ISA = ('MetadataRead', 'Base Plugin');44 @MetadataCSVPlugin::ISA = ('MetadataRead', 'BaseImporter'); 45 45 } 46 46 … … 48 48 my $arguments = [ 49 49 { 'name' => "process_exp", 50 'desc' => "{Base Plugin.process_exp}",50 'desc' => "{BaseImporter.process_exp}", 51 51 'type' => "regexp", 52 52 'reqd' => "no", … … 72 72 push(@{$hashArgOptLists->{"OptList"}},$options); 73 73 74 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);74 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 75 75 76 76 return bless $self, $class; -
main/trunk/greenstone2/perllib/plugins/MetadataRead.pm
r24547 r31492 38 38 39 39 # MetadataRead defines method can_process_this_file_for_metadata() with identical 40 # signature to Base Plugin. (MetadataRead doesn't inherit from BasePlugin, so it's40 # signature to BaseImporter. (MetadataRead doesn't inherit from BaseImporter, so it's 41 41 # not 'overriding' it.) Subclasses of MetadataRead that want to use this method 42 # definition can override their inherited Base Pluginversion of the method by42 # definition can override their inherited BaseImporter version of the method by 43 43 # listing MetadataRead as the *first* superclass they inherit from in the ISA list. 44 44 # This is the way Perl resolves conflicting method definitions. -
main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm
r31480 r31492 92 92 use Encode; 93 93 94 use Base Plugin;94 use BaseImporter; 95 95 use extrametautil; 96 96 use util; … … 99 99 100 100 sub BEGIN { 101 @MetadataXMLPlugin::ISA = ('Base Plugin');101 @MetadataXMLPlugin::ISA = ('BaseImporter'); 102 102 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan"); 103 103 } … … 107 107 my $arguments = [ 108 108 { 'name' => "process_exp", 109 'desc' => "{Base Plugin.process_exp}",109 'desc' => "{BaseImporter.process_exp}", 110 110 'type' => "regexp", 111 111 'reqd' => "no", … … 128 128 push(@{$hashArgOptLists->{"OptList"}},$options); 129 129 130 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);130 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 131 131 132 132 if ($self->{'info_only'}) { -
main/trunk/greenstone2/perllib/plugins/NulPlugin.pm
r24548 r31492 37 37 package NulPlugin; 38 38 39 use Base Plugin;39 use BaseImporter; 40 40 use MetadataRead; 41 41 … … 44 44 45 45 sub BEGIN { 46 @NulPlugin::ISA = ('MetadataRead', 'Base Plugin');46 @NulPlugin::ISA = ('MetadataRead', 'BaseImporter'); 47 47 } 48 48 49 49 my $arguments = 50 50 [ { 'name' => "process_exp", 51 'desc' => "{Base Plugin.process_exp}",51 'desc' => "{BaseImporter.process_exp}", 52 52 'type' => "regexp", 53 53 'reqd' => "no", … … 81 81 push(@{$hashArgOptLists->{"OptList"}},$options); 82 82 83 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);83 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 84 84 85 85 return bless $self, $class; -
main/trunk/greenstone2/perllib/plugins/OAIPlugin.pm
r27283 r31492 57 57 my $arguments = 58 58 [ { 'name' => "process_exp", 59 'desc' => "{Base Plugin.process_exp}",59 'desc' => "{BaseImporter.process_exp}", 60 60 'type' => "regexp", 61 61 'reqd' => "no", -
main/trunk/greenstone2/perllib/plugins/OggVorbisPlugin.pm
r24225 r31492 30 30 31 31 32 use Base Plugin;32 use BaseImporter; 33 33 use Ogg::Vorbis::Header::PurePerl; 34 34 … … 38 38 39 39 sub BEGIN { 40 @OggVorbisPlugin::ISA = ('Base Plugin');40 @OggVorbisPlugin::ISA = ('BaseImporter'); 41 41 } 42 42 … … 44 44 my $arguments = 45 45 [ { 'name' => "process_exp", 46 'desc' => "{Base Plugin.process_exp}",46 'desc' => "{BaseImporter.process_exp}", 47 47 'type' => "string", 48 48 'deft' => &get_default_process_exp(), … … 53 53 'deft' => "" }, 54 54 { 'name' => "file_rename_method", 55 'desc' => "{Base Plugin.file_rename_method}",55 'desc' => "{BaseImporter.file_rename_method}", 56 56 'type' => "enum", 57 57 'deft' => &get_default_file_rename_method(), # by default rename imported files and assoc files using this encoding 58 'list' => $Base Plugin::file_rename_method_list,58 'list' => $BaseImporter::file_rename_method_list, 59 59 'reqd' => "no" 60 60 } ]; … … 88 88 push(@{$hashArgOptLists->{"OptList"}},$options); 89 89 90 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);90 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 91 91 92 92 return bless $self, $class; -
main/trunk/greenstone2/perllib/plugins/OpenDocumentPlugin.pm
r28285 r31492 56 56 my $arguments = [ 57 57 { 'name' => "process_exp", 58 'desc' => "{Base Plugin.process_exp}",58 'desc' => "{BaseImporter.process_exp}", 59 59 'type' => "regexp", 60 60 'deft' => &get_default_process_exp() } … … 85 85 } 86 86 87 # want to use Base Plugin's version of this, not ReadXMLFile's87 # want to use BaseImporter's version of this, not ReadXMLFile's 88 88 sub can_process_this_file { 89 89 my $self = shift(@_); 90 90 91 return $self->Base Plugin::can_process_this_file(@_);91 return $self->BaseImporter::can_process_this_file(@_); 92 92 } 93 93 -
main/trunk/greenstone2/perllib/plugins/PDFPlugin.pm
r30742 r31492 62 62 'deft' => "html" }, 63 63 { 'name' => "process_exp", 64 'desc' => "{Base Plugin.process_exp}",64 'desc' => "{BaseImporter.process_exp}", 65 65 'type' => "regexp", 66 66 'deft' => &get_default_process_exp(), 67 67 'reqd' => "no" }, 68 68 { 'name' => "block_exp", 69 'desc' => "{Base Plugin.block_exp}",69 'desc' => "{BaseImporter.block_exp}", 70 70 'type' => "regexp", 71 71 'deft' => &get_default_block_exp() }, … … 126 126 my $auto_converter_self = new AutoLoadConverters($pluginlist,$inputargs,$hashArgOptLists,["PDFBoxConverter"],1); 127 127 my $cbf_self = new ConvertBinaryFile($pluginlist, $inputargs, $hashArgOptLists); 128 my $self = Base Plugin::merge_inheritance($auto_converter_self, $cbf_self);128 my $self = BaseImporter::merge_inheritance($auto_converter_self, $cbf_self); 129 129 130 130 if ($self->{'info_only'}) { -
main/trunk/greenstone2/perllib/plugins/PagedImagePlugin.pm
r31480 r31492 169 169 my $arguments = 170 170 [ { 'name' => "process_exp", 171 'desc' => "{Base Plugin.process_exp}",171 'desc' => "{BaseImporter.process_exp}", 172 172 'type' => "string", 173 173 'deft' => &get_default_process_exp(), … … 188 188 # 'reqd' => "no" }, 189 189 {'name' => "processing_tmp_files", 190 'desc' => "{Base Plugin.processing_tmp_files}",190 'desc' => "{BaseImporter.processing_tmp_files}", 191 191 'type' => "flag", 192 192 'hiddengli' => "yes"} … … 228 228 my $rxf_self = new ReadXMLFile($pluginlist, $inputargs, $hashArgOptLists); 229 229 230 my $self = Base Plugin::merge_inheritance($imc_self,$rtf_self,$rxf_self);230 my $self = BaseImporter::merge_inheritance($imc_self,$rtf_self,$rxf_self); 231 231 232 232 # Update $self used by XML::Parser so it finds callback functions … … 275 275 276 276 277 # want to use Base Plugin's version of this, not ReadXMLFile's277 # want to use BaseImporter's version of this, not ReadXMLFile's 278 278 sub can_process_this_file { 279 279 my $self = shift(@_); 280 return $self->Base Plugin::can_process_this_file(@_);280 return $self->BaseImporter::can_process_this_file(@_); 281 281 } 282 282 … … 307 307 } 308 308 309 # we want to use Base Plugin's read, not ReadXMLFile's309 # we want to use BaseImporter's read, not ReadXMLFile's 310 310 sub read 311 311 { 312 312 my $self = shift (@_); 313 313 314 $self->Base Plugin::read(@_);314 $self->BaseImporter::read(@_); 315 315 } 316 316 -
main/trunk/greenstone2/perllib/plugins/PostScriptPlugin.pm
r22874 r31492 58 58 'deft' => "text" }, 59 59 { 'name' => "process_exp", 60 'desc' => "{Base Plugin.process_exp}",60 'desc' => "{BaseImporter.process_exp}", 61 61 'type' => "regexp", 62 62 'deft' => &get_default_process_exp(), 63 63 'reqd' => "no" }, 64 64 { 'name' => "block_exp", 65 'desc' => "{Base Plugin.block_exp}",65 'desc' => "{BaseImporter.block_exp}", 66 66 'type' => 'regexp', 67 67 'deft' => &get_default_block_exp() }, -
main/trunk/greenstone2/perllib/plugins/PowerPointPlugin.pm
r25192 r31492 79 79 my $arguments = 80 80 [ { 'name' => "process_exp", 81 'desc' => "{Base Plugin.process_exp}",81 'desc' => "{BaseImporter.process_exp}", 82 82 'type' => "regexp", 83 83 'reqd' => "no", … … 154 154 155 155 my $cbf_self = new ConvertBinaryFile($pluginlist, $inputargs, $hashArgOptLists); 156 my $self = Base Plugin::merge_inheritance($auto_converter_self, $cbf_self);156 my $self = BaseImporter::merge_inheritance($auto_converter_self, $cbf_self); 157 157 158 158 if ($self->{'info_only'}) { … … 296 296 # we are only doing something special for html_multi 297 297 if (!($self->{'openoffice_conversion'} && $self->{'convert_to'} eq "html_multi")) { 298 return $self->Base Plugin::read(@_);298 return $self->BaseImporter::read(@_); 299 299 } 300 300 my $outhandle = $self->{'outhandle'}; -
main/trunk/greenstone2/perllib/plugins/ProCitePlugin.pm
r24548 r31492 43 43 my $arguments = 44 44 [ { 'name' => "process_exp", 45 'desc' => "{Base Plugin.process_exp}",45 'desc' => "{BaseImporter.process_exp}", 46 46 'type' => "regexp", 47 47 'reqd' => "no", -
main/trunk/greenstone2/perllib/plugins/RTFPlugin.pm
r22874 r31492 48 48 'deft' => "html" }, 49 49 { 'name' => "process_exp", 50 'desc' => "{Base Plugin.process_exp}",50 'desc' => "{BaseImporter.process_exp}", 51 51 'type' => "regexp", 52 52 'deft' => &get_default_process_exp(), -
main/trunk/greenstone2/perllib/plugins/ReadTextFile.pm
r31458 r31492 49 49 [ { 'name' => "auto", 50 50 'desc' => "{ReadTextFile.input_encoding.auto}" } ]; 51 push(@{$encoding_plus_auto_list},@{$ EncodingUtil::encoding_list});51 push(@{$encoding_plus_auto_list},@{$CommonUtil::encoding_list}); 52 52 53 53 my $arguments = … … 61 61 'desc' => "{ReadTextFile.default_encoding}", 62 62 'type' => "enum", 63 'list' => $ EncodingUtil::encoding_list,63 'list' => $CommonUtil::encoding_list, 64 64 'reqd' => "no", 65 65 'deft' => "utf8" }, -
main/trunk/greenstone2/perllib/plugins/ReadXMLFile.pm
r28836 r31492 26 26 package ReadXMLFile; 27 27 28 use Base Plugin;28 use BaseImporter; 29 29 use doc; 30 30 use strict; … … 32 32 33 33 sub BEGIN { 34 @ReadXMLFile::ISA = ('Base Plugin');34 @ReadXMLFile::ISA = ('BaseImporter'); 35 35 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan"); 36 36 } … … 40 40 my $arguments = 41 41 [ { 'name' => "process_exp", 42 'desc' => "{Base Plugin.process_exp}",42 'desc' => "{BaseImporter.process_exp}", 43 43 'type' => "regexp", 44 44 'deft' => &get_default_process_exp(), … … 64 64 push(@{$hashArgOptLists->{"OptList"}},$options); 65 65 66 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);66 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 67 67 68 68 if ($self->{'info_only'}) { … … 385 385 $self->set_Source_metadata($doc_obj, $filename_full_path, $filename_encoding); 386 386 387 # do we want other auto metadata here (see Base Plugin.read_into_doc_obj)387 # do we want other auto metadata here (see BaseImporter.read_into_doc_obj) 388 388 } 389 389 … … 392 392 my $doc_obj = $self->{'doc_obj'}; 393 393 394 # do we want other auto stuff here, see Base Plugin.read_into_doc_obj394 # do we want other auto stuff here, see BaseImporter.read_into_doc_obj 395 395 396 396 # include any metadata passed in from previous plugins -
main/trunk/greenstone2/perllib/plugins/RealMediaPlugin.pm
r24225 r31492 30 30 31 31 32 use Base Plugin;32 use BaseImporter; 33 33 use rm::Header::PurePerl; 34 34 … … 38 38 39 39 sub BEGIN { 40 @RealMediaPlugin::ISA = ('Base Plugin');40 @RealMediaPlugin::ISA = ('BaseImporter'); 41 41 } 42 42 … … 44 44 my $arguments = 45 45 [ { 'name' => "process_exp", 46 'desc' => "{Base Plugin.process_exp}",46 'desc' => "{BaseImporter.process_exp}", 47 47 'type' => "regexp", 48 48 'deft' => &get_default_process_exp(), … … 72 72 push(@{$hashArgOptLists->{"OptList"}}, $options); 73 73 74 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);74 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 75 75 76 76 return bless $self, $class; -
main/trunk/greenstone2/perllib/plugins/ReferPlugin.pm
r24548 r31492 68 68 no strict 'refs'; # allow filehandles to be variables and viceversa 69 69 70 # ReferPlugin is a sub-class of Base Plugin.70 # ReferPlugin is a sub-class of BaseImporter. 71 71 sub BEGIN { 72 72 @ReferPlugin::ISA = ('MetadataRead', 'SplitTextFile'); … … 75 75 my $arguments = 76 76 [ { 'name' => "process_exp", 77 'desc' => "{Base Plugin.process_exp}",77 'desc' => "{BaseImporter.process_exp}", 78 78 'type' => "regexp", 79 79 'deft' => &get_default_process_exp(), -
main/trunk/greenstone2/perllib/plugins/RogPlugin.pm
r24548 r31492 28 28 package RogPlugin; 29 29 30 use Base Plugin;30 use BaseImporter; 31 31 use MetadataRead; 32 32 use sorttools; … … 37 37 38 38 sub BEGIN { 39 @RogPlugin::ISA = ('MetadataRead', 'Base Plugin');39 @RogPlugin::ISA = ('MetadataRead', 'BaseImporter'); 40 40 } 41 41 42 42 my $arguments = 43 43 [ { 'name' => "process_exp", 44 'desc' => "{Base Plugin.process_exp}",44 'desc' => "{BaseImporter.process_exp}", 45 45 'type' => "regexp", 46 46 'reqd' => "no", … … 62 62 push(@{$hashArgOptLists->{"OptList"}},$options); 63 63 64 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);64 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 65 65 66 66 return bless $self, $class; -
main/trunk/greenstone2/perllib/plugins/SourceCodePlugin.pm
r24548 r31492 49 49 my $arguments = 50 50 [ { 'name' => "process_exp", 51 'desc' => "{Base Plugin.process_exp}",51 'desc' => "{BaseImporter.process_exp}", 52 52 'type' => "regexp", 53 53 'deft' => &get_default_process_exp(), 54 54 'reqd' => "no" } , 55 55 { 'name' => "block_exp", 56 'desc' => "{Base Plugin.block_exp}",56 'desc' => "{BaseImporter.block_exp}", 57 57 'type' => "regexp", 58 58 'deft' => &get_default_block_exp(), -
main/trunk/greenstone2/perllib/plugins/TabSeparatedPlugin.pm
r28782 r31492 44 44 my $arguments = 45 45 [ { 'name' => "process_exp", 46 'desc' => "{Base Plugin.process_exp}",46 'desc' => "{BaseImporter.process_exp}", 47 47 'type' => "regexp", 48 48 'reqd' => "no", -
main/trunk/greenstone2/perllib/plugins/TextPlugin.pm
r30857 r31492 41 41 my $arguments = 42 42 [ { 'name' => "process_exp", 43 'desc' => "{Base Plugin.process_exp}",43 'desc' => "{BaseImporter.process_exp}", 44 44 'type' => "regexp", 45 45 'deft' => &get_default_process_exp(), -
main/trunk/greenstone2/perllib/plugins/UnknownPlugin.pm
r24225 r31492 56 56 package UnknownPlugin; 57 57 58 use Base Plugin;58 use BaseImporter; 59 59 60 60 use strict; … … 62 62 63 63 sub BEGIN { 64 @UnknownPlugin::ISA = ('Base Plugin');64 @UnknownPlugin::ISA = ('BaseImporter'); 65 65 } 66 66 … … 107 107 push(@{$hashArgOptLists->{"OptList"}},$options); 108 108 109 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);109 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 110 110 111 111 # "-process_extension" is a simpler alternative to -process_exp for non-regexp people -
main/trunk/greenstone2/perllib/plugins/WordPlugin.pm
r28563 r31492 42 42 my $arguments = 43 43 [ { 'name' => "process_exp", 44 'desc' => "{Base Plugin.process_exp}",44 'desc' => "{BaseImporter.process_exp}", 45 45 'type' => "regexp", 46 46 'deft' => "&get_default_process_exp()", # delayed (see below) … … 142 142 143 143 my $cbf_self = new ConvertBinaryFile($pluginlist, $inputargs, $hashArgOptLists); 144 my $self = Base Plugin::merge_inheritance($auto_converter_self, $cbf_self);144 my $self = BaseImporter::merge_inheritance($auto_converter_self, $cbf_self); 145 145 146 146 if ($self->{'info_only'}) { -
main/trunk/greenstone2/perllib/plugins/ZIPPlugin.pm
r27927 r31492 46 46 package ZIPPlugin; 47 47 48 use Base Plugin;48 use BaseImporter; 49 49 use plugin; 50 50 use util; … … 56 56 57 57 BEGIN { 58 @ZIPPlugin::ISA = ('Base Plugin');58 @ZIPPlugin::ISA = ('BaseImporter'); 59 59 } 60 60 61 61 my $arguments = 62 62 [ { 'name' => "process_exp", 63 'desc' => "{Base Plugin.process_exp}",63 'desc' => "{BaseImporter.process_exp}", 64 64 'type' => "string", 65 65 'deft' => &get_default_process_exp(), … … 81 81 push(@{$hashArgOptLists->{"OptList"}},$options); 82 82 83 my $self = new Base Plugin($pluginlist, $inputargs, $hashArgOptLists);83 my $self = new BaseImporter($pluginlist, $inputargs, $hashArgOptLists); 84 84 85 85 return bless $self, $class;
Note:
See TracChangeset
for help on using the changeset viewer.