Ignore:
Timestamp:
1999-02-03T14:43:31+13:00 (25 years ago)
Author:
sjboddie
Message:

Got building stuff to handle subcollections and language subcollections

File:
1 edited

Legend:

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

    r82 r139  
    8383sub process {
    8484    my $self = shift (@_);
    85     my ($doc_obj) = @_;
    8685    my $method = $self->{'mode'};
    8786
    88     $self->$method($doc_obj);
     87    $self->$method(@_);
    8988}
    9089
    9190sub infodb {
    9291    my $self = shift (@_);
    93     my ($doc_obj) = @_;
     92    my ($doc_obj, $filename) = @_;
    9493    my $handle = $self->{'output_handle'};
    9594
     
    142141    $mapped_section =~ s/\.+$//;
    143142
    144     my ($parent, $classification, $creator, $OID);
     143    my ($parent, $classification, $creator);
    145144   
    146145    $classification = $self->get_classifications($doc_obj, $section, $mapped_section)
     
    157156    } else {
    158157        $creator = $doc_obj->get_metadata_element($section, "Creator");
    159         $OID = $doc_obj->get_OID();
    160         # this is a hack at getting OID to look like the directory path - I'm sure there's
    161         # a better way to do it but it's late... Stefan
    162         my @OIDchars = split //, $OID;
    163         $OID = "";
    164         my $count = 0;
    165         foreach $i (@OIDchars) {
    166         if ($count == 7) {
    167             $OID .= "$i/";
    168             $count = 0;
    169         } else {
    170             $OID .= $i;
    171             $count ++;
    172         }
    173         }
    174         $OID =~ s/\/$//;
    175         $OID .= ".dir";
     158
     159        # need filename so we know what directory to look in for associated files
     160        $filename =~ s/^\/?(.*?\.dir).*$/$1/ if (defined $filename);
    176161    }
    177162
     
    187172        } else {
    188173        $self->write_to_gdbm($handle, $mapped_section, $title, $creator, $source, $date, $jobnumber, undef,
    189                      $self->{'num_sections'}, $parent, $classification, $OID);
     174                     $self->{'num_sections'}, $parent, $classification, $filename);
    190175        }
    191176    } else {
     
    215200        $self->write_to_gdbm ($handle, $mapped_section, $title, $creator, $source,
    216201                      $date, $jobnumber, $contains, $self->{'num_sections'},
    217                       $parent, $classification, $OID);
     202                      $parent, $classification, $filename);
    218203
    219204        if ($doc_obj->get_text_length($section) > 0) {
     
    222207            $self->write_to_gdbm ($handle, $intromapsection, "<i>(introductory text)</i>", $creator,
    223208                      $source, $date, $jobnumber, undef, $self->{'num_sections'},
    224                       $mapped_section, $classification, $OID);
     209                      $mapped_section, $classification, $filename);
    225210        }
    226211        }
Note: See TracChangeset for help on using the changeset viewer.