Changeset 21561 for main/trunk/greenstone2/perllib/ClassifyTreeNode.pm
- Timestamp:
- 2010-01-21T15:03:35+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/ClassifyTreeNode.pm
r17087 r21561 29 29 my $collection = $model->getCollection(); 30 30 31 my $index_text_directory_path = &util::filename_cat($ENV{'GSDLHOME'}, "collect", $collection, "index", "text"); 32 $self->{'infodb_file_path'} = &dbutil::get_infodb_file_path("gdbm", $collection, $index_text_directory_path); 33 31 34 # Check if this node already exists in the database, and if not insert it 32 35 # now 33 my $text = & GDBMUtils::gdbmCachedCollectionGet($collection, $clid);36 my $text = &dbutil::read_infodb_entry("gdbm", $self->{'infodb_file_path'}, $clid); 34 37 if($text !~ /\w+/ && $force_new) 35 38 { … … 235 238 236 239 # Now determine if this node exists. 237 if (&GDBMUtils::gdbmCachedCollectionGet($collection, $next_clid) =~ /\w+/)240 if (&dbutil::read_infodb_entry("gdbm", $self->{'infodb_file_path'}, $next_clid) =~ /\w+/) 238 241 { 239 242 # And if so, create it. … … 625 628 626 629 # Load the text of this node 627 my $text = & GDBMUtils::gdbmCachedCollectionGet($collection, $clid);630 my $text = &dbutil::read_infodb_entry("gdbm", $self->{'infodb_file_path'}, $clid); 628 631 629 632 # Replace the contains … … 651 654 652 655 # Load the text of this node 653 my $text = & GDBMUtils::gdbmCachedCollectionGet($collection, $clid);656 my $text = &dbutil::read_infodb_entry("gdbm", $self->{'infodb_file_path'}, $clid); 654 657 # Replace the numleafdocs 655 658 $text =~ s/<numleafdocs>\d*?\n+/<numleafdocs>$numleafdocs\n/; … … 676 679 677 680 # Load the text of this node 678 my $text = & GDBMUtils::gdbmCachedCollectionGet($collection, $clid);681 my $text = &dbutil::read_infodb_entry("gdbm", $self->{'infodb_file_path'}, $clid); 679 682 # Replace the title 680 683 $text =~ s/<Title>.*?\n+/<Title>$title\n/; … … 697 700 my $clid = $self->{'clid'}; 698 701 699 my $text = & GDBMUtils::gdbmCachedCollectionGet($collection, $clid);702 my $text = &dbutil::read_infodb_entry("gdbm", $self->{'infodb_file_path'}, $clid); 700 703 return $text; 701 704 }
Note:
See TracChangeset
for help on using the changeset viewer.