- Timestamp:
- 2018-10-26T15:10:47+13:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugouts/GreenstoneSQLPlugout.pm
r32542 r32543 40 40 41 41 # TODO: SIGTERM rollback and disconnect? 42 # TODO Q: what about verbosity for debugging 42 # TODO Q: what about verbosity for debugging, instead of current situation of printing out upon debug set at the expense of writing to db 43 43 # TODO Q: introduced site_name param to plugins and plugouts. Did I do it right? And should they have hiddengli = "yes" 44 44 45 # this plugout does not output xml to a file, but outputs rows into a mysql table 45 # this plugout does not output the metadata and/or fulltxt xml to a file, 46 # but outputs rows into a mysql table for metadata and/or a table for fulltxt 46 47 sub BEGIN { 47 48 @GreenstoneSQLPlugout::ISA = ('GreenstoneXMLPlugout'); … … 56 57 57 58 # TODO Q: what is "group" in GreenstoneXMLPlugout? 58 # TODO Q: site_name only exists for GS3. What about GS2?59 60 59 61 60 my $process_mode_list = … … 141 140 #print STDERR "@@@@ proc_mode: " . $self->{'process_mode'} . "\n"; 142 141 143 ########### TODO: these should be set from cmdline/GLI options to plugout#########142 ########### TODO: deal with build mode ######### 144 143 145 144 $self->{'build_mode'} = "removeold"; … … 236 235 } 237 236 238 # TODO: check arc-inf.db for whether each entry is to be deleted/indexed/reindexed/been indexed 237 # TODO: check arc-inf.db for whether each entry is to be deleted/indexed/reindexed/been indexed? 238 # That's only for indexing, not for this step which only generates the content in archives dir 239 239 sub saveas { 240 240 my $self = shift (@_); … … 253 253 254 254 # TODO: also set debugging in begin()? Then stmts creating db and tables also sent to debug out and not executed 255 256 # TODO: remove unused old_unused_saveas from GreenstoneXMLPlugout 257 258 259 # 2. overriding saving behaviour to do what the superclass does PLUS saving to sql db 260 261 #NOTE: if proc_mode == all, then "breadcrumbs" go into both meta and txt elements of doc.xml: 262 # statements pointing viewer to the sql db for contents 255 256 257 # 2. overriding saving behaviour to do what the superclass does (writing out doc.xml files, 258 # under new name of docsql.xml, with breadcrumbs pointing to sql db) PLUS saving to sql db 259 260 # NOTE: if proc_mode == all, then "breadcrumbs" (statements pointing viewer to the sql db 261 # for contents) go into both meta and txt elements of doc.xml (docsql.xml specifically): 263 262 264 # write the INVERSE into doc.xml as to what is written to the db263 # write the INVERSE into doc.xml as to what is written to the SQL db 265 264 my $docxml_output_options = { 'output' => docprint::OUTPUT_NONE }; 266 265 if($proc_mode eq "meta_only" ) { # since only meta to go into MySQL db, text will go into docxml … … 272 271 # now we've prepared to write out whatever is meant to go into docxml 273 272 # and can do actual the steps superclass GreenstoneXMLPlugout carries out to write out docxml 274 # So: write out the doc xml file for the current document273 # So: write out the doc xml file, "docsql.xml", for the current document 275 274 my $section_text = &docprint::get_section_xml($doc_obj, $docxml_output_options); 276 275 print $docxml_outhandler $section_text;
Note:
See TracChangeset
for help on using the changeset viewer.