Index: main/trunk/greenstone2/perllib/ClassifyTreeNode.pm
===================================================================
--- main/trunk/greenstone2/perllib/ClassifyTreeNode.pm	(revision 21561)
+++ main/trunk/greenstone2/perllib/ClassifyTreeNode.pm	(revision 21562)
@@ -37,6 +37,7 @@
     if($text !~ /\w+/ && $force_new)
       {
-        &GDBMUtils::gdbmCachedCollectionSet($collection, $clid,
-                            "<doctype>classify\n<hastxt>0\n<childtype>VList\n<Title>\n<numleafdocs>0\n<contains>\n");
+	my $infodb_file_handle = &dbutil::open_infodb_write_handle("gdbm", $self->{'infodb_file_path'}, "append");
+	&dbutil::write_infodb_entry("gdbm", $infodb_file_handle, $clid, &dbutil::convert_infodb_string_to_hash("<doctype>classify\n<hastxt>0\n<childtype>VList\n<Title>\n<numleafdocs>0\n<contains>\n"));
+	&dbutil::close_infodb_write_handle("gdbm", $infodb_file_handle);
       }
     # Bless me father for I have sinned
@@ -121,8 +122,9 @@
 
     # Create a new document with the correct CLID
-    &GDBMUtils::gdbmCachedCollectionSet($collection, $new_clid, $text);
-
+    my $infodb_file_handle = &dbutil::open_infodb_write_handle("gdbm", $self->{'infodb_file_path'}, "append");
+    &dbutil::write_infodb_entry("gdbm", $infodb_file_handle, $new_clid, &dbutil::convert_infodb_string_to_hash($text));
     # Remove the old document
-    &GDBMUtils::gdbmCachedCollectionSet($collection, $self->{'clid'});
+    &dbutil::delete_infodb_entry("gdbm", $infodb_file_handle, $self->{'clid'});
+    &dbutil::close_infodb_write_handle("gdbm", $infodb_file_handle);
 
     # Finally, change the clid stored in this document
@@ -488,8 +490,8 @@
         $num_leaf_docs += $1;
       }
-    # Now remove the node from the database. We do this calling set gdbm with
-    # no value argument.
-    my $collection = $self->{'model'}->getCollection();
-    &GDBMUtils::gdbmCachedCollectionSet($collection, $self->{'clid'});
+    # Now remove the node from the database
+    my $infodb_file_handle = &dbutil::open_infodb_write_handle("gdbm", $self->{'infodb_file_path'}, "append");
+    &dbutil::delete_infodb_entry("gdbm", $infodb_file_handle, $self->{'clid'});
+    &dbutil::close_infodb_write_handle("gdbm", $infodb_file_handle);
 
     # Return the leaf count (so we can adjust the numleafdocs at the root node
@@ -635,5 +637,7 @@
     #rint STDERR "After:  $text\n";
     # Store the changed text
-    &GDBMUtils::gdbmCachedCollectionSet($collection, $clid, $text);
+    my $infodb_file_handle = &dbutil::open_infodb_write_handle("gdbm", $self->{'infodb_file_path'}, "append");
+    &dbutil::write_infodb_entry("gdbm", $infodb_file_handle, $clid, &dbutil::convert_infodb_string_to_hash($text));
+    &dbutil::close_infodb_write_handle("gdbm", $infodb_file_handle);
   }
 # /** setContains() **/
@@ -658,5 +662,7 @@
     $text =~ s/<numleafdocs>\d*?\n+/<numleafdocs>$numleafdocs\n/;
     # Store the changed text
-    &GDBMUtils::gdbmCachedCollectionSet($collection, $clid, $text);
+    my $infodb_file_handle = &dbutil::open_infodb_write_handle("gdbm", $self->{'infodb_file_path'}, "append");
+    &dbutil::write_infodb_entry("gdbm", $infodb_file_handle, $clid, &dbutil::convert_infodb_string_to_hash($text));
+    &dbutil::close_infodb_write_handle("gdbm", $infodb_file_handle);
   }
 # /** setNumLeafDocs() **/
@@ -683,5 +689,7 @@
     $text =~ s/<Title>.*?\n+/<Title>$title\n/;
     # Store the changed text
-    &GDBMUtils::gdbmCachedCollectionSet($collection, $clid, $text);
+    my $infodb_file_handle = &dbutil::open_infodb_write_handle("gdbm", $self->{'infodb_file_path'}, "append");
+    &dbutil::write_infodb_entry("gdbm", $infodb_file_handle, $clid, &dbutil::convert_infodb_string_to_hash($text));
+    &dbutil::close_infodb_write_handle("gdbm", $infodb_file_handle);
   }
 # /** setValue() **/
Index: main/trunk/greenstone2/perllib/IncrementalBuildUtils.pm
===================================================================
--- main/trunk/greenstone2/perllib/IncrementalBuildUtils.pm	(revision 21561)
+++ main/trunk/greenstone2/perllib/IncrementalBuildUtils.pm	(revision 21562)
@@ -390,7 +390,12 @@
         # Now use the GDBM utils to write a blank string to this oid in the
         # database
-        &GDBMUtils::gdbmCachedCollectionSet($collection, $oid, "");
+	my $index_text_directory_path = &util::filename_cat($ENV{'GSDLHOME'}, "collect", $collection, "index", "text");
+	my $infodb_file_path = &dbutil::get_infodb_file_path("gdbm", $collection, $index_text_directory_path);
+	my $infodb_file_handle = &dbutil::open_infodb_write_handle("gdbm", $infodb_file_path, "append");
+	&dbutil::write_infodb_entry("gdbm", $infodb_file_handle, $oid, &dbutil::convert_infodb_string_to_hash(""));
         # Remove reverse lookup
-        &GDBMUtils::gdbmCachedCollectionSet($collection, $doc_num, "");
+	&dbutil::write_infodb_entry("gdbm", $infodb_file_handle, $doc_num, &dbutil::convert_infodb_string_to_hash(""));
+	&dbutil::close_infodb_write_handle("gdbm", $infodb_file_handle);
+
         # And remove from the database
         &callGS2LuceneDelete($collection, $doc_num);
Index: main/trunk/greenstone2/perllib/IncrementalDocument.pm
===================================================================
--- main/trunk/greenstone2/perllib/IncrementalDocument.pm	(revision 21561)
+++ main/trunk/greenstone2/perllib/IncrementalDocument.pm	(revision 21562)
@@ -187,5 +187,10 @@
     # Now store the object in the database using the GDBM utilities
     my $collection = $self->{'collection'};
-    &GDBMUtils::gdbmCachedCollectionSet($collection, $self->{'oid'}, $text);
+
+    my $index_text_directory_path = &util::filename_cat($ENV{'GSDLHOME'}, "collect", $collection, "index", "text");
+    my $infodb_file_path = &dbutil::get_infodb_file_path("gdbm", $collection, $index_text_directory_path);
+    my $infodb_file_handle = &dbutil::open_infodb_write_handle("gdbm", $infodb_file_path, "append");
+    &dbutil::write_infodb_entry("gdbm", $infodb_file_handle, $self->{'oid'}, &dbutil::convert_infodb_string_to_hash($text));
+    &dbutil::close_infodb_write_handle("gdbm", $infodb_file_handle);
 
     # There is a little bit of extra complexity when saving an incremental
@@ -195,6 +200,4 @@
     if($doc_num >= 0)
       {
-	my $index_text_directory_path = &util::filename_cat($ENV{'GSDLHOME'}, "collect", $collection, "index", "text");
-	my $infodb_file_path = &dbutil::get_infodb_file_path("gdbm", $collection, $index_text_directory_path);
 	my $text = &dbutil::read_infodb_entry("gdbm", $infodb_file_path, $doc_num);
 
@@ -202,5 +205,7 @@
         if($text !~ /<section>/)
           {
-            &GDBMUtils::gdbmCachedCollectionSet($collection, $doc_num, "<section>" . $self->{'oid'});
+	    $infodb_file_handle = &dbutil::open_infodb_write_handle("gdbm", $infodb_file_path, "append");
+	    &dbutil::write_infodb_entry("gdbm", $infodb_file_handle, $doc_num, &dbutil::convert_infodb_string_to_hash("<section>" . $self->{'oid'}));
+	    &dbutil::close_infodb_write_handle("gdbm", $infodb_file_handle);
           }
       }
