Changeset 16959
- Timestamp:
- 2008-08-21T16:54:55+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/classify.pm
r15725 r16959 41 41 } 42 42 43 44 my $oid_to_clids = {};45 43 46 44 sub load_classifier_for_info { … … 364 362 $first = 0; 365 363 366 if (defined ($tempinfo->{'classifyOID'})) { 367 if ($tempinfo->{'classifyOID'} ne "oai") { 364 if (defined ($tempinfo->{'classifyOID'})) 365 { 366 if ($tempinfo->{'classifyOID'} ne "oai") 367 { 368 368 $contains_text .= $tempinfo->{'classifyOID'}; 369 369 } 370 370 371 # Extra code for incremental building.372 # We need to store a listing of the classifiers each DOI is in373 my $clids = [];374 #rint STDERR "==1. Recording reverse lookup for " . $tempinfo->{'classifyOID'} . "==\n";375 if(defined($oid_to_clids->{$tempinfo->{'classifyOID'}})) {376 #rint STDERR "Found existing array!\n";377 $clids = $oid_to_clids->{$tempinfo->{'classifyOID'}};378 }379 #rint STDERR "Appended $OID to \"" . join(";", @{$clids}) . "\"\n";380 push(@{$clids}, $OID);381 $oid_to_clids->{$tempinfo->{'classifyOID'}} = $clids;382 #rint STDERR "Result: \"" . join(";", @{$clids}) . "\"\n";383 384 371 &print_classify_info ($infodb_type, $infodb_handle, $tempinfo, $tempinfo->{'classifyOID'}, 385 372 $remove_empty_classifications); 386 } elsif (defined ($tempinfo->{'OID'})) { 373 } 374 elsif (defined ($tempinfo->{'OID'})) 375 { 387 376 $contains_text .= $tempinfo->{'OID'}; 388 377 $mdoffset_text .= $tempinfo->{'offset'} if (defined ($tempinfo->{'offset'})); 389 390 391 # note: we don't want to print the contents of the books 392 # Extra code for incremental building. 393 # We need to store a listing of the classifiers each DOI is in 394 my $clids = []; 395 #rint STDERR "==2. Recording reverse lookup for " . $tempinfo->{'OID'} . "==\n"; 396 if(defined($oid_to_clids->{$tempinfo->{'OID'}})) { 397 #rint STDERR "Found existing array!\n"; 398 $clids = $oid_to_clids->{$tempinfo->{'OID'}}; 399 } 400 #rint STDERR "Appended $OID to \"" . join(";", @{$clids}) . "\"\n"; 401 push(@{$clids}, $OID); 402 $oid_to_clids->{$tempinfo->{'OID'}} = $clids; 403 #rint STDERR "Result: \"" . join(";", @{$clids}) . "\"\n"; 404 405 406 } else { 407 408 # Supress having top-level node in Collage classifier 409 # so no bookshelf icon appears, top-level, along with the 410 # applet 411 412 if (!defined ($tempinfo->{'Title'}) || $tempinfo->{'Title'} ne "Collage") { 413 $contains_text .= "\".$next_subOID"; 414 } 415 416 # Extra code for incremental building. 417 # We need to store a listing of the classifiers each DOI is in 418 my $clids = []; 419 #rint STDERR "==3. Recording reverse lookup for $OID.$next_subOID==\n"; 420 if(defined($oid_to_clids->{$OID . "." . $next_subOID})) { 421 #rint STDERR "Found existing array!\n"; 422 $clids = $oid_to_clids->{$OID . "." . $next_subOID}; 423 } 424 #rint STDERR "Appended $OID to \"" . join(";", @{$clids}) . "\"\n"; 425 push(@{$clids}, $OID); 426 $oid_to_clids->{$OID . "." . $next_subOID} = $clids; 427 #rint STDERR "Result: \"" . join(";", @{$clids}) . "\"\n"; 428 429 &print_classify_info ($infodb_type, $infodb_handle, $tempinfo, "$OID.$next_subOID", 430 $remove_empty_classifications); 431 $next_subOID++; 378 } 379 else 380 { 381 # Supress having top-level node in Collage classifier 382 # so no bookshelf icon appears, top-level, along with the 383 # applet 384 if (!defined ($tempinfo->{'Title'}) || $tempinfo->{'Title'} ne "Collage") 385 { 386 $contains_text .= "\".$next_subOID"; 432 387 } 388 389 &print_classify_info ($infodb_type, $infodb_handle, $tempinfo, "$OID.$next_subOID", 390 $remove_empty_classifications); 391 $next_subOID++; 392 } 433 393 } 434 394
Note:
See TracChangeset
for help on using the changeset viewer.