Changeset 13271
- Timestamp:
- 2006-11-15T13:28:14+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify/GenericList.pm
r12896 r13271 259 259 'childtype' => $self->{$first_metadata_group . ".list_type"}, 260 260 'Title' => $self->{'buttonname'}, 261 'contains' => [] ); 261 'contains' => [], 262 'mdtype' => $first_metadata_group ); 262 263 263 264 # Recursively create the classification hierarchy, one level for each metadata group … … 448 449 # If there is only one item and 'always_bookshelf' is false, add the item to the list 449 450 if (@OIDs == 1 && $self->{$metadata_group . ".always_bookshelf"} eq "f") { 450 push(@{$classifier_node->{'contains'}}, { 'OID' => $OIDs[0] }); 451 my $OID = $OIDs[0]; 452 453 # Find the offset of this metadata value 454 my $offset = 0; 455 my %OIDtometavaluehash = %{$self->{$metadata_group . ".list"}}; 456 my @metavalues = @{$OIDtometavaluehash{$OID}}; 457 for (my $i = 0; $i < scalar(@metavalues); $i++) { 458 if ($metavalue eq $metavalues[$i]) { 459 $offset = $i; 460 last; 461 } 462 } 463 push(@{$classifier_node->{'contains'}}, { 'OID' => $OID, 'offset' => $offset }); 451 464 } 452 465
Note:
See TracChangeset
for help on using the changeset viewer.