- Timestamp:
- 2018-10-19T17:12:18+13:00 (5 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugouts/GreenstoneSQLPlugout.pm
r32526 r32527 1 1 ########################################################################### 2 2 # 3 # MySQLPlugout.pm -- plugout module for writing all or some the Greenstone4 # 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. 5 5 # The rest is then still written out by GreenstoneXMLPlugout as usual. 6 6 # A component of the Greenstone digital library software … … 26 26 ########################################################################### 27 27 28 package MySQLPlugout;28 package GreenstoneSQLPlugout; 29 29 30 30 use strict; … … 45 45 # TODO: SIGTERM rollback and disconnect? 46 46 47 # TODO: rename class to GreenstoneSQLPlugout 48 47 49 48 50 # this plugout does not output xml to a file, but outputs rows into a mysql table 49 51 sub BEGIN { 50 @ MySQLPlugout::ISA = ('GreenstoneXMLPlugout');52 @GreenstoneSQLPlugout::ISA = ('GreenstoneXMLPlugout'); 51 53 } 52 54 … … 59 61 my $process_mode_list = 60 62 [ { 'name' => "meta_only", 61 'desc' => "{ MySQLPlugout.process_mode.meta_only}" },63 'desc' => "{GreenstoneSQLPlugout.process_mode.meta_only}" }, 62 64 { 'name' => "text_only", 63 'desc' => "{ MySQLPlugout.process_mode.text_only}" },65 'desc' => "{GreenstoneSQLPlugout.process_mode.text_only}" }, 64 66 { 'name' => "all", 65 'desc' => "{ MySQLPlugout.process_mode.all}" } ];67 'desc' => "{GreenstoneSQLPlugout.process_mode.all}" } ]; 66 68 67 69 my $arguments = [ 68 70 { 'name' => "process_mode", 69 'desc' => "{ MySQLPlugout.process_mode}",71 'desc' => "{GreenstoneSQLPlugout.process_mode}", 70 72 'type' => "enum", 71 73 'list' => $process_mode_list, … … 74 76 'hiddengli' => "no"} ]; 75 77 76 my $options = { 'name' => " MySQLPlugout",77 'desc' => "{ MySQLPlugout.desc}",78 my $options = { 'name' => "GreenstoneSQLPlugout", 79 'desc' => "{GreenstoneSQLPlugout.desc}", 78 80 'abstract' => "no", 79 81 'inherits' => "yes", … … 94 96 return bless $self, $class; 95 97 } 96 print STDERR "***** MySQLPlugout process mode = \"", $self->{'process_mode'}, "\"\n";98 print STDERR "***** GreenstoneSQLPlugout process mode = \"", $self->{'process_mode'}, "\"\n"; 97 99 98 100 return bless $self, $class; … … 117 119 print STDERR "########## COLLECTION: ". $ENV{'GSDLCOLLECTION'}."\n"; 118 120 $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"; 120 122 121 123 if(!$self->connect_to_db()) {
Note:
See TracChangeset
for help on using the changeset viewer.