Changeset 12270


Ignore:
Timestamp:
2006-07-20T16:02:07+12:00 (18 years ago)
Author:
kjdon
Message:

set_OIDtype now takes two arguments, the type and the metadata (used if type=assigned)

Location:
trunk/gsdl/perllib/plugins
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/BasPlug.pm

    r11966 r12270  
    815815    # create a new document
    816816    my $doc_obj = new doc ($filename, "indexed_doc");
    817     $doc_obj->set_OIDtype ($processor->{'OIDtype'});
     817    $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'});
    818818    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Language", $language);
    819819    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Encoding", $encoding);
  • trunk/gsdl/perllib/plugins/ConvertToRogPlug.pm

    r12169 r12270  
    345345    my $docnum = $self->{'docnum'};
    346346
    347     $doc_obj->set_OIDtype ($processor->{'OIDtype'});
     347    $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'});
    348348    my ($filemeta) = $file =~ /([^\\\/]+)$/;
    349349    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Source", &ghtml::dmsafe($filemeta));
  • trunk/gsdl/perllib/plugins/DBPlug.pm

    r12169 r12270  
    262262    # create a new document
    263263    my $doc_obj = new doc ($filename, "indexed_doc");
    264     $doc_obj->set_OIDtype ($processor->{'OIDtype'});
     264    $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'});
    265265    my $cursection = $doc_obj->get_top_section();
    266266
  • trunk/gsdl/perllib/plugins/FOXPlug.pm

    r12169 r12270  
    274274    # create a new document
    275275    my $doc_obj = new doc ($file, "indexed_doc");
    276     $doc_obj->set_OIDtype ($processor->{'OIDtype'});
     276    $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'});
    277277    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}");
    278278    my $section = $doc_obj->get_top_section();
  • trunk/gsdl/perllib/plugins/HBPlug.pm

    r12169 r12270  
    261261    # create a new document
    262262    my $doc_obj = new doc ($file, "indexed_doc");
    263     $doc_obj->set_OIDtype ($processor->{'OIDtype'});
     263    $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'});
    264264
    265265    # copy the book cover if it exists
  • trunk/gsdl/perllib/plugins/ImagePlug.pm

    r12169 r12270  
    382382    # create a new document
    383383    my $doc_obj = new doc ($filename, "indexed_doc");
    384     $doc_obj->set_OIDtype ($processor->{'OIDtype'});   
     384    $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'});   
    385385    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}");
    386386
  • trunk/gsdl/perllib/plugins/MP3Plug.pm

    r12169 r12270  
    322322    $mp3_doc_count++;
    323323   
    324 ##    $doc_obj->set_OIDtype ($processor->{'OIDtype'});   
    325     $doc_obj->set_OIDtype ("incremental");    # this is done to avoid hashing content of file
     324##    $doc_obj->set_OIDtype ($processor->{'OIDtype'}); 
     325    if ($processor->{'OIDtype'} =~ /^(assigned|dirname)$/) {
     326    $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'});
     327    }
     328    else {
     329    $doc_obj->set_OIDtype ("incremental");    # this is done to avoid hashing content of file
     330    }
    326331    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}");
    327332    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "FileSize", (-s $filename));
  • trunk/gsdl/perllib/plugins/NULPlug.pm

    r12169 r12270  
    111111    # create a new document
    112112    my $doc_obj = new doc ($filename, "indexed_doc");
    113     $doc_obj->set_OIDtype ($processor->{'OIDtype'});   
     113    $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'});   
    114114    #$doc_obj->set_OIDtype ("incremental");
    115115    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}");
  • trunk/gsdl/perllib/plugins/OggVorbisPlug.pm

    r12169 r12270  
    102102    # create a new index document
    103103    my $doc_obj = new doc ($filename, "indexed_doc");
    104     $doc_obj->set_OIDtype ("incremental");    # this is done to avoid hashing content of file
     104    if ($processor->{'OIDtype'} =~ /^(assigned|dirname)$/) {
     105    $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'});
     106    }
     107    else {
     108    $doc_obj->set_OIDtype ("incremental");    # this is done to avoid hashing content of file
     109    }
    105110    my $section = $doc_obj->get_top_section();
    106111   
  • trunk/gsdl/perllib/plugins/PagedImgPlug.pm

    r12169 r12270  
    820820
    821821    my $doc_obj = new doc ($filename, "indexed_doc");
    822     $doc_obj->set_OIDtype ($processor->{'OIDtype'});
     822    $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'});
    823823    my $topsection = $doc_obj->get_top_section();
    824824    $doc_obj->add_utf8_metadata($topsection, "Plugin", "$self->{'plugin_type'}");
  • trunk/gsdl/perllib/plugins/RealMediaPlug.pm

    r12169 r12270  
    9797    # create a new index document
    9898    my $doc_obj = new doc ($filename, "indexed_doc");
    99     $doc_obj->set_OIDtype ("incremental");    # this is done to avoid hashing content of file
     99    if ($processor->{'OIDtype'} =~ /^(assigned|dirname)$/) {
     100    $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'});
     101    }
     102    else {
     103    $doc_obj->set_OIDtype ("incremental");    # this is done to avoid hashing content of file
     104    }
    100105    my $top_section = $doc_obj->get_top_section();
    101106
  • trunk/gsdl/perllib/plugins/SplitPlug.pm

    r12169 r12270  
    218218    # create a new document
    219219    my $doc_obj = new doc ($filename, "indexed_doc");
    220     $doc_obj->set_OIDtype ($processor->{'OIDtype'});
     220    $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'});
    221221    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Language", $language);
    222222    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Encoding", $encoding);
  • trunk/gsdl/perllib/plugins/UnknownPlug.pm

    r12169 r12270  
    191191    # create a new document
    192192    my $doc_obj = new doc ($filename, "indexed_doc");
    193     $doc_obj->set_OIDtype ($processor->{'OIDtype'});   
     193    $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'});   
    194194    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}");
    195195    $doc_obj->add_metadata($doc_obj->get_top_section(), "Source", &ghtml::dmsafe($file)); # set the filename as Source metadata to be consistent with other plugins
  • trunk/gsdl/perllib/plugins/XMLPlug.pm

    r12169 r12270  
    324324    # create a new document
    325325    $self->{'doc_obj'} = new doc ($self->{'filename'}, "indexed_doc");
    326     $self->{'doc_obj'}->set_OIDtype ($self->{'processor'}->{'OIDtype'});
     326    $self->{'doc_obj'}->set_OIDtype ($self->{'processor'}->{'OIDtype'}, $self->{'processor'}->{'OIDmetadata'});
    327327}
    328328
Note: See TracChangeset for help on using the changeset viewer.