Changeset 28707

Show
Ignore:
Timestamp:
28.11.2013 15:30:17 (6 years ago)
Author:
kjdon
Message:

new option no_auxiliary_databases to stop generating archivesinf files

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugouts/BasePlugout.pm

    r28642 r28707  
    9090     'hiddengli' => "yes"}, 
    9191       { 'name' => 'no_rss', 
    92          'desc' => '{BasPlugout.no_rss}', 
     92         'desc' => "{BasPlugout.no_rss}", 
    9393         'type' => 'flag', 
    9494         'reqd' => 'no', 
    9595         'hiddengli' => 'yes'}, 
     96    { 'name' => "no_auxiliary_databases", 
     97      'desc' => "{BasPlugout.no_auxiliary_databases}", 
     98      'type' => "flag", 
     99      'reqd' => "no", 
     100      'hiddengli' => "yes"} 
     101 
    96102]; 
    97103 
     
    146152    my $full_file_path = &util::locate_config_file($self->{'xslt_file'}); 
    147153    if (!defined $full_file_path) { 
    148         print STDERR "Can not find $self->{'xslt_file'}, please make sure you have supplied the correct file path\n"; 
     154        print STDERR "Can not find $self->{'xslt_file'}, please make sure you have supplied the correct file path or put the file into the collection's etc or greenstone's etc folder\n"; 
    149155        die "\n"; 
    150156    } 
     
    158164    $self->{'keep_import_structure'} = 0; 
    159165 
     166    $self->{'generate_databases'} = 1; 
     167    if ($self->{'no_auxiliary_databases'}) { 
     168    $self->{'generate_databases'} = 0; 
     169    } 
     170    undef $self->{'no_auxiliary_databases'}; 
    160171    return bless $self, $class; 
    161172 
    162173} 
    163174 
     175# implement this in subclass if you want to do some initialization after  
     176# loading and setting parameters, and before processing the documents. 
     177sub begin { 
     178 
     179    my $self= shift (@_); 
     180 
     181} 
    164182sub print_xml_usage 
    165183{ 
     
    460478 
    461479    # write out data to archiveinf-doc.db 
    462     $self->archiveinf_db($doc_obj);  
    463  
     480    if ($self->{'generate_databases'}) { 
     481    $self->archiveinf_db($doc_obj);  
     482    } 
    464483    if ($self->is_group()) { 
    465484    $self->{'gs_count'}++; # do we want this for all cases? 
     
    968987} 
    969988 
     989 
     990 
    970991sub open_xslt_pipe 
    971992{