From 0d8f240c9c0a64f2285324e5a517161e45c698fc Mon Sep 17 00:00:00 2001 From: yzhou Date: Thu, 30 Apr 2015 17:36:35 +0100 Subject: downgrade owl api and reorganised src files --- test/uk/ac/ox/cs/data/WriteToNTriple.java | 57 ------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 test/uk/ac/ox/cs/data/WriteToNTriple.java (limited to 'test/uk/ac/ox/cs/data/WriteToNTriple.java') diff --git a/test/uk/ac/ox/cs/data/WriteToNTriple.java b/test/uk/ac/ox/cs/data/WriteToNTriple.java deleted file mode 100644 index 27e69b9..0000000 --- a/test/uk/ac/ox/cs/data/WriteToNTriple.java +++ /dev/null @@ -1,57 +0,0 @@ -package uk.ac.ox.cs.data; - -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; - -import org.openrdf.model.Statement; -import org.openrdf.rio.RDFHandler; -import org.openrdf.rio.RDFHandlerException; -import org.openrdf.rio.RDFParseException; -import org.openrdf.rio.RDFParser; -import org.openrdf.rio.RDFWriter; -import org.openrdf.rio.ntriples.NTriplesWriter; -import org.openrdf.rio.turtle.TurtleParser; - - -public class WriteToNTriple { - - public static void main(String... args) throws RDFParseException, RDFHandlerException, IOException { - if (args.length == 0) - args = new String[] {"/media/krr-nas-share/Yujiao/ontologies/bio2rdf/reactome/data/data.ttl", - "http://www.biopax.org/release/biopax-level3.owl#"}; - - RDFParser parser = new TurtleParser(); - final RDFWriter writer = new NTriplesWriter(new FileOutputStream(args[0].replace(".ttl", ".nt"))); - - parser.setRDFHandler(new RDFHandler() { - - @Override - public void startRDF() throws RDFHandlerException { - writer.startRDF(); - } - - @Override - public void handleStatement(Statement arg0) throws RDFHandlerException { - writer.handleStatement(arg0); - } - - @Override - public void handleNamespace(String arg0, String arg1) throws RDFHandlerException { - writer.handleNamespace(arg0, arg1); - } - - @Override - public void handleComment(String arg0) throws RDFHandlerException { - writer.handleComment(arg0); - } - - @Override - public void endRDF() throws RDFHandlerException { - writer.endRDF(); - } - }); - - parser.parse(new FileInputStream(args[0]), args[1]); - } -} -- cgit v1.2.3