Changeset 8121 for trunk/gsdl/perllib/plugins
- Timestamp:
- 2004-09-15T16:18:06+12:00 (20 years ago)
- Location:
- trunk/gsdl/perllib/plugins
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/BibTexPlug.pm
r6408 r8121 140 140 'copyright', 'Copyright', 141 141 'note', 'Note', 142 );142 ); 143 143 144 144 # Metadata fields … … 219 219 # Add the Entry type as metadata 220 220 $doc_obj->add_utf8_metadata ($cursection, "EntryType", $EntryType); 221 222 #Add the fileformat as metadata 223 $doc_obj->add_metadata($cursection, "FileFormat", "BibTex"); 224 221 225 222 226 # Add the various field as metadata -
trunk/gsdl/perllib/plugins/BookPlug.pm
r6408 r8121 113 113 my $cursection = $doc_obj->get_top_section(); 114 114 115 # Add FileFormat as the metadata 116 $doc_obj->add_metadata($doc_obj->get_top_section(),"FileFormat", "Book"); 117 115 118 my $filename = &util::filename_cat($base_dir, $file); 116 119 my $absdir = $filename; -
trunk/gsdl/perllib/plugins/ConvertToPlug.pm
r7570 r8121 363 363 $doc_obj->associate_file($filename, "doc.$doc_ext", undef, $cursection); 364 364 365 my $file_type; 366 367 if ($doc_ext eq "doc") { 368 $file_type = "Word"; 369 } elsif ($doc_ext eq "xls") { 370 $file_type = "Excel"; 371 } elsif ($doc_ext eq "ppt") { 372 $file_type = "PPT"; 373 } elsif ($doc_ext eq "pdf") { 374 $file_type = "PDF"; 375 } elsif ($doc_ext eq "rtf") { 376 $file_type = "RTF"; 377 } 378 379 my $file_format = $file_type || "unknown"; 380 381 $doc_obj->add_metadata($cursection, "FileFormat", $file_format); 382 365 383 my $doclink = "<a href=\"_httpcollection_/index/assoc/[archivedir]/doc.$doc_ext\">"; 366 384 $doc_obj->add_utf8_metadata ($cursection, "srclink", $doclink); -
trunk/gsdl/perllib/plugins/DBPlug.pm
r8119 r8121 269 269 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}"); 270 270 271 $doc_obj->add_metadata($doc_obj->get_top_section(), "FileFormat", "DB"); 271 272 272 273 # include any metadata passed in from previous plugins -
trunk/gsdl/perllib/plugins/EMAILPlug.pm
r7830 r8121 450 450 $doc_obj->add_utf8_metadata ($cursection, "Title", $Title); 451 451 452 # Add FileFormat metadata 453 $doc_obj->add_metadata($cursection, "FileFormat", "EMAIL"); 452 454 453 455 # Add text to document object -
trunk/gsdl/perllib/plugins/FOXPlug.pm
r7508 r8121 244 244 $doc_obj->set_OIDtype ($processor->{'OIDtype'}); 245 245 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}"); 246 247 246 my $section = $doc_obj->get_top_section(); 247 248 $doc_obj->add_metadata($section, "FileFormat", "FOX"); 248 249 249 250 # start of document -
trunk/gsdl/perllib/plugins/GMLPlug.pm
r7362 r8121 193 193 $section = $doc_obj->get_parent_section ($section); 194 194 } # while (1) section level 195 196 # add the FileFormat as the metadata 197 $doc_obj->add_metadata($doc_obj->get_top_section(), "FileFormat", "GML"); 195 198 196 199 # add the associated files 197 200 my $assoc_files = $doc_obj->get_metadata($doc_obj->get_top_section(), "gsdlassocfile"); 198 201 my ($assoc_file_info); 199 202 200 203 foreach $assoc_file_info (@$assoc_files) 201 204 { -
trunk/gsdl/perllib/plugins/HBPlug.pm
r7508 r8121 267 267 268 268 my $cursection = $doc_obj->get_top_section(); 269 270 $doc_obj->add_metadata($cursection, "FileFormat", "HB"); 269 271 270 272 # add metadata for top level of document -
trunk/gsdl/perllib/plugins/HTMLPlug.pm
r8071 r8121 707 707 if ($self->{'verbosity'} > 2); 708 708 } 709 710 # add FileFormat metadata 711 $doc_obj->add_metadata($section,"FileFormat", "HTML"); 709 712 710 713 # Special, for metadata names such as tagH1 - extracts -
trunk/gsdl/perllib/plugins/ISISPlug.pm
r7693 r8121 282 282 } 283 283 # print "\n"; 284 284 # Add fileFormat as the metadata 285 $doc_obj->add_metadata($cursection, "FileFormat", "CDS/ISIS"); 285 286 # Add the full record as the document text 286 287 $$textref =~ s/\</</g; -
trunk/gsdl/perllib/plugins/ImagePlug.pm
r7555 r8121 152 152 my $type = "unknown"; 153 153 154 154 155 if ($converttotype ne "" && $filename =~ m/$converttotype$/) { 155 156 … … 179 180 180 181 $self->title_fallback($doc_obj,$section,$file); 181 $doc_obj->add_metadata ($section, "FileFormat", $type);182 182 183 183 my ($image_type, $image_width, $image_height, $image_size) 184 184 = &identify($filename, $outhandle, $verbosity); 185 186 if ($image_type ne " ") { 187 $type = $image_type; 188 } 189 190 $doc_obj->add_metadata ($section, "FileFormat", $type); 185 191 186 192 $doc_obj->add_metadata ($section, "ImageType", $image_type); … … 189 195 $doc_obj->add_metadata ($section, "ImageSize", $image_size); 190 196 191 192 197 $doc_obj->add_metadata ($section, "srclink", 193 198 "<a href=_httpcollection_/index/assoc/[assocfilepath]/[Image]>"); -
trunk/gsdl/perllib/plugins/LaTeXPlug.pm
r8098 r8121 118 118 119 119 ###### find metadata ###### 120 121 ## FileFormat metadata ## 122 $doc_obj->add_metadata($cursection, "FileFormat", "LaTeX"); 120 123 121 124 ### title metadata ### -
trunk/gsdl/perllib/plugins/MACROPlug.pm
r7353 r8121 149 149 $doc_obj->add_utf8_metadata($thissection, "Title", &ghtml::dmsafe($filemeta)); 150 150 151 # FileFormat metadata 152 $doc_obj->add_metadata($thissection, "FileFormat", "MACRO"); 153 151 154 return 1; 152 155 } -
trunk/gsdl/perllib/plugins/MARCPlug.pm
r7553 r8121 231 231 my $cursection = $doc_obj->get_top_section(); 232 232 233 # Add fileFormat as the metadata 234 $doc_obj->add_metadata($cursection, "FileFormat", "MARC"); 235 233 236 my $marc_entries = $self->{'marc_entries'}; 234 237 my $marc = shift(@$marc_entries); -
trunk/gsdl/perllib/plugins/METSPlug.pm
r7901 r8121 137 137 if ($element eq "mets:dmdSec" || $element eq "gsdl:Metadata"){ 138 138 $self->xml_dmd_start_tag (@_); 139 } elsif ($element eq "mets:FLocat e"){139 } elsif ($element eq "mets:FLocat"){ 140 140 #***deal with fileSection 141 141 $self->xml_file_start_tag (@_); … … 154 154 $self->{'dmdSec_table'}->{"$section_num"}=[]; 155 155 $self->{'dmdSec_table'}->{'section_num'}=$section_num; 156 157 156 } elsif ($element eq "gsdl:Metadata") { 158 157 $self->{'metadata_name'} = $_{'name'}; -
trunk/gsdl/perllib/plugins/OAIPlug.pm
r7508 r8121 141 141 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Encoding", $encoding); 142 142 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}"); 143 $doc_obj->add_metadata($doc_obj->get_top_section(), "FileFormat", "OAI"); 144 143 145 144 146 # include any metadata passed in from previous plugins … … 223 225 { 224 226 push(@{$metadata->{$metaname}},$metavalue); 227 225 228 } 226 229 else -
trunk/gsdl/perllib/plugins/PDFPlug.pm
r7353 r8121 213 213 $doc_obj->add_utf8_metadata($cursection, "Date", "$1$2$3"); 214 214 } 215 216 # Add FileFormat metadata 217 $doc_obj->add_metadata($cursection, "FileFormat", "PDF"); 215 218 216 219 return $result; -
trunk/gsdl/perllib/plugins/PSPlug.pm
r7353 r8121 177 177 &extract_metadata_from_postscript($self,"$path/$file", $doc); 178 178 #$doc->add_utf8_metadata($doc->get_top_section(), "PSPlug", 1); 179 180 #Add FileFormat metadata 181 $doc->add_metadata($doc->get_top_section(), "FileFormat", "PS"); 182 183 179 184 return ConvertToPlug::process_type($self,"ps",@_); 180 185 } -
trunk/gsdl/perllib/plugins/PagedImgPlug.pm
r8117 r8121 321 321 $doc_obj->add_metadata ($section, "ImageHeight", $image_height); 322 322 $doc_obj->add_metadata ($section, "ImageSize", $image_size); 323 $doc_obj->add_metadata ($section, "FileFormat", "PagedImg"); 323 324 324 325 if ($type eq "unknown" && $image_type) { -
trunk/gsdl/perllib/plugins/ProCitePlug.pm
r7195 r8121 191 191 $doc_obj->add_utf8_metadata($cursection, "pc.Workform", $workform_indicator); 192 192 $doc_obj->add_utf8_metadata($cursection, "pc.RecordNumber", $recordnum); 193 194 # Store FileFormat metadata 195 $doc_obj->add_metadata($cursection, "FileFormat", "ProCite"); 193 196 194 197 $html_record .= "<tr><td valign=top><b>Record Number: </b></td><td valign=top>$recordnum</td></tr>"; -
trunk/gsdl/perllib/plugins/ReferPlug.pm
r6408 r8121 185 185 } 186 186 } 187 # Add FileFormat as the metadata 188 $doc_obj->add_metadata($cursection,"FileFormat","Refer"); 187 189 188 190 # Add individual keywords. -
trunk/gsdl/perllib/plugins/RogPlug.pm
r7508 r8121 191 191 $doc_obj->add_metadata($cursection, "TitleSafe", $title_safe); 192 192 $doc_obj->add_metadata($cursection, "TVal", $song->{'tval'}); 193 $doc_obj->add_metadata($cursection, "FileFormat", "Rog"); 193 194 194 195 foreach $md ( @{$song->{'metadata'}} ) -
trunk/gsdl/perllib/plugins/SRCPlug.pm
r7353 r8121 141 141 } 142 142 $doc_obj->add_utf8_metadata ($cursection, "Title", $title); 143 $doc_obj->add_metadata ($cursection, "FileFormat", "SRC"); 144 143 145 # remove the gsdl prefix from the filename 144 146 my $relative_filename=$file; -
trunk/gsdl/perllib/plugins/SplitPlug.pm
r7830 r8121 183 183 } 184 184 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}"); 185 #$doc_obj->add_metadata($doc_obj->get_top_section(), "FileFormat", "Split"); 186 185 187 # Calculate a "base" document ID. 186 188 if (!defined $id) { -
trunk/gsdl/perllib/plugins/TEXTPlug.pm
r7498 r8121 113 113 $doc_obj->add_utf8_metadata ($cursection, "Title", $title); 114 114 } 115 # Add FileFormat metadata 116 $doc_obj->add_metadata($cursection, "FileFormat", "TEXT"); 117 115 118 116 119 # we need to escape the escape character, or else mg will convert into -
trunk/gsdl/perllib/plugins/W3ImgPlug.pm
r7362 r8121 555 555 $doc_obj->add_metadata($section, "ThumbURL", 556 556 "_httpcollection_/index/assoc/[archivedir]/$fn.thumb.jpg"); 557 $doc_obj->add_metadata($section, "FileFormat", "W3Img"); 557 558 558 559 if ( $self->{'document_text'} ) { -
trunk/gsdl/perllib/plugins/XMLPlug.pm
r8069 r8121 246 246 247 247 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}"); 248 $doc_obj->add_metadata($doc_obj->get_top_section(), "FileFormat", "XML"); 248 249 249 250 # process the document
Note:
See TracChangeset
for help on using the changeset viewer.