@Override public void run() { try { parser.parse(new BufferedReader(new FileReader(ntripleFile)), baseURI); } catch (RDFParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (RDFHandlerException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } };
} catch (RDFHandlerException e) { e.printStackTrace();
/** * Write contents of graph to writer using N3 serialization * * @param graph * @param writer */ public static void writeStatements(Collection<Statement> statements, OutputStream outputStream) { try { RDFWriter writer= Rio.createWriter(RDFFormat.N3, outputStream); writer.startRDF(); for(Statement statement:statements) { writer.handleStatement(statement); } writer.endRDF(); } catch (UnsupportedRDFormatException e) { e.printStackTrace(); } catch (RDFHandlerException e) { e.printStackTrace(); } }
RdfUtil.prettyPrintTurtle(graph.getNamespaceManager(), graph, turtleFile); } catch (RDFHandlerException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace();
e.printStackTrace(); throw new RdfConverterException("setting prefix failed", e); } catch (RepositoryException e) {
e.printStackTrace(); throw new RdfConverterException("setting prefix failed", e); } catch (RepositoryException e) {