Changeset 32518

Show
Ignore:
Timestamp:
16.10.2018 13:52:48 (5 weeks ago)
Author:
ak19
Message:

Untested first attempt at MySQLPlugout that is meant to write metadata and/or fulltext to a mysql db rather than to doc.xml. We're switching over to using perl mysql libs, dbd (mysql) for drivers and dbi (mysql), for db access. However, I still want to commit this initial attempt at manually doing database operations in perl.

Location:
main/trunk/greenstone2
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/import.pl

    r31700 r32518  
    8888      { 'name' => "GreenstoneMETS", 
    8989        'desc' => "{export.saveas.GreenstoneMETS}"}, 
     90      { 'name' => "MySQL", 
     91        'desc' => "{export.saveas.MySQL}"}, 
     92      { 'name' => "MySQL_metadata_only", 
     93        'desc' => "{export.saveas.MySQL.meta_only}"}, 
     94      { 'name' => "MySQL_fulltext_only", 
     95        'desc' => "{export.saveas.MySQL.text_only}"}, 
    9096      ]; 
    9197 
  • main/trunk/greenstone2/perllib/docprint.pm

    r32514 r32518  
    6767    $all_text .= "  <Description>\n"; 
    6868 
     69    # scalar comparisons on a constant is allowed (but not string evaluation of scalars) 
     70    # https://www.perlmonks.org/?node_id=559456 
    6971    if($options->{'output'} == OUTPUT_ALL || $options->{'output'} == OUTPUT_META_ONLY) { 
    7072    # output metadata 
  • main/trunk/greenstone2/perllib/strings.properties

    r32303 r32518  
    417417 
    418418export.saveas.GreenstoneXML:Greenstone XML Archive format 
     419export.saveas.MySQL:Save metadata and text in MySQL database 
     420export.saveas.MySQL.meta_only:Store metadata in MySQL database (and full text in Greenstone XML Archive format) 
     421export.saveas.MySQL.text_only:Store full text in MySQL database (and metadata in Greenstone XML Archive format) 
    419422 
    420423export.saveas.MARCXML:MARC XML format (an XML version of MARC 21) 
     
    14401443METSPlugout.xslt_mets:Transform a mets's docmets.xml with the XSLT in the named file.   
    14411444 
     1445MySQLPlugout.desc:Output metadata and/or full text to a MySQL database instead of doc.xml. 
     1446MySQLPlugout.process_mode:Setting determines whether full text and/or metadata will be output to a MySQL database instead of to doc.xml during import. 
     1447MySQLPlugout.process_mode.all:Import stage outputs the full text and metadata to a MySQL database instead of to doc.xml. 
     1448MySQLPlugout.process_mode.meta_only:Import stage outputs the metadata to a MySQL database and any text to doc.xml. 
     1449MySQLPlugout.process_mode.text_only:Import stage outputs the full text to a MySQL database and any metadata to doc.xml. 
     1450 
     1451 
    14421452# 
    14431453# Perl module strings