Changeset 831 for trunk


Ignore:
Timestamp:
1999-12-13T16:51:06+13:00 (24 years ago)
Author:
davidb
Message:

added support for multiple metavales for a metadata type

File:
1 edited

Legend:

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

    r811 r831  
    109109sub print_classify_info {
    110110    my ($handle, $classifyinfo, $OID, $allclassifications) = @_;
     111
    111112    $OID =~ s/^\.+//; # just for good luck
    112113
     
    132133
    133134   
    134     $outputtext .= "<contains>";
     135    my $contains_text = "<contains>";
     136    my $mdoffset_text = "<mdoffset>";
    135137   
    136138    my $next_subOID = 1;
     
    140142        next unless defined $tempinfo;
    141143       
    142         $outputtext .= ";" unless $first;
     144        $contains_text .= ";" unless $first;
     145        $mdoffset_text .= ";" unless $first;
    143146        $first = 0;
    144147       
    145148        if (defined ($tempinfo->{'classifyOID'})) {
    146         $outputtext .= $tempinfo->{'classifyOID'};
     149        $contains_text .= $tempinfo->{'classifyOID'};
    147150        &print_classify_info ($handle, $tempinfo, $tempinfo->{'classifyOID'},
    148151                      $allclassifications);
    149152        } elsif (defined ($tempinfo->{'OID'})) {
    150         $outputtext .= $tempinfo->{'OID'};
     153        $contains_text .= $tempinfo->{'OID'};
     154        $mdoffset_text .= $tempinfo->{'offset'}
     155          if (defined ($tempinfo->{'offset'}))
    151156        # note: we don't want to print the contents of the books
    152157        } else {
    153         $outputtext .= "\".$next_subOID";
     158        $contains_text .= "\".$next_subOID";
    154159        &print_classify_info ($handle, $tempinfo, "$OID.$next_subOID",
    155160                      $allclassifications);
     
    157162        }
    158163    }
    159     $outputtext .= "\n";
     164   
     165    $outputtext .= "$contains_text\n";
     166    $outputtext .= "<mdtype>$classifyinfo->{'mdtype'}\n"
     167        if defined $classifyinfo->{'mdtype'};
     168    $outputtext .= "$mdoffset_text\n"
     169        if ($mdoffset_text !~ m/^<mdoffset>;+$/);
     170   
    160171    $outputtext .= '-' x 70 . "\n";
    161172   
Note: See TracChangeset for help on using the changeset viewer.