Changeset 139 for trunk/gsdl/perllib/mgbuildproc.pm
- Timestamp:
- 1999-02-03T14:43:31+13:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/mgbuildproc.pm
r82 r139 83 83 sub process { 84 84 my $self = shift (@_); 85 my ($doc_obj) = @_;86 85 my $method = $self->{'mode'}; 87 86 88 $self->$method( $doc_obj);87 $self->$method(@_); 89 88 } 90 89 91 90 sub infodb { 92 91 my $self = shift (@_); 93 my ($doc_obj ) = @_;92 my ($doc_obj, $filename) = @_; 94 93 my $handle = $self->{'output_handle'}; 95 94 … … 142 141 $mapped_section =~ s/\.+$//; 143 142 144 my ($parent, $classification, $creator , $OID);143 my ($parent, $classification, $creator); 145 144 146 145 $classification = $self->get_classifications($doc_obj, $section, $mapped_section) … … 157 156 } else { 158 157 $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); 176 161 } 177 162 … … 187 172 } else { 188 173 $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); 190 175 } 191 176 } else { … … 215 200 $self->write_to_gdbm ($handle, $mapped_section, $title, $creator, $source, 216 201 $date, $jobnumber, $contains, $self->{'num_sections'}, 217 $parent, $classification, $ OID);202 $parent, $classification, $filename); 218 203 219 204 if ($doc_obj->get_text_length($section) > 0) { … … 222 207 $self->write_to_gdbm ($handle, $intromapsection, "<i>(introductory text)</i>", $creator, 223 208 $source, $date, $jobnumber, undef, $self->{'num_sections'}, 224 $mapped_section, $classification, $ OID);209 $mapped_section, $classification, $filename); 225 210 } 226 211 }
Note:
See TracChangeset
for help on using the changeset viewer.