Changeset 32537

Show
Ignore:
Timestamp:
24.10.2018 20:13:22 (4 weeks ago)
Author:
ak19
Message:

First commit to do with reading back in from the SQL DB. This commit introduces the new GreenstoneSQLPlugin for this purpose, which should ideally only be used during buildcol (but its init(), deinit() and read() methods are also called on import.pl). The new plugin works with GreenstoneSQLPlugout which wrote meta and txt to the SQL DB. Lots of TODOs and questions still here, some debug statements too. Also have to run some decisions by Dr Bainbridge. There are many hardcoded values which still have to be parameterised (not always completely sure how) and still have to test the 2 cases of sending just meta and just fulltxt to db. Next commit will tidy some things up.

Location:
main/trunk/greenstone2/perllib
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/GreenstoneSQLPlugin.pm

    r32536 r32537  
    7171my $process_mode_list = 
    7272    [ { 'name' => "meta_only", 
    73         'desc' => "{GreenstoneSQLPlugout.process_mode.meta_only}" },       
     73        'desc' => "{GreenstoneSQLPlug.process_mode.meta_only}" },       
    7474      { 'name' => "text_only", 
    75         'desc' => "{GreenstoneSQLPlugout.process_mode.text_only}" }, 
     75        'desc' => "{GreenstoneSQLPlug.process_mode.text_only}" }, 
    7676      { 'name' => "all", 
    77         'desc' => "{GreenstoneSQLPlugout.process_mode.all}" } ]; 
     77        'desc' => "{GreenstoneSQLPlug.process_mode.all}" } ]; 
    7878 
    7979my $arguments = 
     
    8484    'reqd' => "no" }, 
    8585       { 'name' => "process_mode",  
    86      'desc' => "{GreenstoneSQLPlugout.process_mode}", 
     86     'desc' => "{GreenstoneSQLPlug.process_mode}", 
    8787     'type' => "enum", 
    8888     'list' => $process_mode_list, 
  • main/trunk/greenstone2/perllib/plugouts/GreenstoneSQLPlugout.pm

    r32536 r32537  
    5858my $process_mode_list = 
    5959    [ { 'name' => "meta_only", 
    60         'desc' => "{GreenstoneSQLPlugout.process_mode.meta_only}" },       
     60        'desc' => "{GreenstoneSQLPlug.process_mode.meta_only}" },       
    6161      { 'name' => "text_only", 
    62         'desc' => "{GreenstoneSQLPlugout.process_mode.text_only}" }, 
     62        'desc' => "{GreenstoneSQLPlug.process_mode.text_only}" }, 
    6363      { 'name' => "all", 
    64         'desc' => "{GreenstoneSQLPlugout.process_mode.all}" } ]; 
     64        'desc' => "{GreenstoneSQLPlug.process_mode.all}" } ]; 
    6565 
    6666my $arguments = [  
    6767       { 'name' => "process_mode",  
    68      'desc' => "{GreenstoneSQLPlugout.process_mode}", 
     68     'desc' => "{GreenstoneSQLPlug.process_mode}", 
    6969     'type' => "enum", 
    7070     'list' => $process_mode_list, 
  • main/trunk/greenstone2/perllib/strings.properties

    r32536 r32537  
    14461446 
    14471447GreenstoneSQLPlugout.desc:Output metadata and/or full text to a MySQL database instead of doc.xml. 
    1448 GreenstoneSQLPlugout.process_mode:Setting determines whether full text and/or metadata will be output to a MySQL database instead of to doc.xml during import. 
    1449 GreenstoneSQLPlugout.process_mode.all:Import stage outputs the full text and metadata to a MySQL database instead of to doc.xml. 
    1450 GreenstoneSQLPlugout.process_mode.meta_only:Import stage outputs the metadata to a MySQL database and any text to doc.xml. 
    1451 GreenstoneSQLPlugout.process_mode.text_only:Import stage outputs the full text to a MySQL database and any metadata to doc.xml. 
     1448 
     1449#  
     1450# GreenstoneSQLPlug strings are shared by both GreenstoneSQLPlugout and GreenstoneSQLPlugin 
     1451# 
     1452GreenstoneSQLPlug.process_mode:Setting determines whether full text and/or metadata will be output to a MySQL database instead of to doc.xml during import. 
     1453GreenstoneSQLPlug.process_mode.all:Import stage outputs the full text and metadata to a MySQL database instead of to doc.xml. 
     1454GreenstoneSQLPlug.process_mode.meta_only:Import stage outputs the metadata to a MySQL database and any text to doc.xml. 
     1455GreenstoneSQLPlug.process_mode.text_only:Import stage outputs the full text to a MySQL database and any metadata to doc.xml. 
    14521456 
    14531457