Changeset 12844 for trunk/gsdl/perllib/classify.pm
- Timestamp:
- 2006-09-25T14:17:10+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify.pm
r12559 r12844 43 43 44 44 $next_classify_num = 1; 45 $oid_to_clids = {}; 46 45 47 sub load_classifier_for_info { 46 48 my ($classifier) = shift @_; … … 302 304 $tempinfo->{'classifyOID'} = "CL$next_classify_num" unless defined($tempinfo->{'classifyOID'}); 303 305 $next_classify_num++; 306 307 print STDERR "*** outputting information for classifier: $tempinfo->{'classifyOID'}\n"; 308 304 309 push (@{$classifyinfo->{'contains'}}, $tempinfo); 305 310 } … … 357 362 $contains_text .= $tempinfo->{'classifyOID'}; 358 363 } 364 365 # Extra code for incremental building. 366 # We need to store a listing of the classifiers each DOI is in 367 my $clids = []; 368 #rint STDERR "==1. Recording reverse lookup for " . $tempinfo->{'classifyOID'} . "==\n"; 369 if(defined($oid_to_clids->{$tempinfo->{'classifyOID'}})) { 370 #rint STDERR "Found existing array!\n"; 371 $clids = $oid_to_clids->{$tempinfo->{'classifyOID'}}; 372 } 373 #rint STDERR "Appended $OID to \"" . join(";", @{$clids}) . "\"\n"; 374 push(@{$clids}, $OID); 375 $oid_to_clids->{$tempinfo->{'classifyOID'}} = $clids; 376 #rint STDERR "Result: \"" . join(";", @{$clids}) . "\"\n"; 377 359 378 &print_classify_info ($handle, $tempinfo, $tempinfo->{'classifyOID'}, 360 379 $remove_empty_classifications); 361 380 } elsif (defined ($tempinfo->{'OID'})) { 362 381 $contains_text .= $tempinfo->{'OID'}; 363 $mdoffset_text .= $tempinfo->{'offset'} 364 if (defined ($tempinfo->{'offset'})) 365 # note: we don't want to print the contents of the books 382 $mdoffset_text .= $tempinfo->{'offset'} if (defined ($tempinfo->{'offset'})); 383 384 385 # note: we don't want to print the contents of the books 386 # Extra code for incremental building. 387 # We need to store a listing of the classifiers each DOI is in 388 my $clids = []; 389 #rint STDERR "==2. Recording reverse lookup for " . $tempinfo->{'OID'} . "==\n"; 390 if(defined($oid_to_clids->{$tempinfo->{'OID'}})) { 391 #rint STDERR "Found existing array!\n"; 392 $clids = $oid_to_clids->{$tempinfo->{'OID'}}; 393 } 394 #rint STDERR "Appended $OID to \"" . join(";", @{$clids}) . "\"\n"; 395 push(@{$clids}, $OID); 396 $oid_to_clids->{$tempinfo->{'OID'}} = $clids; 397 #rint STDERR "Result: \"" . join(";", @{$clids}) . "\"\n"; 398 399 366 400 } else { 367 401 … … 373 407 $contains_text .= "\".$next_subOID"; 374 408 } 409 410 # Extra code for incremental building. 411 # We need to store a listing of the classifiers each DOI is in 412 my $clids = []; 413 #rint STDERR "==3. Recording reverse lookup for $OID.$next_subOID==\n"; 414 if(defined($oid_to_clids->{$OID . "." . $next_subOID})) { 415 #rint STDERR "Found existing array!\n"; 416 $clids = $oid_to_clids->{$OID . "." . $next_subOID}; 417 } 418 #rint STDERR "Appended $OID to \"" . join(";", @{$clids}) . "\"\n"; 419 push(@{$clids}, $OID); 420 $oid_to_clids->{$OID . "." . $next_subOID} = $clids; 421 #rint STDERR "Result: \"" . join(";", @{$clids}) . "\"\n"; 375 422 376 423 &print_classify_info ($handle, $tempinfo, "$OID.$next_subOID",
Note:
See TracChangeset
for help on using the changeset viewer.