Index: trunk/src/org/expeditee/greenstone/Greenstone3Connection.java
===================================================================
--- trunk/src/org/expeditee/greenstone/Greenstone3Connection.java	(revision 313)
+++ trunk/src/org/expeditee/greenstone/Greenstone3Connection.java	(revision 352)
@@ -17,5 +17,5 @@
 import java.util.Set;
 
-import org.apache.xerces.parsers.DOMParser;
+//import org.apache.xerces.parsers.DOMParser;
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
@@ -425,64 +425,76 @@
 		StringReader sr = new StringReader(result);
 		InputSource is = new InputSource(sr);
-		DOMParser p = new DOMParser();
-
-		try {
-			p.parse(is);
-		} catch (SAXException se) {
-			System.err.println(se);
-		} catch (IOException ioe) {
-			System.err.println(ioe);
-		}
-		Document d = p.getDocument();
-		NodeList metadataList = d.getElementsByTagName("metadata");
-		for (int i = 0; i < metadataList.getLength(); i++) {
-			Node n = metadataList.item(i);
-			NamedNodeMap nnm = n.getAttributes();
-			Node att = nnm.getNamedItem("name");
-			if (att.getNodeValue().compareTo("numDocsMatched") == 0) {
-				queryOutcome.setHowManyDocsMatched(n.getFirstChild()
-						.getNodeValue());
-			} else if (att.getNodeValue().compareTo("numDocsReturned") == 0) {
-				queryOutcome.setHowManyDocsReturned(n.getFirstChild()
-						.getNodeValue());
-			}
-		}
-
-		NodeList documentList = d.getElementsByTagName("documentNode");
-		for (int i = 0; i < documentList.getLength(); i++) {
-			Node n = documentList.item(i);
-			NamedNodeMap nnm = n.getAttributes();
-			Node nid = nnm.getNamedItem("nodeID");
-			Node nscore = nnm.getNamedItem("rank");
-			String docID = nid.getFirstChild().getNodeValue();
-			queryOutcome.addResult(docID, firstDoc + i, nscore.getFirstChild()
-					.getNodeValue());
-		}
-		query.addQueryOutcome(queryOutcome);
-		Query q = (Query) query.clone();
-		queryList.add(q);
-
-		for (int i = 0; i < documentList.getLength(); i++) {
-			Node n = documentList.item(i);
-			NamedNodeMap nnm = n.getAttributes();
-			Node nid = nnm.getNamedItem("nodeID");
-			Node nscore = nnm.getNamedItem("rank");
-			String docID = nid.getFirstChild().getNodeValue();
-
-			QueryContext queryContext = new QueryContext(firstDoc + i, nscore
-					.getFirstChild().getNodeValue(), q);
-			if (allResults.containsKey(docID)) {
-				ResultDocument resultDocument = (ResultDocument) allResults
-						.get(docID);
-				resultDocument.incrementFrequencyReturned();
-				resultDocument.addQueryContext(queryContext);
-				allResults.put(docID, resultDocument);
-			} else {
-				ResultDocument resultDocument = new ResultDocument();
-				resultDocument.addQueryContext(queryContext);
-				allResults.put(docID, resultDocument);
-			}
-		}
-		return queryOutcome;
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		return null;
+		
+//		DOMParser p = new DOMParser();
+//
+//		try {
+//			p.parse(is);
+//		} catch (SAXException se) {
+//			System.err.println(se);
+//		} catch (IOException ioe) {
+//			System.err.println(ioe);
+//		}
+//		Document d = p.getDocument();
+//		NodeList metadataList = d.getElementsByTagName("metadata");
+//		for (int i = 0; i < metadataList.getLength(); i++) {
+//			Node n = metadataList.item(i);
+//			NamedNodeMap nnm = n.getAttributes();
+//			Node att = nnm.getNamedItem("name");
+//			if (att.getNodeValue().compareTo("numDocsMatched") == 0) {
+//				queryOutcome.setHowManyDocsMatched(n.getFirstChild()
+//						.getNodeValue());
+//			} else if (att.getNodeValue().compareTo("numDocsReturned") == 0) {
+//				queryOutcome.setHowManyDocsReturned(n.getFirstChild()
+//						.getNodeValue());
+//			}
+//		}
+//
+//		NodeList documentList = d.getElementsByTagName("documentNode");
+//		for (int i = 0; i < documentList.getLength(); i++) {
+//			Node n = documentList.item(i);
+//			NamedNodeMap nnm = n.getAttributes();
+//			Node nid = nnm.getNamedItem("nodeID");
+//			Node nscore = nnm.getNamedItem("rank");
+//			String docID = nid.getFirstChild().getNodeValue();
+//			queryOutcome.addResult(docID, firstDoc + i, nscore.getFirstChild()
+//					.getNodeValue());
+//		}
+//		query.addQueryOutcome(queryOutcome);
+//		Query q = (Query) query.clone();
+//		queryList.add(q);
+//
+//		for (int i = 0; i < documentList.getLength(); i++) {
+//			Node n = documentList.item(i);
+//			NamedNodeMap nnm = n.getAttributes();
+//			Node nid = nnm.getNamedItem("nodeID");
+//			Node nscore = nnm.getNamedItem("rank");
+//			String docID = nid.getFirstChild().getNodeValue();
+//
+//			QueryContext queryContext = new QueryContext(firstDoc + i, nscore
+//					.getFirstChild().getNodeValue(), q);
+//			if (allResults.containsKey(docID)) {
+//				ResultDocument resultDocument = (ResultDocument) allResults
+//						.get(docID);
+//				resultDocument.incrementFrequencyReturned();
+//				resultDocument.addQueryContext(queryContext);
+//				allResults.put(docID, resultDocument);
+//			} else {
+//				ResultDocument resultDocument = new ResultDocument();
+//				resultDocument.addQueryContext(queryContext);
+//				allResults.put(docID, resultDocument);
+//			}
+//		}
+//		return queryOutcome;
 	}
 
@@ -554,13 +566,14 @@
 		StringReader sr = new StringReader(result);
 		InputSource is = new InputSource(sr);
-		DOMParser p = new DOMParser();
-		try {
-			p.parse(is);
+		//DOMParser p = new DOMParser();
+	/*	try {
+			//p.parse(is);
 		} catch (SAXException se) {
 			System.err.println(se);
 		} catch (IOException ioe) {
 			System.err.println(ioe);
-		}
-		Document d = p.getDocument();
+		}*/
+		//Document d = p.getDocument();
+		Document d = null;
 		NodeList metadataList = d.getElementsByTagName("metadata");
 		String metadataval = null;
@@ -690,16 +703,17 @@
 		StringReader sr = new StringReader(result);
 		InputSource is = new InputSource(sr);
-		DOMParser p = new DOMParser();
-		try {
-			p.parse(is);
-		} catch (SAXException se) {
-			System.err.println(se);
-		} catch (IOException ioe) {
-			System.err.println(ioe);
-		}
+//		DOMParser p = new DOMParser();
+//		try {
+//			p.parse(is);
+//		} catch (SAXException se) {
+//			System.err.println(se);
+//		} catch (IOException ioe) {
+//			System.err.println(ioe);
+//		}
 
 		String returnName = null;
 
-		Document d = p.getDocument();
+		//Document d = p.getDocument();
+		Document d = null;
 		NodeList metadataList = d.getElementsByTagName("metadata");
 		for (int i = 0; i < metadataList.getLength(); i++) {
@@ -736,14 +750,14 @@
 		StringReader sr = new StringReader(result);
 		InputSource is = new InputSource(sr);
-		DOMParser p = new DOMParser();
-		try {
-			p.parse(is);
-		} catch (SAXException se) {
-			System.err.println(se);
-		} catch (IOException ioe) {
-			System.err.println(ioe);
-		}
-		Document d = p.getDocument();
-
+//		DOMParser p = new DOMParser();
+//		try {
+//			p.parse(is);
+//		} catch (SAXException se) {
+//			System.err.println(se);
+//		} catch (IOException ioe) {
+//			System.err.println(ioe);
+//		}
+//		Document d = p.getDocument();
+		Document d = null;
 		NodeList childList = d.getElementsByTagName("classifierNode");
 		NodeList documentList = d.getElementsByTagName("documentNode");
