Changeset 8220
- Timestamp:
- 2004-10-06T05:36:52+13:00 (20 years ago)
- Location:
- trunk/gsdl/perllib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify.pm
r7346 r8220 29 29 30 30 require util; 31 require AllList; 31 32 use gsprintf; 32 33 … … 67 68 my ($classify_list, $build_dir, $outhandle) = @_; 68 69 my @classify_objects = (); 70 my $classify_number = 1; 69 71 70 72 foreach $classifyoption (@$classify_list) { … … 113 115 die "$@" if $@; 114 116 117 $classobj->set_number($classify_number); 118 $classify_number ++; 119 115 120 # add this object to the list 116 121 push (@classify_objects, $classobj); 117 122 } 123 124 my ($classobj); 125 eval ("\$classobj = new AllList()"); 126 die "$@" if $@; 127 push (@classify_objects, $classobj); 118 128 119 129 return \@classify_objects; … … 135 145 136 146 foreach $classobj (@$classifiers) { 147 my $title = $classobj->{'title'}; 137 148 $classobj->classify($doc_obj); 138 149 } … … 152 163 153 164 # get each of the classifications 154 foreach $classobj (@$classifiers) {165 CLASSIFIER: foreach $classobj (@$classifiers) { 155 166 my $tempinfo = $classobj->get_classify_info($gli); 156 $tempinfo->{'classifyOID'} = "CL$next_classify_num"; 167 my $classID = $tempinfo->{'classifyOID'}; 168 169 if ((defined $classID) && ($classID eq "oai")) { 170 next CLASSIFIER; 171 } 172 $tempinfo->{'classifyOID'} = "CL$next_classify_num" unless defined($tempinfo->{'classifyOID'}); 157 173 $next_classify_num++; 158 174 push (@{$classifyinfo->{'contains'}}, $tempinfo); … … 188 204 $outputtext .= "<parameters>$classifyinfo->{'parameters'}\n" 189 205 if defined $classifyinfo->{'parameters'}; 206 $outputtext .= "<supportsmemberof>$classifyinfo->{'supportsmemberof'}\n" 207 if defined $classifyinfo->{'supportsmemberof'}; 190 208 191 209 my $contains_text = "<contains>"; -
trunk/gsdl/perllib/doc.pm
r7929 r8220 37 37 use util; 38 38 use ghtml; 39 use File::stat; 39 40 ##use hashdoc; 40 41 … … 55 56 'text'=>"", 56 57 'OIDtype'=>"hash"}, $class; 58 59 #GRB: Added code to set lastmodified for OAI purposes 60 if ((defined $doc_type) && (defined $source_filename) && (-e $source_filename)) { 61 my $file_stat = stat($source_filename); 62 my $mtime = $file_stat->mtime; 63 $self->add_utf8_metadata($self->get_top_section(), "lastmodified", $file_stat->mtime); 64 } 65 #GRB: end inserted code 57 66 58 67 if (defined $source_filename) { … … 1051 1060 1052 1061 # add_metadata assumes the text is in (extended) ascii form. For 1053 # text which has h been alreadyconverted to the UTF-8 format use1062 # text which has already been converted to the UTF-8 format use 1054 1063 # add_utf8_metadata. 1055 1064 sub add_metadata { -
trunk/gsdl/perllib/mgbuildproc.pm
r6767 r8220 281 281 $archivedir =~ s/\/+$//; 282 282 283 # resolve the final filenames of the files associated with this document 283 284 $self->assoc_files ($doc_obj, $archivedir); 285 286 #GRB: moved 1/06/2004 from GRB01062004 287 #add this document to the browse structure 288 push(@{$self->{'doclist'}},$doc_obj->get_OID()) 289 unless ($doctype eq "classification"); 290 291 # classify this document 292 &classify::classify_doc ($self->{'classifiers'}, $doc_obj); 293 #GRB: end of moved block 284 294 285 295 # this is another document … … 401 411 } 402 412 403 #add this document to the browse structure 404 push(@{$self->{'doclist'}},$doc_obj->get_OID()) 405 unless ($doctype eq "classification"); 406 407 # classify this document 408 &classify::classify_doc ($self->{'classifiers'}, $doc_obj); 409 413 #GRB01062004: see code above moved from here 410 414 } 411 415 -
trunk/gsdl/perllib/mgppbuildproc.pm
r7090 r8220 324 324 $archivedir =~ s/\/+$//; 325 325 326 # resolve the final filenames of the files associated with this document 326 327 $self->assoc_files ($doc_obj, $archivedir); 328 329 #GRB: moved 1/06/2004 from GRB01062004 330 #add this document to the browse structure 331 push(@{$self->{'doclist'}},$doc_obj->get_OID()) 332 unless ($doctype eq "classification"); 333 334 # classify this document 335 &classify::classify_doc ($self->{'classifiers'}, $doc_obj); 336 #GRB: end of moved block 327 337 328 338 # this is another document … … 451 461 } 452 462 453 #add this document to the browse structure 454 push(@{$self->{'doclist'}},$doc_obj->get_OID()) 455 unless ($doctype eq "classification"); 456 457 # classify this document 458 &classify::classify_doc ($self->{'classifiers'}, $doc_obj); 459 463 #GRB01062004: see code above moved from here 460 464 } 461 465
Note:
See TracChangeset
for help on using the changeset viewer.