You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/04/04 15:17:12 UTC
svn commit: r1309367 -
/incubator/jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_reader/MainWebReader.java
Author: andy
Date: Wed Apr 4 13:17:12 2012
New Revision: 1309367
URL: http://svn.apache.org/viewvc?rev=1309367&view=rev
Log: (empty)
Added:
incubator/jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_reader/MainWebReader.java
Added: incubator/jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_reader/MainWebReader.java
URL: http://svn.apache.org/viewvc/incubator/jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_reader/MainWebReader.java?rev=1309367&view=auto
==============================================================================
--- incubator/jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_reader/MainWebReader.java (added)
+++ incubator/jena/Scratch/AFS/Dev/trunk/src/main/java/projects/riot_reader/MainWebReader.java Wed Apr 4 13:17:12 2012
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package projects.riot_reader;
+
+import org.openjena.atlas.logging.Log ;
+import org.openjena.riot.WebContent ;
+
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.ModelFactory ;
+
+public class MainWebReader
+{
+ public static void main(String ... argv)
+ {
+ WebReader2.wireIntoJena() ;
+ Log.enable(WebReader2.class) ;
+
+ Model m = ModelFactory.createDefaultModel() ;
+ m.read("file:D.ttl", "RDF/XML") ;
+
+ System.out.println("triples = "+m.size()) ;
+ System.out.println("DONE") ;
+ System.exit(0) ;
+
+ WebReader2.read(m, "http://localhost:3030/ds/data?default", WebContent.contentTypeTurtle, null) ;
+ WebReader2.read(m, "file:./D.ttl", null, null) ;
+ //SSE.write(m) ;
+ System.out.println("triples = "+m.size()) ;
+ }
+}
+