Changeset 652
- Timestamp:
- 1999-10-10T21:22:43+13:00 (25 years ago)
- Location:
- trunk/gsdl/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify.pm
r637 r652 118 118 $outputtext .= "<doctype>classify\n"; 119 119 $outputtext .= "<hastxt>0\n"; 120 $outputtext .= "<classifytype>$classifyinfo->{'classifytype'}\n" if defined $classifyinfo->{'classifytype'}; 121 $outputtext .= "<Title>$classifyinfo->{'Title'}\n" if defined $classifyinfo->{'Title'}; 122 $outputtext .= "<numleafdocs>$classifyinfo->{'numleafdocs'}\n" if defined $classifyinfo->{'numleafdocs'}; 123 print "numleafdocs = $classifyinfo->{'numleafdocs'}\n" if defined $classifyinfo->{'numleafdocs'}; 120 $outputtext .= "<childtype>$classifyinfo->{'childtype'}\n" 121 if defined $classifyinfo->{'childtype'}; 122 $outputtext .= "<Title>$classifyinfo->{'Title'}\n" 123 if defined $classifyinfo->{'Title'}; 124 $outputtext .= "<numleafdocs>$classifyinfo->{'numleafdocs'}\n" 125 if defined $classifyinfo->{'numleafdocs'}; 126 $outputtext .= "<thistype>$classifyinfo->{'thistype'}\n" 127 if defined $classifyinfo->{'thistype'}; 128 124 129 125 130 $outputtext .= "<contains>"; -
trunk/gsdl/perllib/classify/AZSectionList.pm
r618 r652 96 96 } 97 97 if (defined $self->{'list'}->{"$doc_OID.$section"}) { 98 print STDERR "WARNING: AZSectionList::classify called multiple times for $doc_OID.$section\n"; 98 print STDERR "WARNING: AZSectionList::classify called multiple times " . 99 "for $doc_OID.$section\n"; 99 100 } 100 101 $self->{'list'}->{"$doc_OID.$section"} = $metavalue; … … 105 106 my $self = shift (@_); 106 107 107 my @classlist = sort {$self->{'list'}->{$a} cmp $self->{'list'}->{$b};} keys %{$self->{'list'}}; 108 my @classlist = sort {$self->{'list'}->{$a} cmp $self->{'list'}->{$b};} 109 keys %{$self->{'list'}}; 108 110 109 111 return $self->splitlist (\@classlist); … … 112 114 sub get_entry { 113 115 my $self = shift (@_); 114 my ($title, $c lassifytype) = @_;116 my ($title, $childtype, $thistype) = @_; 115 117 116 118 # organise into classification structure 117 my %classifyinfo = ('c lassifytype'=>$classifytype,119 my %classifyinfo = ('childtype'=>$childtype, 118 120 'Title'=>$title, 119 121 'contains'=>[]); 122 $classifyinfo{'thistype'} = $thistype 123 if defined $thistype && $thistype =~ /\w/; 120 124 121 125 return \%classifyinfo; … … 130 134 131 135 # top level 132 my $classifyinfo = $self->get_entry ($self->{'metaname'}, "AZList"); 136 my $childtype = "HList"; 137 if (scalar (@$classlistref) <= 20) {$childtype = "VList";} 138 my $classifyinfo = $self->get_entry ($self->{'metaname'}, $childtype, "Invisible"); 133 139 134 140 # don't need to do any splitting if there are less than 20 classifications … … 147 153 if ($title =~ /^[0-9]$/) {$title = '0-9';} 148 154 elsif ($title !~ /^[A-Z]$/) { 149 print STDERR "AZSectionList: WARNING $classification has badly formatted title ($title)\n"; 155 print STDERR "AZSectionList: WARNING $classification has badly " . 156 "formatted title ($title)\n"; 150 157 } 151 158 $classhash->{$title} = [] unless defined $classhash->{$title}; … … 167 174 168 175 foreach $subclass (@tmparr) { 169 my $tempclassify = $self->get_entry($subclass, " AZList");176 my $tempclassify = $self->get_entry($subclass, "VList"); 170 177 foreach $subsubOID (@{$classhash->{$subclass}}) { 171 178 push (@{$tempclassify->{'contains'}}, {'OID'=>$subsubOID});
Note:
See TracChangeset
for help on using the changeset viewer.