Changeset 18327

Show
Ignore:
Timestamp:
07.01.2009 17:59:22 (10 years ago)
Author:
ak19
Message:

Extra parameter to new doc(): the renaming method to be used on the file (base64 or URL encoding).

Location:
gsdl/trunk/perllib/plugins
Files:
11 modified

Legend:

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

    r17026 r18327  
    334334    #my $doc_obj = new doc ($conv_filename, "indexed_doc"); 
    335335    # the original filename is used now 
    336     my $doc_obj = new doc ($filename_full_path, "indexed_doc"); 
     336    my $doc_obj = new doc ($filename_full_path, "indexed_doc", $self->{'file_rename_method'}); 
    337337    # the converted filename is set separately 
    338338    $doc_obj->set_converted_filename($conv_filename); 
  • gsdl/trunk/perllib/plugins/DatabasePlugin.pm

    r17744 r18327  
    255255 
    256256    # create a new document 
    257     my $doc_obj = new doc ($filename_full_path, "indexed_doc"); 
     257    my $doc_obj = new doc ($filename_full_path, "indexed_doc", $self->{'file_rename_method'}); 
    258258 
    259259    my $cursection = $doc_obj->get_top_section(); 
  • gsdl/trunk/perllib/plugins/FOXPlugin.pm

    r17026 r18327  
    269269 
    270270    # create a new document 
    271     my $doc_obj = new doc ($file, "indexed_doc"); 
     271    my $doc_obj = new doc ($file, "indexed_doc", $self->{'file_rename_method'}); 
    272272 
    273273    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}"); 
  • gsdl/trunk/perllib/plugins/HBPlugin.pm

    r17026 r18327  
    240240 
    241241    # create a new document 
    242     my $doc_obj = new doc ($file, "indexed_doc"); 
     242    my $doc_obj = new doc ($file, "indexed_doc", $self->{'file_rename_method'}); 
    243243 
    244244    # copy the book cover if it exists 
  • gsdl/trunk/perllib/plugins/HTMLImagePlugin.pm

    r17744 r18327  
    422422        print $outhandle "HTMLImagePlugin: extracting $filepath\n" 
    423423        if ( $self->{'verbosity'} > 1 ); 
    424         $doc_obj = new doc ("", "indexed_doc"); 
     424        $doc_obj = new doc ("", "indexed_doc", $self->{'file_rename_method'}); 
    425425        $section = $doc_obj->get_top_section(); 
    426426        my $prevpos = ( $i == 0 ? 0 : $imgs->{$fplist[$i - 1]}{'pos'}); 
  • gsdl/trunk/perllib/plugins/MARCXMLPlugin.pm

    r17033 r18327  
    195195        my $encoding = $self->{'encoding'}; 
    196196    my $file = $self->{'file'}; 
    197     my $doc_obj = new doc($filename); 
     197    my $doc_obj = new doc($filename, undef, $self->{'file_rename_method'}); 
    198198    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Language", $language); 
    199199    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Encoding", $encoding); 
  • gsdl/trunk/perllib/plugins/OAIPlugin.pm

    r17591 r18327  
    262262 
    263263    # create a new document 
    264     my $doc_obj = new doc ($filename, "indexed_doc"); 
     264    my $doc_obj = new doc ($filename, "indexed_doc", $self->{'file_rename_method'}); 
    265265    my $top_section = $doc_obj->get_top_section; 
    266266    my $plugin_type = $self->{'plugin_type'}; 
  • gsdl/trunk/perllib/plugins/PagedImagePlugin.pm

    r17822 r18327  
    479479     
    480480    # create a new document 
    481     $self->{'doc_obj'} = new doc ($self->{'filename'}, "indexed_doc"); 
     481    $self->{'doc_obj'} = new doc ($self->{'filename'}, "indexed_doc", $self->{'file_rename_method'}); 
    482482    # TODO is file filenmae_no_path?? 
    483483    $self->set_initial_doc_fields($self->{'doc_obj'}, $self->{'file'}, $self->{'processor'}); 
     
    529529    my ($filename_full_path, $dir, $filename_no_path, $processor) = @_; 
    530530 
    531     my $doc_obj = new doc ($filename_full_path, "indexed_doc"); 
     531    my $doc_obj = new doc ($filename_full_path, "indexed_doc", $self->{'file_rename_method'}); 
    532532    $self->set_initial_doc_fields($doc_obj, $filename_no_path, $processor); 
    533533    my $topsection = $doc_obj->get_top_section(); 
  • gsdl/trunk/perllib/plugins/ReadXMLFile.pm

    r17322 r18327  
    368368 
    369369    # create a new document 
    370     $self->{'doc_obj'} = new doc ($self->{'filename'}, "indexed_doc"); 
     370    $self->{'doc_obj'} = new doc ($self->{'filename'}, "indexed_doc", $self->{'file_rename_method'}); 
    371371    $self->{'doc_obj'}->add_utf8_metadata($self->{'doc_obj'}->get_top_section(), "Plugin", "$self->{'plugin_type'}"); 
    372372 
  • gsdl/trunk/perllib/plugins/RogPlugin.pm

    r17026 r18327  
    174174 
    175175    # create a new document 
    176     my $doc_obj = new doc ($file, "indexed_doc"); 
     176    my $doc_obj = new doc ($file, "indexed_doc", $self->{'file_rename_method'}); 
    177177    my $cursection = $doc_obj->get_top_section(); 
    178178    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}"); 
  • gsdl/trunk/perllib/plugins/SplitTextFile.pm

    r17300 r18327  
    233233 
    234234    # create a new document 
    235     my $doc_obj = new doc ($filename_full_path, "indexed_doc"); 
     235    my $doc_obj = new doc ($filename_full_path, "indexed_doc", $self->{'file_rename_method'}); 
    236236    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Language", $language); 
    237237    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Encoding", $encoding);