Changeset 17207
- Timestamp:
- 2008-09-08T11:35:57+12:00 (16 years ago)
- Location:
- gsdl/trunk/perllib/downloaders
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/downloaders/BaseDownload.pm
r17206 r17207 1 1 ########################################################################### 2 2 # 3 # Bas Download.pm -- base class for all the Download modules3 # BaseDownload.pm -- base class for all the Download modules 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 Bas Download;26 package BaseDownload; 27 27 28 28 eval {require bytes}; … … 41 41 my $arguments = []; 42 42 43 my $options = { 'name' => "Bas Download",44 'desc' => "{Bas Download.desc}",43 my $options = { 'name' => "BaseDownload", 44 'desc' => "{BaseDownload.desc}", 45 45 'abstract' => "yes", 46 46 'inherits' => "no" }; … … 53 53 my $strDownloadName = (defined $downloadlist->[0]) ? $downloadlist->[0] : $class; 54 54 55 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}56 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};55 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 56 push(@{$hashArgOptLists->{"OptList"}},$options); 57 57 58 58 my $self = {}; … … 78 78 my $classTempClass = bless $self, $class; 79 79 print STDERR "<BadDownload d=$self->{'download_name'}>\n"; 80 &gsprintf(STDERR, "\n{Bas Download.bad_general_option}\n", $self->{'download_name'});80 &gsprintf(STDERR, "\n{BaseDownload.bad_general_option}\n", $self->{'download_name'}); 81 81 $classTempClass->print_txt_usage(""); # Use default resource bundle 82 82 die "\n"; … … 233 233 my ($strFunctionName,$strError) = @_; 234 234 { 235 print "Error occoured in Bas Download.pm\n".235 print "Error occoured in BaseDownload.pm\n". 236 236 "In Function: ".$strFunctionName."\n". 237 237 "Error Message: ".$strError."\n"; -
gsdl/trunk/perllib/downloaders/MediaWikiDownload.pm
r14248 r17207 94 94 push(@$getlist, $class); 95 95 96 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}97 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};98 99 my $self = (defined $hashArgOptLists)? new WgetDownload($getlist,$inputargs,$hashArgOptLists): new WgetDownload($getlist,$inputargs);96 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 97 push(@{$hashArgOptLists->{"OptList"}},$options); 98 99 my $self = new WgetDownload($getlist,$inputargs,$hashArgOptLists); 100 100 101 101 return bless $self, $class; -
gsdl/trunk/perllib/downloaders/OAIDownload.pm
r16791 r17207 96 96 push(@$getlist, $class); 97 97 98 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}99 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};100 101 my $self = (defined $hashArgOptLists)? new WgetDownload($getlist,$inputargs,$hashArgOptLists): new WgetDownload($getlist,$inputargs);98 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 99 push(@{$hashArgOptLists->{"OptList"}},$options); 100 101 my $self = new WgetDownload($getlist,$inputargs,$hashArgOptLists); 102 102 103 103 if ($self->{'info_only'}) { -
gsdl/trunk/perllib/downloaders/SRWDownload.pm
r12902 r17207 41 41 } 42 42 43 my $arguments; 43 my $arguments = [ 44 ]; 44 45 45 46 my $options = { 'name' => "SRWDownload", … … 56 57 push(@$getlist, $class); 57 58 58 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}59 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};60 61 my $self = (defined $hashArgOptLists)? new Z3950Download($getlist,$inputargs,$hashArgOptLists): new Z3950Download($getlist,$inputargs);59 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 60 push(@{$hashArgOptLists->{"OptList"}},$options); 61 62 my $self = new Z3950Download($getlist,$inputargs,$hashArgOptLists); 62 63 63 64 if ($self->{'info_only'}) { -
gsdl/trunk/perllib/downloaders/WebDownload.pm
r14657 r17207 86 86 push(@$getlist, $class); 87 87 88 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}89 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};90 91 my $self = (defined $hashArgOptLists)? new WgetDownload($getlist,$inputargs,$hashArgOptLists): new WgetDownload($getlist,$inputargs);88 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 89 push(@{$hashArgOptLists->{"OptList"}},$options); 90 91 my $self = new WgetDownload($getlist,$inputargs,$hashArgOptLists); 92 92 93 93 return bless $self, $class; -
gsdl/trunk/perllib/downloaders/WgetDownload.pm
r16791 r17207 32 32 $SIG{__WARN__} = sub {warn($_[0]) unless ($_[0] =~ /Subroutine\s+\S+\sredefined/)}; 33 33 34 use Bas Download;34 use BaseDownload; 35 35 use strict; 36 36 use IPC::Open2; … … 38 38 39 39 sub BEGIN { 40 @WgetDownload::ISA = ('Bas Download');40 @WgetDownload::ISA = ('BaseDownload'); 41 41 } 42 42 … … 80 80 push(@$getlist, $class); 81 81 82 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}83 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};84 85 my $self = (defined $hashArgOptLists)? new BasDownload($getlist,$inputargs,$hashArgOptLists): new BasDownload($getlist,$inputargs);82 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 83 push(@{$hashArgOptLists->{"OptList"}},$options); 84 85 my $self = new BaseDownload($getlist,$inputargs,$hashArgOptLists); 86 86 87 87 return bless $self, $class; -
gsdl/trunk/perllib/downloaders/Z3950Download.pm
r13019 r17207 34 34 use strict; 35 35 36 use Bas Download;36 use BaseDownload; 37 37 use IPC::Open2; 38 38 39 39 sub BEGIN { 40 @Z3950Download::ISA = ('Bas Download');40 @Z3950Download::ISA = ('BaseDownload'); 41 41 } 42 42 … … 83 83 push(@$getlist, $class); 84 84 85 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}86 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};87 88 my $self = (defined $hashArgOptLists)? new BasDownload($getlist,$inputargs,$hashArgOptLists): new BasDownload($getlist,$inputargs);85 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 86 push(@{$hashArgOptLists->{"OptList"}},$options); 87 88 my $self = new BaseDownload($getlist,$inputargs,$hashArgOptLists); 89 89 90 90 if ($self->{'info_only'}) {
Note:
See TracChangeset
for help on using the changeset viewer.