- Timestamp:
- 2000-08-15T10:51:03+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/GMLPlug.pm
r1269 r1401 149 149 # add the associated files 150 150 my $assoc_files = $doc_obj->get_metadata($doc_obj->get_top_section(), "gsdlassocfile"); 151 my ($assoc_file_info, $afile); 152 foreach $assoc_file_info (@$assoc_files) { 151 my ($assoc_file_info); 152 153 foreach $assoc_file_info (@$assoc_files) 154 { 153 155 my ($assoc_file, $mime_type, $dir) = split (":", $assoc_file_info); 154 if (defined $dir && $dir =~ /\w/) { 155 $afile = &util::filename_cat($dir, $assoc_file); 156 } else { 157 $afile = $assoc_file; 158 } 159 $doc_obj->associate_file(&util::filename_cat($parent_dir, $assoc_file), 160 $afile, $mime_type); 156 my $real_dir = &util::filename_cat($parent_dir, $assoc_file), 157 my $assoc_dir = (defined $dir && $dir ne "") 158 ? &util::filename_cat($dir, $assoc_file) : $assoc_file; 159 $doc_obj->associate_file($real_dir, $assoc_dir, $mime_type); 160 161 161 } 162 162 $doc_obj->delete_metadata($doc_obj->get_top_section(), "gsdlassocfile"); 163 163 164 164 # add metadata passed in from elsewhere 165 165 $self->extra_metadata ($doc_obj, $doc_obj->get_top_section(), $metadata); … … 169 169 170 170 # assume the document has an OID already 171 171 172 172 # process the document 173 173 $processor->process($doc_obj, $file); … … 177 177 last unless defined $gml && $gml =~ /\w/; 178 178 } # while(1) document level 179 179 180 180 return $no_docs; # no of docs processed 181 181 }
Note:
See TracChangeset
for help on using the changeset viewer.