public SPARQLResultsHTMLWriter(OutputStream out) { this.out = out; this.config = new WriterConfig(); }
public SPARQLResultsHTMLWriter(OutputStream out) { this.out = out; this.config = new WriterConfig(); }
public TurtlePrettyPrinter(URI base, Writer writer) { Objects.requireNonNull(writer, "Writer cannot be null"); this.base = base; this.out = new PrintWriter(writer); this.logPrefix = String.format("[%d] ",id); this.writerConfig=new WriterConfig(); }
/** * Writes the given statement to the given {@link OutputStream} in the given * format. * <p> * * @param st * The statement to be written. * @param output * The {@link OutputStream} to write the statement to. * @param dataFormat * The {@link RDFFormat} to use when writing the statement. * @throws RDFHandlerException * Thrown if there is an error writing the statement. * @throws UnsupportedRDFormatException * If no {@link RDFWriter} is available for the specified RDF format. * @since 2.8.0 */ public static void write(Statement st, OutputStream output, RDFFormat dataFormat) throws RDFHandlerException { write(st, output, dataFormat, new WriterConfig()); }
/** * Writes the given single statement to the given {@link Writer} in the given * format. * <p> * * @param statement * A statement to be written. * @param output * The {@link Writer} to write the statement to. * @param dataFormat * The {@link RDFFormat} to use when writing the statement. * @throws RDFHandlerException * Thrown if there is an error writing the statement. * @throws UnsupportedRDFormatException * If no {@link RDFWriter} is available for the specified RDF format. * @since 2.8.0 */ public static void write(Statement statement, Writer output, RDFFormat dataFormat) throws RDFHandlerException { write(statement, output, dataFormat, new WriterConfig()); }
/** * Writes the given statements to the given {@link Writer} in the given * format. * <p> * If the collection is a {@link Model}, its namespaces will also be written. * * @param model * A collection of statements, such as a {@link Model}, to be written. * @param output * The {@link Writer} to write the statements to. * @param dataFormat * The {@link RDFFormat} to use when writing the statements. * @throws RDFHandlerException * Thrown if there is an error writing the statements. * @throws UnsupportedRDFormatException * If no {@link RDFWriter} is available for the specified RDF format. * @since 2.7.1 */ public static void write(Iterable<Statement> model, Writer output, RDFFormat dataFormat) throws RDFHandlerException { write(model, output, dataFormat, new WriterConfig()); }
/** * Writes the given statements to the given {@link OutputStream} in the given * format. * <p> * If the collection is a {@link Model}, its namespaces will also be written. * * @param model * A collection of statements, such as a {@link Model}, to be written. * @param output * The {@link OutputStream} to write the statements to. * @param dataFormat * The {@link RDFFormat} to use when writing the statements. * @throws RDFHandlerException * Thrown if there is an error writing the statements. * @throws UnsupportedRDFormatException * If no {@link RDFWriter} is available for the specified RDF format. * @since 2.7.1 */ public static void write(Iterable<Statement> model, OutputStream output, RDFFormat dataFormat) throws RDFHandlerException { write(model, output, dataFormat, new WriterConfig()); }
/** * @throws java.lang.Exception */ @Before public void setUp() throws Exception { this.testWriter = new StringWriter(); this.testWriterConfig = new WriterConfig(); this.testWriterConfig.set(BasicWriterSettings.PRETTY_PRINT, false); }
WriterConfig writerConfig = new WriterConfig(); writerConfig.set(BasicWriterSettings.PRETTY_PRINT, Boolean.valueOf(this.isWritePretty()));
WriterConfig writerConfig = new WriterConfig(); writerConfig.set(JSONLDSettings.JSONLD_MODE, JSONLDMode.COMPACT); writerConfig.set(JSONLDSettings.OPTIMIZE, Boolean.TRUE);