- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 13 Aug 2009 17:28:36 +0000
- To: www-validator-cvs@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