Index: trunk/gsdl/src/colservr/collectserver.cpp
===================================================================
--- trunk/gsdl/src/colservr/collectserver.cpp	(revision 471)
+++ trunk/gsdl/src/colservr/collectserver.cpp	(revision 472)
@@ -13,4 +13,7 @@
 /*
    $Log$
+   Revision 1.13  1999/08/25 04:50:00  sjboddie
+   changed FilterRequest_t::docSet into an array
+
    Revision 1.12  1999/08/20 01:05:41  sjboddie
    fixed a bug (or created another one)
@@ -199,7 +202,7 @@
   // translate any ".fc", ".pr" etc. stuff in the docSet
   text_t translatedOID;
-  text_tset translatedOIDs;
-  text_tset::iterator doc_here = request.docSet.begin();
-  text_tset::iterator doc_end = request.docSet.end();
+  text_tarray translatedOIDs;
+  text_tarray::iterator doc_here = request.docSet.begin();
+  text_tarray::iterator doc_end = request.docSet.end();
   while (doc_here != doc_end) {
     if (needs_translating (*doc_here)) {
@@ -215,7 +218,7 @@
 	source_here++;
       }
-      translatedOIDs.insert (translatedOID);
+      translatedOIDs.push_back (translatedOID);
     } else {
-      translatedOIDs.insert (*doc_here);
+      translatedOIDs.push_back (*doc_here);
     }
     doc_here ++;
Index: trunk/gsdl/src/colservr/filter.cpp
===================================================================
--- trunk/gsdl/src/colservr/filter.cpp	(revision 471)
+++ trunk/gsdl/src/colservr/filter.cpp	(revision 472)
@@ -12,4 +12,7 @@
 /*
    $Log$
+   Revision 1.7  1999/08/25 04:49:33  sjboddie
+   changed FilterRequest_t::docSet into an array
+
    Revision 1.6  1999/07/16 03:42:23  sjboddie
    changed isApprox
@@ -111,6 +114,6 @@
       (request.filterResultOptions & FRmetadata)) {
     // copy the OIDs from the request to the response
-    text_tset::const_iterator here = request.docSet.begin();
-    text_tset::const_iterator end = request.docSet.end();
+    text_tarray::const_iterator here = request.docSet.begin();
+    text_tarray::const_iterator end = request.docSet.end();
     while (here != end) {
       resultdoc.OID = (*here);
@@ -244,4 +247,17 @@
 }
 
+void intersect (text_tarray &set1, const text_tarray &set2) {
+  text_tarray resultset;
+
+  text_tarray::const_iterator set1_here = set1.begin();
+  text_tarray::const_iterator set1_end = set1.end();
+
+  while (set1_here != set1_end) {
+    if (in_set (set2, *set1_here))
+      resultset.push_back (*set1_here);
+    set1_here ++;
+  }
+  set1 = resultset;
+}
 
 // tests to see if el is in set
@@ -267,2 +283,30 @@
   return false;
 }
+
+bool in_set (const text_tarray &set1, const text_t &el) {
+  text_t::const_iterator here = el.begin();
+  text_t::const_iterator end = el.begin();
+  text_t tryel, tryel_add;
+  bool first = true;
+
+  // the element is in the set if any of its parents are
+  // in the set
+  do {
+    // get next possible element to try
+    here = getdelimitstr (here, end, '.', tryel_add);
+    if (!first) tryel += ".";
+    first = false;
+    tryel += tryel_add;
+
+    // see if this element is in the set
+    text_tarray::const_iterator here = set1.begin();
+    text_tarray::const_iterator end = set1.end();
+    while (here != end) {
+      if (*here == tryel) break;
+      here ++;
+    }
+    if (here != end) return true;
+  } while (here != end);
+
+  return false;
+}
Index: trunk/gsdl/src/colservr/filter.h
===================================================================
--- trunk/gsdl/src/colservr/filter.h	(revision 471)
+++ trunk/gsdl/src/colservr/filter.h	(revision 472)
@@ -113,7 +113,9 @@
 void intersect (text_tset &set1, const text_tset &set2);
 void intersect (text_tarray &set1, const text_tset &set2);
+void intersect (text_tarray &set1, const text_tarray &set2);
 
 // tests to see if el is in set
 bool in_set (const text_tset &set1, const text_t &el);
+bool in_set (const text_tarray &set1, const text_t &el);
 
 #endif
Index: trunk/gsdl/src/recpt/OIDtools.cpp
===================================================================
--- trunk/gsdl/src/recpt/OIDtools.cpp	(revision 471)
+++ trunk/gsdl/src/recpt/OIDtools.cpp	(revision 472)
@@ -12,4 +12,7 @@
 /*
    $Log$
+   Revision 1.14  1999/08/25 04:45:25  sjboddie
+   changed FilterRequest_t::docSet into an array
+
    Revision 1.13  1999/08/10 22:44:06  sjboddie
    altered the get_contents function so it's now passed metadata
@@ -115,5 +118,5 @@
 bool get_info (const text_t &OID, const text_t &collection,
 	       const text_tarray &metadata, bool getParents,
-	       recptproto *collectproto,FilterResponse_t &response, 
+	       recptproto *collectproto, FilterResponse_t &response, 
 	       ostream &logout) {
 
@@ -127,5 +130,5 @@
   request.getParents = getParents;
   request.fields = metadata;
-  request.docSet.insert (OID);
+  request.docSet.push_back (OID);
   
   collectproto->filter (collection, request, response, err, logout);
@@ -143,5 +146,5 @@
 bool get_info (const text_tarray &OIDs, const text_t &collection,
 	       const text_tarray &metadata, bool getParents,
-	       recptproto *collectproto,FilterResponse_t &response, 
+	       recptproto *collectproto, FilterResponse_t &response, 
 	       ostream &logout) {
 
@@ -157,10 +160,5 @@
   request.fields = metadata;
 
-  text_tarray::const_iterator thisOID = OIDs.begin();
-  text_tarray::const_iterator endOID = OIDs.end();
-  while (thisOID != endOID) {
-    request.docSet.insert (*thisOID);
-    thisOID ++;
-  }
+  request.docSet = OIDs;
   
   collectproto->filter (collection, request, response, err, logout);
Index: trunk/gsdl/src/recpt/OIDtools.h
===================================================================
--- trunk/gsdl/src/recpt/OIDtools.h	(revision 471)
+++ trunk/gsdl/src/recpt/OIDtools.h	(revision 472)
@@ -37,5 +37,5 @@
 bool get_info (const text_tarray &OIDs, const text_t &collection,
 	       const text_tarray &metadata, bool getParents,
-	       recptproto *collectproto,FilterResponse_t &response, 
+	       recptproto *collectproto, FilterResponse_t &response, 
 	       ostream &logout);
 
Index: trunk/gsdl/src/recpt/comtypes.h
===================================================================
--- trunk/gsdl/src/recpt/comtypes.h	(revision 471)
+++ trunk/gsdl/src/recpt/comtypes.h	(revision 472)
@@ -209,5 +209,5 @@
   text_t filterName;
   OptionValue_tarray filterOptions;
-  text_tset docSet;        // empty if not used
+  text_tarray docSet;        // empty if not used
   int filterResultOptions; // use the FR* defines above
 
