Changeset 15725 for gsdl/trunk/perllib/basebuilder.pm
- Timestamp:
- 2008-05-27T15:02:16+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/basebuilder.pm
r15711 r15725 99 99 $self->{'collect_cfg_preserve'} = &colcfg::read_collection_cfg_xml ($colcfgname); 100 100 } 101 101 102 # get the database type for this collection from the collect.cfg file (may be undefined) 103 $self->{'infodbtype'} = $self->{'collect_cfg'}->{'infodbtype'} || ""; 104 102 105 # get the list of plugins for this collection 103 106 my $plugins = []; … … 321 324 322 325 # Get info database file path 323 my $infodb_file_path = &dbutil::get_infodb_file_path($self->{' collection'}, $textdir);326 my $infodb_file_path = &dbutil::get_infodb_file_path($self->{'infodbtype'}, $self->{'collection'}, $textdir); 324 327 325 328 print $outhandle "\n*** creating the info database and processing associated files\n" … … 333 336 if ($self->{'keepold'}) { 334 337 # reconstruct doc_obj metadata from database for all docs 335 $reconstructed_docs = &classify::reconstruct_doc_objs_metadata($ infodb_file_path);338 $reconstructed_docs = &classify::reconstruct_doc_objs_metadata($self->{'infodbtype'}, $infodb_file_path); 336 339 } 337 340 … … 342 345 } 343 346 else { 344 $infodb_handle = &dbutil::open_infodb_write_handle($infodb_file_path); 347 print STDERR "Infodbtype: " . $self->{'infodbtype'} . "\n"; 348 $infodb_handle = &dbutil::open_infodb_write_handle($self->{'infodbtype'}, $infodb_file_path); 345 349 if (!defined($infodb_handle)) 346 350 { … … 349 353 } 350 354 } 351 355 356 $self->{'buildproc'}->set_infodbtype ($self->{'infodbtype'}); 352 357 $self->{'buildproc'}->set_output_handle ($infodb_handle); 353 358 $self->{'buildproc'}->set_mode ('infodb'); … … 382 387 383 388 # output classification information 384 &classify::output_classify_info ($self->{'classifiers'}, $ infodb_handle,389 &classify::output_classify_info ($self->{'classifiers'}, $self->{'infodbtype'}, $infodb_handle, 385 390 $self->{'remove_empty_classifications'}, 386 391 $self->{'gli'}); … … 391 396 # output doclist 392 397 my @doc_list = $self->{'buildproc'}->get_doc_list(); 393 &dbutil::write_infodb_entry($infodb_handle, "browselist", { 'hastxt' => [ "0" ], 394 'childtype' => [ "VList" ], 395 'numleafdocs' => [ scalar(@doc_list) ], 396 'thistype' => [ "Invisible" ], 397 'contains' => [ join(";", @doc_list) ] }); 398 my $browselist_infodb = { 'hastxt' => [ "0" ], 399 'childtype' => [ "VList" ], 400 'numleafdocs' => [ scalar(@doc_list) ], 401 'thistype' => [ "Invisible" ], 402 'contains' => [ join(";", @doc_list) ] }; 403 print STDERR "Infodbtype: " . $self->{'infodbtype'} . "\n"; 404 &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, "browselist", $browselist_infodb); 398 405 399 406 close ($infodb_handle) if !$self->{'debug'}; … … 587 594 my %collection_infodb = (); 588 595 $self->get_collection_meta_sets(\%collection_infodb); 589 &dbutil::write_infodb_entry($ infodb_handle, "collection", \%collection_infodb);596 &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, "collection", \%collection_infodb); 590 597 } 591 598
Note:
See TracChangeset
for help on using the changeset viewer.