W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2009

2006/unicorn/src/org/w3c/unicorn/tasklist RDFUnmarshallerJena.java,1.1.2.2,1.1.2.3

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 13 Aug 2009 17:28:36 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Mbe6O-0003tJ-HK@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/tasklist
In directory hutz:/tmp/cvs-serv14852/src/org/w3c/unicorn/tasklist

Modified Files:
      Tag: dev2
	RDFUnmarshallerJena.java 
Log Message:
language negociation

Index: RDFUnmarshallerJena.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/tasklist/Attic/RDFUnmarshallerJena.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -d -r1.1.2.2 -r1.1.2.3
--- RDFUnmarshallerJena.java	12 Aug 2009 13:15:20 -0000	1.1.2.2
+++ RDFUnmarshallerJena.java	13 Aug 2009 17:28:34 -0000	1.1.2.3
@@ -4,7 +4,10 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 package org.w3c.unicorn.tasklist;
 
+import java.io.FileInputStream;
 import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.Map;
 import org.apache.commons.logging.Log;
@@ -121,7 +124,19 @@
 			RDFUnmarshallerJena.logger.debug("URL : " + aURL + ".");
 		}
 		final Model aModel = ModelFactory.createDefaultModel();
-		aModel.read(aURL.openStream(), null);
+		
+		FileInputStream fis;
+		try {
+			fis = new FileInputStream(aURL.toURI().getPath());
+			InputStreamReader isr = new InputStreamReader(fis, "UTF-8");
+			aModel.read(fis, null);
+		} catch (URISyntaxException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		
+		//aModel.read(aURL.openStream(), null);
 		this.aModel.add(aModel);
 	}
 
Received on Thursday, 13 August 2009 17:28:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:38 UTC