2006/unicorn/org/w3c/unicorn/response/parser DefaultParser.java,1.5,1.6 ResponseParser.java,1.2,1.3 ResponseParserFactory.java,1.3,1.4

Update of /sources/public/2006/unicorn/org/w3c/unicorn/response/parser
In directory hutz:/tmp/cvs-serv11277/org/w3c/unicorn/response/parser

Modified Files:
	DefaultParser.java ResponseParser.java 
	ResponseParserFactory.java 
Log Message:
first version that works with Jigsaw + fixed a bug in cond handling + removed parse(InputStream)

Index: ResponseParserFactory.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/response/parser/ResponseParserFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ResponseParserFactory.java	10 Sep 2008 10:10:40 -0000	1.3
+++ ResponseParserFactory.java	12 Sep 2008 18:01:51 -0000	1.4
@@ -31,26 +31,12 @@
 	}
 	
 	/**
-	 * Parses the input stream thanks to a response parse and 
+	 * Parses the string thanks to a response parser and 
 	 * returns the response.
-	 * @param is The input stream.
+	 * @param r the string
 	 * @param responseType The type of the response.
 	 * @return The response parsed corresponding to the input.
 	 */
-	public static Response parse(InputStream is, String responseType) {
-		try {
-			Response response = createResponseParser(responseType).parse(is);
-			return response;
-		} catch (SAXException e) {
-			e.printStackTrace();
-		} catch (ParserConfigurationException e) {
-			e.printStackTrace();
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
-		return null;
-	} 
-
     public static Response parse(String r, String responseType) {
 		try {
 			Response response = createResponseParser(responseType).parse(r);

Index: ResponseParser.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/response/parser/ResponseParser.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ResponseParser.java	10 Sep 2008 10:10:40 -0000	1.2
+++ ResponseParser.java	12 Sep 2008 18:01:51 -0000	1.3
@@ -5,6 +5,5 @@
 import org.w3c.unicorn.response.Response;
 
 public interface ResponseParser {
-	public Response parse(InputStream inputStream);
   public Response parse(String r);
 }

Index: DefaultParser.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/response/parser/DefaultParser.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- DefaultParser.java	10 Sep 2008 10:10:40 -0000	1.5
+++ DefaultParser.java	12 Sep 2008 18:01:51 -0000	1.6
@@ -27,7 +27,6 @@
 import org.w3c.unicorn.response.Result;
 import org.w3c.unicorn.response.Warning;
 import org.w3c.unicorn.util.LocalizedString;
-import java.io.*;
 
 /**
  * Default parser class.
@@ -37,27 +36,6 @@
 	protected static final Log logger = LogFactory
 			.getLog("org.w3c.unicorn.response.parser.DefaultParser");
 
-	/**
-	 * Parses the input and returns the response.
-	 * @param inputStream The input stream.
-	 * @return The corresponding response.
-	 */
-	public Response parse(InputStream inputStream) {
-			try {
-          org.w3.unicorn.observationresponse.ObservationresponseDocument ord = org.w3.unicorn.observationresponse.ObservationresponseDocument.Factory.parse(inputStream);
-          return swap(ord);
-			} catch (XmlException e) {
-				e.printStackTrace();
-				logger.error("XMLBeansException : " + e.getMessage(), e);
-				return null;
-			} catch (IOException e) {
-				e.printStackTrace();
-				logger.error("XMLBeansException : " + e.getMessage(), e);
-				return null;
-      }
-
-	}
-
     /**
 	 * Parses the input and returns the response.
 	 * @param inputStream The input stream.

Received on Friday, 12 September 2008 18:03:13 UTC