/** Starts an RDF/XML to NTriple converter. * @param args The command-line arguments. */ static public void main(String args[]) { mainEh(args, null, null); } static StatementHandler andMeToo = null;
/** Starts an RDF/XML to NTriple converter. * @param args The command-line arguments. */ static public void main(String args[]) { mainEh(args, null, null); } static StatementHandler andMeToo = null;
static void loadFile(String fileName) { PrintStream oldOut = System.out; try ( PrintStream out = new PrintStream(new OutputStream() { @Override public void write(int b) throws IOException { } });) { NTriple.mainEh(new String[] { "-b", "http://eg.org/", "-t", fileName }, null, null); } finally { System.setOut(oldOut); } }
static void loadFile(String fileName) { PrintStream oldOut = System.out; try ( PrintStream out = new PrintStream(new OutputStream() { @Override public void write(int b) throws IOException { } });) { NTriple.mainEh(new String[] { "-b", "http://eg.org/", "-t", fileName }, null, null); } finally { System.setOut(oldOut); } }
@Override public void runTest() throws IOException { ByteArrayOutputStream goodBytes = new ByteArrayOutputStream(); ByteArrayOutputStream badBytes = new ByteArrayOutputStream(); PrintStream oldOut = System.out; PrintStream oldErr = System.err; try (PrintStream out = new PrintStream(goodBytes); PrintStream err = new PrintStream(badBytes); ) { System.setOut(out); System.setErr(err); NTriple.mainEh(new String[]{"-e","102,136,105,103,108,107,116,106,004,131", "-E","-b",base,fileName},this,null); } finally { System.setErr(oldErr); System.setOut(oldOut); } InputStream good = new ByteArrayInputStream(goodBytes.toByteArray()); InputStream bad = new ByteArrayInputStream(badBytes.toByteArray()); compare(good,goodTriples); compare(bad,badTriples); }
@Override public void runTest() throws IOException { ByteArrayOutputStream goodBytes = new ByteArrayOutputStream(); ByteArrayOutputStream badBytes = new ByteArrayOutputStream(); PrintStream oldOut = System.out; PrintStream oldErr = System.err; try (PrintStream out = new PrintStream(goodBytes); PrintStream err = new PrintStream(badBytes); ) { System.setOut(out); System.setErr(err); NTriple.mainEh(new String[]{"-e","102,136,105,103,108,107,116,106,004,131", "-E","-b",base,fileName},this,null); } finally { System.setErr(oldErr); System.setOut(oldOut); } InputStream good = new ByteArrayInputStream(goodBytes.toByteArray()); InputStream bad = new ByteArrayInputStream(badBytes.toByteArray()); compare(good,goodTriples); compare(bad,badTriples); }
System.setOut(out); try { NTriple.mainEh(new String[] { "-b", base, "-s" }, th, th); } catch (SimulatedException e) { if (wantModel)
System.setOut(out); try { NTriple.mainEh(new String[] { "-b", base, "-s" }, th, th); } catch (SimulatedException e) { if (wantModel)