Changeset 17209
- Timestamp:
- 2008-09-08T12:35:53+12:00 (16 years ago)
- Location:
- gsdl/trunk/perllib/classify
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/classify/AZCompactList.pm
r12891 r17209 24 24 ########################################################################### 25 25 # classifier plugin for sorting alphabetically 26 # options are:27 26 28 27 package AZCompactList; 29 28 30 use Bas Clas;29 use BaseClassifier; 31 30 use sorttools; 32 31 … … 35 34 36 35 sub BEGIN { 37 @AZCompactList::ISA = ('Bas Clas');36 @AZCompactList::ISA = ('BaseClassifier'); 38 37 } 39 38 … … 123 122 push(@$pluginlist, $class); 124 123 125 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}126 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};127 128 my $self = new Bas Clas($pluginlist, $inputargs, $hashArgOptLists);124 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 125 push(@{$hashArgOptLists->{"OptList"}},$options); 126 127 my $self = new BaseClassifier($pluginlist, $inputargs, $hashArgOptLists); 129 128 130 129 if ($self->{'info_only'}) { -
gsdl/trunk/perllib/classify/AZCompactSectionList.pm
r12891 r17209 31 31 push(@$classifierslist, $class); 32 32 33 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}34 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};35 33 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 34 push(@{$hashArgOptLists->{"OptList"}},$options); 35 36 36 my $self = new AZCompactList($classifierslist, $inputargs, $hashArgOptLists); 37 37 -
gsdl/trunk/perllib/classify/AZList.pm
r15891 r17209 28 28 package AZList; 29 29 30 use Bas Clas;30 use BaseClassifier; 31 31 use sorttools; 32 32 … … 35 35 36 36 sub BEGIN { 37 @AZList::ISA = ('Bas Clas');37 @AZList::ISA = ('BaseClassifier'); 38 38 } 39 39 … … 68 68 push(@$classifierslist, $class); 69 69 70 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}71 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};72 73 my $self = new Bas Clas($classifierslist, $inputargs, $hashArgOptLists);70 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 71 push(@{$hashArgOptLists->{"OptList"}},$options); 72 73 my $self = new BaseClassifier($classifierslist, $inputargs, $hashArgOptLists); 74 74 75 75 if ($self->{'info_only'}) { -
gsdl/trunk/perllib/classify/AZSectionList.pm
r12891 r17209 61 61 push(@$classifierslist, $class); 62 62 63 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}64 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};63 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 64 push(@{$hashArgOptLists->{"OptList"}},$options); 65 65 66 66 my $self = new AZList($classifierslist, $inputargs, $hashArgOptLists); -
gsdl/trunk/perllib/classify/AllList.pm
r12891 r17209 26 26 package AllList; 27 27 28 use Bas Clas;28 use BaseClassifier; 29 29 30 30 use strict; … … 32 32 33 33 sub BEGIN { 34 @AllList::ISA = ('Bas Clas');34 @AllList::ISA = ('BaseClassifier'); 35 35 } 36 36 … … 41 41 my $options = { 'name' => "AllList", 42 42 'desc' => "{AllList.desc}", 43 'abstract' => " no",43 'abstract' => "yes", # hide from gli 44 44 'inherits' => "yes" }; 45 45 … … 49 49 push(@$classifierslist, $class); 50 50 51 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}52 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};51 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 52 push(@{$hashArgOptLists->{"OptList"}},$options); 53 53 54 my $self = new Bas Clas($classifierslist, $inputargs, $hashArgOptLists);54 my $self = new BaseClassifier($classifierslist, $inputargs, $hashArgOptLists); 55 55 56 56 if ($self->{'info_only'}) { -
gsdl/trunk/perllib/classify/BaseClassifier.pm
r17208 r17209 1 1 ########################################################################### 2 2 # 3 # Bas Clas.pm -- base class for all classifiers3 # BaseClassifier.pm -- base class for all classifiers 4 4 # 5 5 # A component of the Greenstone digital library software … … 25 25 ########################################################################### 26 26 27 package Bas Clas;27 package BaseClassifier; 28 28 29 29 # How a classifier works. 30 30 # 31 31 # For each classifier requested in the collect.cfg file, buildcol.pl creates 32 # a new classifier object (a subclass of Bas Clas). Later, it passes each32 # a new classifier object (a subclass of BaseClassifier). Later, it passes each 33 33 # document object to each classifier in turn for classification. 34 34 # … … 95 95 ]; 96 96 97 my $options = { 'name' => "Bas Clas",97 my $options = { 'name' => "BaseClassifier", 98 98 'desc' => "{BasClas.desc}", 99 99 'abstract' => "yes", … … 243 243 my $classifier_name = (defined $classifierslist->[0]) ? $classifierslist->[0] : $class; 244 244 245 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}246 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};245 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 246 push(@{$hashArgOptLists->{"OptList"}},$options); 247 247 248 248 … … 303 303 304 304 my $outhandle = $self->{'outhandle'}; 305 &gsprintf($outhandle, "Bas Class::classify {common.must_be_implemented}\n");305 &gsprintf($outhandle, "BaseClassifier::classify {common.must_be_implemented}\n"); 306 306 } 307 307 … … 310 310 311 311 my $outhandle = $self->{'outhandle'}; 312 &gsprintf($outhandle, "Bas Class::get_classify_info {common.must_be_implemented}\n");312 &gsprintf($outhandle, "BaseClassifier::get_classify_info {common.must_be_implemented}\n"); 313 313 } 314 314 -
gsdl/trunk/perllib/classify/Browse.pm
r12891 r17209 1 1 ########################################################################### 2 2 # 3 # List.pm --3 # Browse.pm -- 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 # 12/05/02 Added usage datastructure - John Thompson27 28 26 package Browse; 29 27 30 use Bas Clas;28 use BaseClassifier; 31 29 use sorttools; 32 30 … … 35 33 36 34 sub BEGIN { 37 @Browse::ISA = ('Bas Clas');35 @Browse::ISA = ('BaseClassifier'); 38 36 } 39 37 … … 51 49 push(@$classifierslist, $class); 52 50 53 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}54 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};51 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 52 push(@{$hashArgOptLists->{"OptList"}},$options); 55 53 56 my $self = new Bas Clas($classifierslist, $inputargs, $hashArgOptLists);54 my $self = new BaseClassifier($classifierslist, $inputargs, $hashArgOptLists); 57 55 58 56 if ($self->{'info_only'}) { -
gsdl/trunk/perllib/classify/Collage.pm
r12891 r17209 26 26 package Collage; 27 27 28 use Bas Clas;28 use BaseClassifier; 29 29 use sorttools; 30 30 … … 33 33 34 34 sub BEGIN { 35 @Collage::ISA = ('Bas Clas');35 @Collage::ISA = ('BaseClassifier'); 36 36 } 37 37 … … 57 57 'deft' => "500"}, 58 58 # { 'name' => "maxDownloads", 59 # 'desc' => "{ BasClas.maxDownloads}",59 # 'desc' => "{Collage.maxDownloads}", 60 60 # 'type' => "string", 61 61 # 'deft' => "", … … 113 113 push(@$classifierslist, $class); 114 114 115 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}116 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};117 118 my $self = new Bas Clas($classifierslist, $inputargs, $hashArgOptLists);115 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 116 push(@{$hashArgOptLists->{"OptList"}},$options); 117 118 my $self = new BaseClassifier($classifierslist, $inputargs, $hashArgOptLists); 119 119 120 120 if ($self->{'info_only'}) { -
gsdl/trunk/perllib/classify/DateList.pm
r12891 r17209 40 40 package DateList; 41 41 42 use Bas Clas;42 use BaseClassifier; 43 43 use sorttools; 44 44 … … 47 47 48 48 sub BEGIN { 49 @DateList::ISA = ('Bas Clas');49 @DateList::ISA = ('BaseClassifier'); 50 50 } 51 51 … … 91 91 push(@$classifierslist, $class); 92 92 93 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}94 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};95 96 my $self = new Bas Clas($classifierslist, $inputargs, $hashArgOptLists);93 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 94 push(@{$hashArgOptLists->{"OptList"}},$options); 95 96 my $self = new BaseClassifier($classifierslist, $inputargs, $hashArgOptLists); 97 97 98 98 if ($self->{'info_only'}) { -
gsdl/trunk/perllib/classify/GenericList.pm
r14845 r17209 35 35 36 36 37 use Bas Clas;37 use BaseClassifier; 38 38 39 39 use strict; … … 41 41 42 42 sub BEGIN { 43 @GenericList::ISA = ('Bas Clas');43 @GenericList::ISA = ('BaseClassifier'); 44 44 } 45 45 … … 92 92 push(@$classifierslist, $class); 93 93 94 if (defined $arguments) { push(@{$hashArgOptLists->{"ArgList"}}, @{$arguments}); }95 if (defined $options) { push(@{$hashArgOptLists->{"OptList"}}, $options); }96 97 my $self = new Bas Clas($classifierslist, $inputargs, $hashArgOptLists);94 push(@{$hashArgOptLists->{"ArgList"}}, @{$arguments}); 95 push(@{$hashArgOptLists->{"OptList"}}, $options); 96 97 my $self = new BaseClassifier($classifierslist, $inputargs, $hashArgOptLists); 98 98 99 99 if ($self->{'info_only'}) { -
gsdl/trunk/perllib/classify/HFileHierarchy.pm
r12891 r17209 29 29 package HFileHierarchy; 30 30 31 use Bas Clas;31 use BaseClassifier; 32 32 use util; 33 33 use cfgread; … … 38 38 39 39 sub BEGIN { 40 @HFileHierarchy::ISA = ('Bas Clas');40 @HFileHierarchy::ISA = ('BaseClassifier'); 41 41 } 42 42 … … 90 90 push(@$classifierslist, $class); 91 91 92 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}93 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};94 95 my $self = new Bas Clas($classifierslist, $inputargs, $hashArgOptLists);92 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 93 push(@{$hashArgOptLists->{"OptList"}},$options); 94 95 my $self = new BaseClassifier($classifierslist, $inputargs, $hashArgOptLists); 96 96 97 97 if ($self->{'info_only'}) { -
gsdl/trunk/perllib/classify/HTML.pm
r12891 r17209 29 29 package HTML; 30 30 31 use Bas Clas;31 use BaseClassifier; 32 32 33 33 use strict; … … 35 35 36 36 sub BEGIN { 37 @HTML::ISA = ('Bas Clas');37 @HTML::ISA = ('BaseClassifier'); 38 38 } 39 39 … … 61 61 push(@$classifierslist, $class); 62 62 63 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}64 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};63 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 64 push(@{$hashArgOptLists->{"OptList"}},$options); 65 65 66 my $self = new Bas Clas($classifierslist, $inputargs, $hashArgOptLists);66 my $self = new BaseClassifier($classifierslist, $inputargs, $hashArgOptLists); 67 67 68 68 if ($self->{'info_only'}) { -
gsdl/trunk/perllib/classify/Hierarchy.pm
r12891 r17209 72 72 push(@$classifierslist, $class); 73 73 74 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}75 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};74 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 75 push(@{$hashArgOptLists->{"OptList"}},$options); 76 76 77 77 my $self = new HFileHierarchy($classifierslist, $inputargs, $hashArgOptLists); -
gsdl/trunk/perllib/classify/List.pm
r12891 r17209 27 27 # to see the options, run "perl -S classinfo.pl List" 28 28 29 use Bas Clas;29 use BaseClassifier; 30 30 package List; 31 31 … … 36 36 37 37 sub BEGIN { 38 @List::ISA = ('Bas Clas');38 @List::ISA = ('BaseClassifier'); 39 39 } 40 40 … … 62 62 push(@$classifierslist, $class); 63 63 64 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});} 65 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)}; 66 67 my $self = new BasClas($classifierslist, $inputargs, $hashArgOptLists); 64 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 65 push(@{$hashArgOptLists->{"OptList"}},$options); 66 67 my $self = new BaseClassifier($classifierslist, $inputargs, $hashArgOptLists); 68 69 if ($self->{'info_only'}) { 70 # don't worry about any options etc 71 return bless $self, $class; 72 } 68 73 69 74 # Transfer value from Auto Parsing to the variable name that used in previous GreenStone. -
gsdl/trunk/perllib/classify/Phind.pm
r12891 r17209 34 34 package Phind; 35 35 36 use Bas Clas;36 use BaseClassifier; 37 37 use util; 38 38 use ghtml; … … 59 59 60 60 sub BEGIN { 61 @Phind::ISA = ('Bas Clas');61 @Phind::ISA = ('BaseClassifier'); 62 62 } 63 63 … … 157 157 push(@$classifierslist, $class); 158 158 159 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}160 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};161 162 my $self = new Bas Clas($classifierslist, $inputargs, $hashArgOptLists);159 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 160 push(@{$hashArgOptLists->{"OptList"}},$options); 161 162 my $self = new BaseClassifier($classifierslist, $inputargs, $hashArgOptLists); 163 163 164 164 if ($self->{'info_only'}) { -
gsdl/trunk/perllib/classify/RecentDocumentsList.pm
r13900 r17209 27 27 # to see the options, run "perl -S classinfo.pl RecentDocumentsList" 28 28 29 use BasClas;30 29 package RecentDocumentsList; 31 30 31 use BaseClassifier; 32 32 use strict; 33 33 no strict 'refs'; # allow filehandles to be variables and viceversa … … 36 36 37 37 sub BEGIN { 38 @RecentDocumentsList::ISA = ('Bas Clas');38 @RecentDocumentsList::ISA = ('BaseClassifier'); 39 39 } 40 40 … … 68 68 push(@$classifierslist, $class); 69 69 70 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}71 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};72 73 my $self = new Bas Clas($classifierslist, $inputargs, $hashArgOptLists);70 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 71 push(@{$hashArgOptLists->{"OptList"}},$options); 72 73 my $self = new BaseClassifier($classifierslist, $inputargs, $hashArgOptLists); 74 74 75 75 if ($self->{'info_only'}) { -
gsdl/trunk/perllib/classify/SectionList.pm
r12891 r17209 28 28 # itself 29 29 30 # 12/05/02 Added usage datastructure - John Thompson31 30 32 31 package SectionList; … … 54 53 push(@$classifierslist, $class); 55 54 56 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}57 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};55 push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 56 push(@{$hashArgOptLists->{"OptList"}},$options); 58 57 59 58 my $self = new List($classifierslist, $inputargs, $hashArgOptLists);
Note:
See TracChangeset
for help on using the changeset viewer.