Changeset 15688 for gsdl/trunk/perllib/basebuildproc.pm
- Timestamp:
- 2008-05-23T16:14:50+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/basebuildproc.pm
r15685 r15688 25 25 26 26 # This document processor outputs a document for indexing (should be 27 # implemented by subclass) and storing in gdbmdatabase27 # implemented by subclass) and storing in the database 28 28 29 29 package basebuildproc; … … 47 47 # outhandle is where all the debugging info goes 48 48 # output_handle is where the output of the plugins is piped 49 # to (i.e. mg, gdbmetc.)49 # to (i.e. mg, database etc.) 50 50 $outhandle = STDERR unless defined $outhandle; 51 51 … … 60 60 $self->{'mode'} = "text"; 61 61 $self->{'assocdir'} = $build_dir; 62 $self->{'dont gdbm'} = {};62 $self->{'dontdb'} = {}; 63 63 64 64 $self->{'index'} = "section:text"; … … 216 216 } 217 217 218 sub set_dont gdbm{219 my $self = shift (@_); 220 my ($dont gdbm) = @_;221 222 $self->{'dont gdbm'} = $dontgdbm;218 sub set_dontdb { 219 my $self = shift (@_); 220 my ($dontdb) = @_; 221 222 $self->{'dontdb'} = $dontdb; 223 223 } 224 224 … … 334 334 my $doctype = $doc_obj->get_doc_type(); 335 335 336 # only output this document if it is a "indexed_doc" or "info_doc" ( GDBMdatabase only) document336 # only output this document if it is a "indexed_doc" or "info_doc" (database only) document 337 337 return if ($doctype ne "indexed_doc" && $doctype ne "info_doc"); 338 338 … … 356 356 else 357 357 { 358 # doc_obj reconstructed from GDBM(has metadata, doc structure but no text)358 # doc_obj reconstructed from database (has metadata, doc structure but no text) 359 359 my $top_section = $doc_obj->get_top_section(); 360 360 $archivedir = $doc_obj->get_metadata_element($top_section,"archivedir"); … … 402 402 # Output whether this node contains text 403 403 # 404 # If doc_obj reconstructed from GDBMfile then no need to404 # If doc_obj reconstructed from database file then no need to 405 405 # explicitly add <hastxt> as this is preserved as metadata when 406 # the GDBMfile is loaded in406 # the database file is loaded in 407 407 408 408 if (defined $filename) … … 443 443 } 444 444 445 if (!defined $self->{'dont gdbm'}->{$field}) {445 if (!defined $self->{'dontdb'}->{$field}) { 446 446 print $handle "<$field>$value\n"; 447 447 … … 473 473 } 474 474 475 # If doc_obj reconstructed from GDBMfile then no need to475 # If doc_obj reconstructed from database file then no need to 476 476 # explicitly add <archivedir> as this is preserved as metadata when 477 # the GDBMfile is loaded in477 # the database file is loaded in 478 478 479 479 if (defined $filename)
Note:
See TracChangeset
for help on using the changeset viewer.