/** * Convenience methods for creating RDFWriter objects. This method uses the registry returned by * {@link RDFWriterRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate writer. * * @throws UnsupportedRDFormatException * If no writer is available for the specified RDF format. */ public static RDFWriter createWriter(RDFFormat format, Writer writer) throws UnsupportedRDFormatException { RDFWriterFactory factory = RDFWriterRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getWriter(writer); }
/** * Convenience methods for creating RDFWriter objects. This method uses the registry returned by * {@link RDFWriterRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate writer. * * @throws UnsupportedRDFormatException * If no writer is available for the specified RDF format. */ public static RDFWriter createWriter(RDFFormat format, OutputStream out) throws UnsupportedRDFormatException { RDFWriterFactory factory = RDFWriterRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getWriter(out); }
/** * Convenience methods for creating RDFWriter objects. This method uses the registry returned by * {@link RDFWriterRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate writer. * * @throws UnsupportedRDFormatException * If no writer is available for the specified RDF format. */ public static RDFWriter createWriter(RDFFormat format, Writer writer) throws UnsupportedRDFormatException { RDFWriterFactory factory = RDFWriterRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getWriter(writer); }
/** * Convenience methods for creating RDFWriter objects. This method uses the registry returned by * {@link RDFWriterRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate writer. * * @throws UnsupportedRDFormatException * If no writer is available for the specified RDF format. */ public static RDFWriter createWriter(RDFFormat format, OutputStream out) throws UnsupportedRDFormatException { RDFWriterFactory factory = RDFWriterRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getWriter(out); }
/** * Convenience methods for creating RDFWriter objects. This method uses the registry returned by * {@link RDFWriterRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate writer. * * @throws UnsupportedRDFormatException * If no writer is available for the specified RDF format. */ public static RDFWriter createWriter(RDFFormat format, OutputStream out) throws UnsupportedRDFormatException { RDFWriterFactory factory = RDFWriterRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getWriter(out); }
/** * Convenience methods for creating RDFWriter objects. This method uses the registry returned by * {@link RDFWriterRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate writer. * * @throws UnsupportedRDFormatException * If no writer is available for the specified RDF format. * @throws URISyntaxException * If the baseURI is invalid */ public static RDFWriter createWriter(RDFFormat format, Writer writer, String baseURI) throws UnsupportedRDFormatException, URISyntaxException { RDFWriterFactory factory = RDFWriterRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getWriter(writer, baseURI); }
/** * Convenience methods for creating RDFWriter objects. This method uses the registry returned by * {@link RDFWriterRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate writer. * * @throws UnsupportedRDFormatException * If no writer is available for the specified RDF format. */ public static RDFWriter createWriter(RDFFormat format, Writer writer) throws UnsupportedRDFormatException { RDFWriterFactory factory = RDFWriterRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getWriter(writer); }
/** * Convenience methods for creating RDFWriter objects. This method uses the registry returned by * {@link RDFWriterRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate writer. * * @throws UnsupportedRDFormatException * If no writer is available for the specified RDF format. * @throws URISyntaxException * If the baseURI is invalid */ public static RDFWriter createWriter(RDFFormat format, OutputStream out, String baseURI) throws UnsupportedRDFormatException, URISyntaxException { RDFWriterFactory factory = RDFWriterRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getWriter(out, baseURI); }
/** * Convenience methods for creating RDFWriter objects. This method uses the registry returned by * {@link RDFWriterRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate writer. * * @throws UnsupportedRDFormatException * If no writer is available for the specified RDF format. * @throws URISyntaxException * If the baseURI is invalid */ public static RDFWriter createWriter(RDFFormat format, OutputStream out, String baseURI) throws UnsupportedRDFormatException, URISyntaxException { RDFWriterFactory factory = RDFWriterRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getWriter(out, baseURI); }
/** * Convenience methods for creating RDFWriter objects. This method uses the registry returned by * {@link RDFWriterRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate writer. * * @throws UnsupportedRDFormatException * If no writer is available for the specified RDF format. * @throws URISyntaxException * If the baseURI is invalid */ public static RDFWriter createWriter(RDFFormat format, Writer writer, String baseURI) throws UnsupportedRDFormatException, URISyntaxException { RDFWriterFactory factory = RDFWriterRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getWriter(writer, baseURI); }
/** * Convenience methods for creating RDFWriter objects. This method uses the registry returned by * {@link RDFWriterRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate writer. * * @throws UnsupportedRDFormatException * If no writer is available for the specified RDF format. * @throws URISyntaxException * If the baseURI is invalid */ public static RDFWriter createWriter(RDFFormat format, Writer writer, String baseURI) throws UnsupportedRDFormatException, URISyntaxException { RDFWriterFactory factory = RDFWriterRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getWriter(writer, baseURI); }
/** * Convenience methods for creating RDFWriter objects. This method uses the registry returned by * {@link RDFWriterRegistry#getInstance()} to get a factory for the specified format and uses this factory * to create the appropriate writer. * * @throws UnsupportedRDFormatException * If no writer is available for the specified RDF format. * @throws URISyntaxException * If the baseURI is invalid */ public static RDFWriter createWriter(RDFFormat format, OutputStream out, String baseURI) throws UnsupportedRDFormatException, URISyntaxException { RDFWriterFactory factory = RDFWriterRegistry.getInstance().get(format).orElseThrow( Rio.unsupportedFormat(format)); return factory.getWriter(out, baseURI); }
exchange.sendResponseHeaders(HTTP_OK_STATUS, 0); try (BufferedOutputStream response = new BufferedOutputStream(exchange.getResponseBody())) { RDFWriter w = RDFWriterRegistry.getInstance().get(format).get().getWriter(response); w.setWriterConfig(writerConfig); ((GraphQuery) query).evaluate(w);