Changeset 12893


Ignore:
Timestamp:
2006-09-28T11:29:39+12:00 (18 years ago)
Author:
mdewsnip
Message:

More variable name improvements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/classify/GenericList.pm

    r12892 r12893  
    256256    # The root node of the classification hierarchy
    257257    my $childtype = $self->{$first_metadata_group . ".list_type"};
    258     my %classifyinfo = ( 'thistype' => "Invisible",
    259              'childtype' => $childtype,
    260              'Title' => $self->{'title'},
    261              'contains' => [] );
     258    my %classifier_node = ( 'thistype' => "Invisible",
     259                'childtype' => $childtype,
     260                'Title' => $self->{'title'},
     261                'contains' => [] );
    262262
    263263    # Recursively create the classification hierarchy, one level for each metadata element
    264     &add_az_list($self, \@metadata_groups, \@OIDs, \%classifyinfo);
    265     return \%classifyinfo;
     264    &add_az_list($self, \@metadata_groups, \@OIDs, \%classifier_node);
     265    return \%classifier_node;
    266266}
    267267
     
    272272    my @metadata_groups = @{shift(@_)};
    273273    my @OIDs = @{shift(@_)};
    274     my $classifyinfo = shift(@_);
    275     # print STDERR "\nAdding AZ list for " . $classifyinfo->{'Title'} . "\n";
     274    my $classifier_node = shift(@_);
     275    # print STDERR "\nAdding AZ list for " . $classifier_node->{'Title'} . "\n";
    276276
    277277    my $metadata_group = $metadata_groups[0];
     
    306306        # Is this the start of a new partition?
    307307        if ($metavaluepartition ne $lastpartition) {
    308         &add_hlist_partition($self, \@metadata_groups, $classifyinfo, $lastpartition, \%metavaluetoOIDsubhash);
     308        &add_hlist_partition($self, \@metadata_groups, $classifier_node, $lastpartition, \%metavaluetoOIDsubhash);
    309309        %metavaluetoOIDsubhash = ();
    310310        $lastpartition = $metavaluepartition;
     
    315315
    316316    # Don't forget to add the last partition
    317     &add_hlist_partition($self, \@metadata_groups, $classifyinfo, $lastpartition, \%metavaluetoOIDsubhash);
     317    &add_hlist_partition($self, \@metadata_groups, $classifier_node, $lastpartition, \%metavaluetoOIDsubhash);
    318318
    319319    # The partitions are stored in an HList
    320     $classifyinfo->{'childtype'} = "HList";
     320    $classifier_node->{'childtype'} = "HList";
    321321    }
    322322
     
    348348            }
    349349
    350             &add_hlist_partition($self, \@metadata_groups, $classifyinfo, $partitionname, \%metavaluetoOIDsubhash);
     350            &add_hlist_partition($self, \@metadata_groups, $classifier_node, $partitionname, \%metavaluetoOIDsubhash);
    351351            %metavaluetoOIDsubhash = ();
    352352            $lastpartitionend = $partitionend;
     
    355355
    356356        # The partitions are stored in an HList
    357         $classifyinfo->{'childtype'} = "HList";
     357        $classifier_node->{'childtype'} = "HList";
    358358    }
    359359
    360360    # Otherwise just add all the values to a VList
    361361    else {
    362         &add_vlist($self, \@metadata_groups, $classifyinfo, \%metavaluetoOIDhash);
     362        &add_vlist($self, \@metadata_groups, $classifier_node, \%metavaluetoOIDhash);
    363363    }
    364364    }
     
    418418    my $self = shift(@_);
    419419    my @metadata_groups = @{shift(@_)};
    420     my $classifyinfo = shift(@_);
     420    my $classifier_node = shift(@_);
    421421    my $partitionname = shift(@_);
    422422    my %metavaluetoOIDhash = %{shift(@_)};
    423423
    424424    # Create an hlist partition
    425     my %subclassifyinfo = ( 'Title' => $partitionname,
    426                 'childtype' => "VList",
    427                 'contains' => [] );
     425    my %child_classifier_node = ( 'Title' => $partitionname,
     426                  'childtype' => "VList",
     427                  'contains' => [] );
    428428
    429429    # Add the children to the hlist partition
    430     &add_vlist($self, \@metadata_groups, \%subclassifyinfo, \%metavaluetoOIDhash);
    431     push(@{$classifyinfo->{'contains'}}, \%subclassifyinfo);
     430    &add_vlist($self, \@metadata_groups, \%child_classifier_node, \%metavaluetoOIDhash);
     431    push(@{$classifier_node->{'contains'}}, \%child_classifier_node);
    432432}
    433433
     
    437437    my $self = shift(@_);
    438438    my @metadata_groups = @{shift(@_)};
    439     my $classifyinfo = shift(@_);
     439    my $classifier_node = shift(@_);
    440440    my %metavaluetoOIDhash = %{shift(@_)};
    441441
     
    448448    # If there is only one item and 'always_bookshelf' is false, add the item to the list
    449449    if (@OIDs == 1 && $self->{$metadata_group . ".always_bookshelf"} eq "f") {
    450         push(@{$classifyinfo->{'contains'}}, { 'OID' => $OIDs[0] });
     450        push(@{$classifier_node->{'contains'}}, { 'OID' => $OIDs[0] });
    451451    }
    452452
    453453    # Otherwise create a sublist (bookshelf) for the metadata value
    454454    else {
    455         my %subclassifyinfo = ( 'Title' => $metavalue,
    456                     'childtype' => "VList",
    457                     'contains' => [] );
     455        my %child_classifier_node = ( 'Title' => $metavalue,
     456                      'childtype' => "VList",
     457                      'contains' => [] );
    458458
    459459        # If there are metadata elements remaining, recursively apply the process
     
    461461        my $next_metadata_group = $metadata_groups[0];
    462462        my $childtype = $self->{$next_metadata_group . ".list_type"};
    463         $subclassifyinfo{'childtype'} = $childtype;
    464         &add_az_list($self, \@metadata_groups, \@OIDs, \%subclassifyinfo);
     463        $child_classifier_node{'childtype'} = $childtype;
     464        &add_az_list($self, \@metadata_groups, \@OIDs, \%child_classifier_node);
    465465        }
    466466        # Otherwise just add the documents as children of this list
     
    476476
    477477        foreach my $OID (@OIDs) {
    478             push(@{$subclassifyinfo{'contains'}}, { 'OID' => $OID });
     478            push(@{$child_classifier_node{'contains'}}, { 'OID' => $OID });
    479479        }
    480480        }
    481481
    482482        # Add the sublist to the list
    483         push(@{$classifyinfo->{'contains'}}, \%subclassifyinfo);
     483        push(@{$classifier_node->{'contains'}}, \%child_classifier_node);
    484484    }
    485485    }
Note: See TracChangeset for help on using the changeset viewer.