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

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

Modified Files:
	DefaultParser.java ResponseParser.java 
	ResponseParserFactory.java 
Log Message:
Restored ClientHttpRequest as Apache's HttpClient was making the markup validator fail on file upload (in streaming mode) for not much added benefit.
Same goes for EscapeXMLEntities. Not much benefit from using Apache's classes which need several dependencies

Index: ResponseParserFactory.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/response/parser/ResponseParserFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ResponseParserFactory.java	28 Aug 2009 12:40:07 -0000	1.2
+++ ResponseParserFactory.java	3 Sep 2009 16:43:20 -0000	1.3
@@ -41,8 +41,9 @@
 	 * @param responseType
 	 *            The type of the response.
 	 * @return The response parsed corresponding to the input.
+	 * @throws Exception 
 	 */
-	public static Response parse(String r, String responseType) {
+	public static Response parse(String r, String responseType) throws Exception {
 		try {
 			Response response = createResponseParser(responseType).parse(r);
 			return response;

Index: ResponseParser.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/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	28 Aug 2009 12:40:07 -0000	1.2
+++ ResponseParser.java	3 Sep 2009 16:43:20 -0000	1.3
@@ -3,5 +3,5 @@
 import org.w3c.unicorn.response.Response;
 
 public interface ResponseParser {
-	public Response parse(String r);
+	public Response parse(String r) throws Exception;
 }

Index: DefaultParser.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/response/parser/DefaultParser.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- DefaultParser.java	28 Aug 2009 16:11:41 -0000	1.3
+++ DefaultParser.java	3 Sep 2009 16:43:20 -0000	1.4
@@ -43,20 +43,11 @@
 	 * @param inputStream
 	 *            The input stream.
 	 * @return The corresponding response.
+	 * @throws Exception 
 	 */
-	public Response parse(String r) {
-
-		try {
-			/*XmlOptions opts = new XmlOptions();
-			opts.setCharacterEncoding("UTF-8");*/
-			
-			org.w3.unicorn.observationresponse.ObservationresponseDocument ord = org.w3.unicorn.observationresponse.ObservationresponseDocument.Factory
-					.parse(r);
-			return swap(ord);
-		} catch (Exception e) {
-			e.printStackTrace();
-			return null;
-		}
+	public Response parse(String r) throws Exception {
+		ObservationresponseDocument ord = ObservationresponseDocument.Factory.parse(r);
+		return swap(ord);
 	}
 
 	/**

Received on Thursday, 3 September 2009 16:43:32 UTC