Index: gsdl/trunk/src/colservr/Makefile.in
===================================================================
--- gsdl/trunk/src/colservr/Makefile.in	(revision 15591)
+++ gsdl/trunk/src/colservr/Makefile.in	(revision 15592)
@@ -67,12 +67,12 @@
 	expat_resultset.cpp \
 	filter.cpp \
-	lucenegdbmsource.cpp \
 	lucenequeryfilter.cpp \
 	lucenesearch.cpp \
+	lucenesource.cpp \
 	maptools.cpp \
-	mggdbmsource.cpp \
 	mgq.c \
 	mgqueryfilter.cpp \
 	mgsearch.cpp \
+	mgsource.cpp \
 	mgppqueryfilter.cpp \
 	mgppsearch.cpp \
@@ -94,12 +94,12 @@
 	expat_resultset.o \
 	filter.o \
-	lucenegdbmsource.o \
 	lucenequeryfilter.o \
 	lucenesearch.o \
+	lucenesource.o \
 	maptools.o \
-	mggdbmsource.o \
 	mgq.o \
 	mgqueryfilter.o \
 	mgsearch.o \
+	mgsource.o \
 	mgppqueryfilter.o \
 	mgppsearch.o \
Index: gsdl/trunk/src/colservr/collectset.cpp
===================================================================
--- gsdl/trunk/src/colservr/collectset.cpp	(revision 15591)
+++ gsdl/trunk/src/colservr/collectset.cpp	(revision 15592)
@@ -35,7 +35,7 @@
 #include "mgqueryfilter.h"
 #include "mgppqueryfilter.h"
-#include "mggdbmsource.h"
+#include "mgsource.h"
 #include "lucenequeryfilter.h"
-#include "lucenegdbmsource.h"
+#include "lucenesource.h"
 
 #include "fileutil.h"
Index: gsdl/trunk/src/colservr/lucenegdbmsource.cpp
===================================================================
--- gsdl/trunk/src/colservr/lucenegdbmsource.cpp	(revision 15591)
+++ 	(revision )
@@ -1,94 +1,0 @@
-/**********************************************************************
- *
- * lucenegdbmsource.cpp -- 
- * Copyright (C) 1999  The New Zealand Digital Library Project
- *
- * A component of the Greenstone digital library software
- * from the New Zealand Digital Library Project at the
- * University of Waikato, New Zealand.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *********************************************************************/
-
-#include "lucenegdbmsource.h"
-#include "fileutil.h"
-#include "OIDtools.h"
-#include "expat_document.h"
-#include "lucenesearch.h"
-
-lucenegdbmsourceclass::lucenegdbmsourceclass () 
-  : sourceclass()
-{
-  classname = "lucenegdbmsource";
-}
-
-lucenegdbmsourceclass::~lucenegdbmsourceclass () {
-}
-
-bool lucenegdbmsourceclass::get_document (const text_t &OID, text_t &doc, 
-				      comerror_t &err, ostream &logout) {
-
-  outconvertclass text_t2ascii;
-  err = noError;
-  if (db_ptr == NULL) {
-    // most likely a configuration problem
-    logout << text_t2ascii 
-	   << "configuration error: lucenegdbmsource contains a null dbclass\n\n";
-    err = configurationError;
-    return true;
-  }
-
-  // open the database
-  db_ptr->setlogout(&logout);
-  if (!db_ptr->opendatabase (db_filename, DB_READER, 100, false)) {
-    // most likely a system problem (we have already checked that the database exists)
-    logout << text_t2ascii
-	   << "system problem: open on database \"" << db_filename << "\" failed\n\n";
-    err = systemProblem;
-    return true;
-  }
-
-  text_t tOID = OID;
-  if (needs_translating (OID)) 
-    translate_OID (OID, tOID, err, logout);
-  infodbclass info;
-  if (!db_ptr->getinfo(tOID, info)) {
-    db_ptr->closedatabase();  // Important that local library doesn't leave any files open
-    return false;
-  }
-
-  if (info["hastxt"].getint() == 0) { // there is no text for this section
-    return false; // true??
-  }
-  int docnum = info["docnum"].getint();
-
-  // get the parent id
-  text_t parent_OID;
-  get_top(tOID, parent_OID);
-  
-  if (!db_ptr->getinfo(parent_OID, info)) {
-    db_ptr->closedatabase();  // Important that local library doesn't leave any files open
-    return false;
-  }
-
-  text_t archive_dir = info["archivedir"];
-  text_t full_path_to_doc = filename_cat(collectdir, "index", "text", archive_dir, "doc.xml");
-  
-  doc.clear();
-  db_ptr->closedatabase();  // Important that local library doesn't leave any files open
-  expat_document(full_path_to_doc, ((lucenesearchclass*)textsearchptr)->gdbm_level, text_t(docnum), doc);
-  return true;
-}
Index: gsdl/trunk/src/colservr/lucenegdbmsource.h
===================================================================
--- gsdl/trunk/src/colservr/lucenegdbmsource.h	(revision 15591)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/**********************************************************************
- *
- * lucenegdbmsource.h -- 
- * Copyright (C) 1999  The New Zealand Digital Library Project
- *
- * A component of the Greenstone digital library software
- * from the New Zealand Digital Library Project at the
- * University of Waikato, New Zealand.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *********************************************************************/
-
-
-#ifndef LUCENEGDBMSOURCE_H
-#define LUCENEGDBMSOURCE_H
-
-#include "gsdlconf.h"
-#include "text_t.h"
-#include "comtypes.h"
-#include "maptools.h"
-#include "search.h"
-#include "source.h"
-
-
-class lucenegdbmsourceclass : public sourceclass {
-public:
-  lucenegdbmsourceclass ();
-  virtual ~lucenegdbmsourceclass ();
-
-  bool get_document (const text_t &OID, text_t &doc, 
-		     comerror_t &err, ostream &logout);
-
-};
-
-
-
-#endif
Index: gsdl/trunk/src/colservr/lucenesource.cpp
===================================================================
--- gsdl/trunk/src/colservr/lucenesource.cpp	(revision 15592)
+++ gsdl/trunk/src/colservr/lucenesource.cpp	(revision 15592)
@@ -0,0 +1,94 @@
+/**********************************************************************
+ *
+ * lucenegdbmsource.cpp -- 
+ * Copyright (C) 1999  The New Zealand Digital Library Project
+ *
+ * A component of the Greenstone digital library software
+ * from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *********************************************************************/
+
+#include "lucenesource.h"
+#include "fileutil.h"
+#include "OIDtools.h"
+#include "expat_document.h"
+#include "lucenesearch.h"
+
+lucenegdbmsourceclass::lucenegdbmsourceclass () 
+  : sourceclass()
+{
+  classname = "lucenesource";
+}
+
+lucenegdbmsourceclass::~lucenegdbmsourceclass () {
+}
+
+bool lucenegdbmsourceclass::get_document (const text_t &OID, text_t &doc, 
+				      comerror_t &err, ostream &logout) {
+
+  outconvertclass text_t2ascii;
+  err = noError;
+  if (db_ptr == NULL) {
+    // most likely a configuration problem
+    logout << text_t2ascii 
+	   << "configuration error: lucenegdbmsource contains a null dbclass\n\n";
+    err = configurationError;
+    return true;
+  }
+
+  // open the database
+  db_ptr->setlogout(&logout);
+  if (!db_ptr->opendatabase (db_filename, DB_READER, 100, false)) {
+    // most likely a system problem (we have already checked that the database exists)
+    logout << text_t2ascii
+	   << "system problem: open on database \"" << db_filename << "\" failed\n\n";
+    err = systemProblem;
+    return true;
+  }
+
+  text_t tOID = OID;
+  if (needs_translating (OID)) 
+    translate_OID (OID, tOID, err, logout);
+  infodbclass info;
+  if (!db_ptr->getinfo(tOID, info)) {
+    db_ptr->closedatabase();  // Important that local library doesn't leave any files open
+    return false;
+  }
+
+  if (info["hastxt"].getint() == 0) { // there is no text for this section
+    return false; // true??
+  }
+  int docnum = info["docnum"].getint();
+
+  // get the parent id
+  text_t parent_OID;
+  get_top(tOID, parent_OID);
+  
+  if (!db_ptr->getinfo(parent_OID, info)) {
+    db_ptr->closedatabase();  // Important that local library doesn't leave any files open
+    return false;
+  }
+
+  text_t archive_dir = info["archivedir"];
+  text_t full_path_to_doc = filename_cat(collectdir, "index", "text", archive_dir, "doc.xml");
+  
+  doc.clear();
+  db_ptr->closedatabase();  // Important that local library doesn't leave any files open
+  expat_document(full_path_to_doc, ((lucenesearchclass*)textsearchptr)->gdbm_level, text_t(docnum), doc);
+  return true;
+}
Index: gsdl/trunk/src/colservr/lucenesource.h
===================================================================
--- gsdl/trunk/src/colservr/lucenesource.h	(revision 15592)
+++ gsdl/trunk/src/colservr/lucenesource.h	(revision 15592)
@@ -0,0 +1,50 @@
+/**********************************************************************
+ *
+ * lucenegdbmsource.h -- 
+ * Copyright (C) 1999  The New Zealand Digital Library Project
+ *
+ * A component of the Greenstone digital library software
+ * from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *********************************************************************/
+
+
+#ifndef LUCENEGDBMSOURCE_H
+#define LUCENEGDBMSOURCE_H
+
+#include "gsdlconf.h"
+#include "text_t.h"
+#include "comtypes.h"
+#include "maptools.h"
+#include "search.h"
+#include "source.h"
+
+
+class lucenegdbmsourceclass : public sourceclass {
+public:
+  lucenegdbmsourceclass ();
+  virtual ~lucenegdbmsourceclass ();
+
+  bool get_document (const text_t &OID, text_t &doc, 
+		     comerror_t &err, ostream &logout);
+
+};
+
+
+
+#endif
Index: gsdl/trunk/src/colservr/mggdbmsource.cpp
===================================================================
--- gsdl/trunk/src/colservr/mggdbmsource.cpp	(revision 15591)
+++ 	(revision )
@@ -1,38 +1,0 @@
-/**********************************************************************
- *
- * mggdbmsource.cpp -- 
- * Copyright (C) 1999  The New Zealand Digital Library Project
- *
- * A component of the Greenstone digital library software
- * from the New Zealand Digital Library Project at the
- * University of Waikato, New Zealand.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *********************************************************************/
-
-#include "mggdbmsource.h"
-
-
-mggdbmsourceclass::mggdbmsourceclass () 
-  : sourceclass()
-{
-  classname = "mggdbsource";
-}
-
-mggdbmsourceclass::~mggdbmsourceclass () 
-{
-}
-
Index: gsdl/trunk/src/colservr/mggdbmsource.h
===================================================================
--- gsdl/trunk/src/colservr/mggdbmsource.h	(revision 15591)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/**********************************************************************
- *
- * mggdbmsource.h -- 
- * Copyright (C) 1999  The New Zealand Digital Library Project
- *
- * A component of the Greenstone digital library software
- * from the New Zealand Digital Library Project at the
- * University of Waikato, New Zealand.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *********************************************************************/
-
-
-#ifndef MGGDBMSOURCE_H
-#define MGGDBMSOURCE_H
-
-#include "source.h"
-
-
-class mggdbmsourceclass : public sourceclass {
-public:
-  mggdbmsourceclass ();
-  virtual ~mggdbmsourceclass ();
-
-};
-
-
-#endif
Index: gsdl/trunk/src/colservr/mgsource.cpp
===================================================================
--- gsdl/trunk/src/colservr/mgsource.cpp	(revision 15592)
+++ gsdl/trunk/src/colservr/mgsource.cpp	(revision 15592)
@@ -0,0 +1,38 @@
+/**********************************************************************
+ *
+ * mggdbmsource.cpp -- 
+ * Copyright (C) 1999  The New Zealand Digital Library Project
+ *
+ * A component of the Greenstone digital library software
+ * from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *********************************************************************/
+
+#include "mgsource.h"
+
+
+mggdbmsourceclass::mggdbmsourceclass () 
+  : sourceclass()
+{
+  classname = "mgsource";
+}
+
+mggdbmsourceclass::~mggdbmsourceclass () 
+{
+}
+
Index: gsdl/trunk/src/colservr/mgsource.h
===================================================================
--- gsdl/trunk/src/colservr/mgsource.h	(revision 15592)
+++ gsdl/trunk/src/colservr/mgsource.h	(revision 15592)
@@ -0,0 +1,41 @@
+/**********************************************************************
+ *
+ * mggdbmsource.h -- 
+ * Copyright (C) 1999  The New Zealand Digital Library Project
+ *
+ * A component of the Greenstone digital library software
+ * from the New Zealand Digital Library Project at the
+ * University of Waikato, New Zealand.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *********************************************************************/
+
+
+#ifndef MGGDBMSOURCE_H
+#define MGGDBMSOURCE_H
+
+#include "source.h"
+
+
+class mggdbmsourceclass : public sourceclass {
+public:
+  mggdbmsourceclass ();
+  virtual ~mggdbmsourceclass ();
+
+};
+
+
+#endif
Index: gsdl/trunk/src/colservr/win32.mak
===================================================================
--- gsdl/trunk/src/colservr/win32.mak	(revision 15591)
+++ gsdl/trunk/src/colservr/win32.mak	(revision 15592)
@@ -88,13 +88,12 @@
 	expat_resultset.cpp \
 	filter.cpp \
-	gdbmsource.cpp \
-	lucenegdbmsource.cpp \
 	lucenequeryfilter.cpp \
 	lucenesearch.cpp \
+	lucenesource.cpp \
 	maptools.cpp \
-	mggdbmsource.cpp \
 	mgq.c \
 	mgqueryfilter.cpp \
 	mgsearch.cpp \
+	mgsource.cpp \
 	mgppqueryfilter.cpp \
 	mgppsearch.cpp \
@@ -116,13 +115,12 @@
 	expat_resultset.obj \
 	filter.obj \
-	gdbmsource.obj \
-	lucenegdbmsource.obj \
 	lucenequeryfilter.obj \
 	lucenesearch.obj \
+	lucenesource.obj \
 	maptools.obj \
-	mggdbmsource.obj \
 	mgq.obj \
 	mgqueryfilter.obj \
 	mgsearch.obj \
+	mgsource.obj \
 	mgppqueryfilter.obj \
 	mgppsearch.obj \
