Changeset 32527

Show
Ignore:
Timestamp:
19.10.2018 17:12:18 (5 weeks ago)
Author:
ak19
Message:

Renaming new MySQLPlugout to GreenstoneSQLPlugout to indicate that it deals with the internal Greenstone doc format and to match with the in-progress GreenstoneSQLPlugin. In contrast, the extant DatabasePlugin?, like most other plugins, appears to work with external document formats. In its case, database records.

Files:
1 moved

Legend:

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

    r32526 r32527  
    11########################################################################### 
    22# 
    3 # MySQLPlugout.pm -- plugout module for writing all or some the Greenstone 
    4 # document format (metadata and/or fulltext) into a MySQL database. 
     3# GreenstoneSQLPlugout.pm -- plugout module for writing all or some the  
     4# Greenstone document format (metadata and/or fulltext) into a (My)SQL db. 
    55# The rest is then still written out by GreenstoneXMLPlugout as usual. 
    66# A component of the Greenstone digital library software 
     
    2626########################################################################### 
    2727 
    28 package MySQLPlugout; 
     28package GreenstoneSQLPlugout; 
    2929 
    3030use strict; 
     
    4545# TODO: SIGTERM rollback and disconnect? 
    4646 
     47# TODO: rename class to GreenstoneSQLPlugout 
     48 
    4749 
    4850# this plugout does not output xml to a file, but outputs rows into a mysql table 
    4951sub BEGIN { 
    50     @MySQLPlugout::ISA = ('GreenstoneXMLPlugout'); 
     52    @GreenstoneSQLPlugout::ISA = ('GreenstoneXMLPlugout'); 
    5153} 
    5254 
     
    5961my $process_mode_list = 
    6062    [ { 'name' => "meta_only", 
    61         'desc' => "{MySQLPlugout.process_mode.meta_only}" },       
     63        'desc' => "{GreenstoneSQLPlugout.process_mode.meta_only}" },       
    6264      { 'name' => "text_only", 
    63         'desc' => "{MySQLPlugout.process_mode.text_only}" }, 
     65        'desc' => "{GreenstoneSQLPlugout.process_mode.text_only}" }, 
    6466      { 'name' => "all", 
    65         'desc' => "{MySQLPlugout.process_mode.all}" } ]; 
     67        'desc' => "{GreenstoneSQLPlugout.process_mode.all}" } ]; 
    6668 
    6769my $arguments = [  
    6870       { 'name' => "process_mode",  
    69      'desc' => "{MySQLPlugout.process_mode}", 
     71     'desc' => "{GreenstoneSQLPlugout.process_mode}", 
    7072     'type' => "enum", 
    7173     'list' => $process_mode_list, 
     
    7476     'hiddengli' => "no"} ]; 
    7577 
    76 my $options = { 'name'     => "MySQLPlugout", 
    77         'desc'     => "{MySQLPlugout.desc}", 
     78my $options = { 'name'     => "GreenstoneSQLPlugout", 
     79        'desc'     => "{GreenstoneSQLPlugout.desc}", 
    7880        'abstract' => "no", 
    7981        'inherits' => "yes", 
     
    9496        return bless $self, $class; 
    9597    } 
    96     print STDERR "***** MySQLPlugout process mode = \"", $self->{'process_mode'}, "\"\n"; 
     98    print STDERR "***** GreenstoneSQLPlugout process mode = \"", $self->{'process_mode'}, "\"\n"; 
    9799     
    98100    return bless $self, $class; 
     
    117119    print STDERR "########## COLLECTION: ". $ENV{'GSDLCOLLECTION'}."\n"; 
    118120    $self->{'collection_name'} = $ENV{'GSDLCOLLECTION'}; 
    119     print STDERR "***** MySQLPlugout process mode = \"", $self->{'process_mode'}, "\"\n"; 
     121    print STDERR "***** GreenstoneSQLPlugout process mode = \"", $self->{'process_mode'}, "\"\n"; 
    120122     
    121123    if(!$self->connect_to_db()) {