org.eclipse.rdf4j.rio.RDFHandler Java Examples
The following examples show how to use
org.eclipse.rdf4j.rio.RDFHandler.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: QueryResults.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
/** * Reports a graph query result to an {@link RDFHandler}. <br> * The {@link GraphQueryResult#close()} method will always be called before this method returns.<br> * If there is an exception generated by the GraphQueryResult, {@link RDFHandler#endRDF()} will not be called. * * @param gqr The query result to report. * @param rdfHandler The handler to report the query result to. * @throws RDFHandlerException If such an exception is thrown by the used RDF writer. * @throws QueryEvaluationException */ public static void report(GraphQueryResult gqr, RDFHandler rdfHandler) throws RDFHandlerException, QueryEvaluationException { try { rdfHandler.startRDF(); for (Map.Entry<String, String> entry : gqr.getNamespaces().entrySet()) { String prefix = entry.getKey(); String namespace = entry.getValue(); rdfHandler.handleNamespace(prefix, namespace); } while (gqr.hasNext()) { Statement st = gqr.next(); rdfHandler.handleStatement(st); } } finally { gqr.close(); } rdfHandler.endRDF(); }
Example #2
Source File: SpinRenderer.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
public void render(ParsedDescribeQuery query, RDFHandler handler) throws RDFHandlerException { handler.startRDF(); Resource querySubj = valueFactory.createBNode(); handler.handleStatement(valueFactory.createStatement(querySubj, RDF.TYPE, SP.DESCRIBE_CLASS)); if (output.text) { handler.handleStatement(valueFactory.createStatement(querySubj, SP.TEXT_PROPERTY, valueFactory.createLiteral(query.getSourceString()))); } if (output.rdf) { TupleExpr expr = query.getTupleExpr(); SpinVisitor visitor = new DescribeVisitor(handler, querySubj, query.getDataset()); expr.visit(visitor); visitor.end(); } handler.endRDF(); }
Example #3
Source File: SpinRenderer.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
public void render(ParsedTupleQuery query, RDFHandler handler) throws RDFHandlerException { handler.startRDF(); Resource querySubj = valueFactory.createBNode(); handler.handleStatement(valueFactory.createStatement(querySubj, RDF.TYPE, SP.SELECT_CLASS)); if (output.text) { handler.handleStatement(valueFactory.createStatement(querySubj, SP.TEXT_PROPERTY, valueFactory.createLiteral(query.getSourceString()))); } if (output.rdf) { TupleExpr expr = query.getTupleExpr(); SpinVisitor visitor = new SpinVisitor(handler, null, querySubj, query.getDataset()); expr.visit(visitor); visitor.end(); } handler.endRDF(); }
Example #4
Source File: SpinRenderer.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
public void render(ParsedGraphQuery query, RDFHandler handler) throws RDFHandlerException { handler.startRDF(); Resource querySubj = valueFactory.createBNode(); handler.handleStatement(valueFactory.createStatement(querySubj, RDF.TYPE, SP.CONSTRUCT_CLASS)); if (output.text) { handler.handleStatement(valueFactory.createStatement(querySubj, SP.TEXT_PROPERTY, valueFactory.createLiteral(query.getSourceString()))); } if (output.rdf) { TupleExpr expr = query.getTupleExpr(); SpinVisitor visitor = new ConstructVisitor(handler, querySubj, query.getDataset()); expr.visit(visitor); visitor.end(); } handler.endRDF(); }
Example #5
Source File: SpinRenderer.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
public void render(ParsedBooleanQuery query, RDFHandler handler) throws RDFHandlerException { handler.startRDF(); Resource querySubj = valueFactory.createBNode(); handler.handleStatement(valueFactory.createStatement(querySubj, RDF.TYPE, SP.ASK_CLASS)); if (output.text) { handler.handleStatement(valueFactory.createStatement(querySubj, SP.TEXT_PROPERTY, valueFactory.createLiteral(query.getSourceString()))); } if (output.rdf) { Resource whereBNode = valueFactory.createBNode(); handler.handleStatement(valueFactory.createStatement(querySubj, SP.WHERE_PROPERTY, whereBNode)); TupleExpr expr = query.getTupleExpr(); SpinVisitor visitor = new AskVisitor(handler, whereBNode, query.getDataset()); expr.visit(visitor); visitor.end(); } handler.endRDF(); }
Example #6
Source File: EndpointFactory.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
/** * Utility function to load federation members from a data configuration file. * * <p> * A data configuration file provides information about federation members in form of turtle. Currently the types * NativeStore, ResolvableEndpoint and SPARQLEndpoint are supported. For details please refer to the documentation * in {@link NativeRepositoryInformation}, {@link ResolvableRepositoryInformation} and * {@link SPARQLRepositoryInformation}. * </p> * * @param dataConfig * * @return a list of initialized endpoints, i.e. the federation members * * @throws IOException * @throws Exception */ public static List<Endpoint> loadFederationMembers(File dataConfig, File fedXBaseDir) throws FedXException { if (!dataConfig.exists()) { throw new FedXRuntimeException("File does not exist: " + dataConfig.getAbsolutePath()); } Model graph = new TreeModel(); RDFParser parser = Rio.createParser(RDFFormat.TURTLE); RDFHandler handler = new DefaultRDFHandler(graph); parser.setRDFHandler(handler); try (FileReader fr = new FileReader(dataConfig)) { parser.parse(fr, Vocabulary.FEDX.NAMESPACE); } catch (Exception e) { throw new FedXException("Unable to parse dataconfig " + dataConfig + ":" + e.getMessage()); } return loadFederationMembers(graph, fedXBaseDir); }
Example #7
Source File: SailUpdateExecutor.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
/** * @param insertDataExpr * @param uc * @throws SailException */ protected void executeInsertData(InsertData insertDataExpr, UpdateContext uc, int maxExecutionTime) throws SailException { SPARQLUpdateDataBlockParser parser = new SPARQLUpdateDataBlockParser(vf); RDFHandler handler = new RDFSailInserter(con, vf, uc); if (maxExecutionTime > 0) { handler = new TimeLimitRDFHandler(handler, 1000L * maxExecutionTime); } parser.setRDFHandler(handler); parser.setLineNumberOffset(insertDataExpr.getLineNumberOffset()); parser.getParserConfig().addNonFatalError(BasicParserSettings.VERIFY_DATATYPE_VALUES); parser.getParserConfig().addNonFatalError(BasicParserSettings.FAIL_ON_UNKNOWN_DATATYPES); parser.getParserConfig().set(BasicParserSettings.SKOLEMIZE_ORIGIN, null); try { // TODO process update context somehow? dataset, base URI, etc. parser.parse(new StringReader(insertDataExpr.getDataBlock()), ""); } catch (RDFParseException | RDFHandlerException | IOException e) { throw new SailException(e); } }
Example #8
Source File: SailUpdateExecutor.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
/** * @param deleteDataExpr * @param uc * @throws SailException */ protected void executeDeleteData(DeleteData deleteDataExpr, UpdateContext uc, int maxExecutionTime) throws SailException { SPARQLUpdateDataBlockParser parser = new SPARQLUpdateDataBlockParser(vf); parser.setLineNumberOffset(deleteDataExpr.getLineNumberOffset()); parser.setAllowBlankNodes(false); // no blank nodes allowed in DELETE DATA. RDFHandler handler = new RDFSailRemover(con, vf, uc); if (maxExecutionTime > 0) { handler = new TimeLimitRDFHandler(handler, 1000L * maxExecutionTime); } parser.setRDFHandler(handler); try { // TODO process update context somehow? dataset, base URI, etc. parser.parse(new StringReader(deleteDataExpr.getDataBlock()), ""); } catch (RDFParseException | RDFHandlerException | IOException e) { throw new SailException(e); } }
Example #9
Source File: SailRepositoryConnection.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
@Override public void exportStatements(Resource subj, IRI pred, Value obj, boolean includeInferred, RDFHandler handler, Resource... contexts) throws RepositoryException, RDFHandlerException { handler.startRDF(); try ( // Export namespace information CloseableIteration<? extends Namespace, RepositoryException> nsIter = getNamespaces()) { while (nsIter.hasNext()) { Namespace ns = nsIter.next(); handler.handleNamespace(ns.getPrefix(), ns.getName()); } } // Export statements try (CloseableIteration<? extends Statement, RepositoryException> stIter = getStatements(subj, pred, obj, includeInferred, contexts)) { while (stIter.hasNext()) { handler.handleStatement(stIter.next()); } } handler.endRDF(); }
Example #10
Source File: RepositoryConnectionWrapper.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
/** * Exports all statements contained in the supplied statement iterator and all relevant namespace information to the * supplied RDFHandler. */ protected void exportStatements(RepositoryResult<Statement> stIter, RDFHandler handler) throws RepositoryException, RDFHandlerException { try { handler.startRDF(); try ( // Export namespace information RepositoryResult<Namespace> nsIter = getNamespaces()) { while (nsIter.hasNext()) { Namespace ns = nsIter.next(); handler.handleNamespace(ns.getPrefix(), ns.getName()); } } // Export statemnts while (stIter.hasNext()) { handler.handleStatement(stIter.next()); } handler.endRDF(); } finally { stIter.close(); } }
Example #11
Source File: RDFLoader.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
/** * Parses RDF data from the specified file to the given RDFHandler. * * @param file A file containing RDF data. * @param baseURI The base URI to resolve any relative URIs that are in the data against. This defaults to the * value of {@link java.io.File#toURI() file.toURI()} if the value is set to <tt>null</tt>. * @param dataFormat The serialization format of the data. * @param rdfHandler Receives RDF parser events. * @throws IOException If an I/O error occurred while reading from the file. * @throws UnsupportedRDFormatException If no parser is available for the specified RDF format. * @throws RDFParseException If an error was found while parsing the RDF data. * @throws RDFHandlerException If thrown by the RDFHandler */ public void load(File file, String baseURI, RDFFormat dataFormat, RDFHandler rdfHandler) throws IOException, RDFParseException, RDFHandlerException { if (baseURI == null) { // default baseURI to file baseURI = file.toURI().toString(); } if (dataFormat == null) { dataFormat = Rio.getParserFormatForFileName(file.getName()) .orElseThrow(() -> new UnsupportedRDFormatException( "Could not find RDF format for file: " + file.getName())); } try (InputStream in = new FileInputStream(file);) { load(in, baseURI, dataFormat, rdfHandler); } }
Example #12
Source File: RDFLoader.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
/** * Adds the data that can be read from the supplied InputStream or Reader to this repository. * * @param inputStreamOrReader An {@link InputStream} or {@link Reader} containing RDF data that must be added to the * repository. * @param baseURI The base URI for the data. * @param dataFormat The file format of the data. * @param rdfHandler handles all data from all documents * @throws IOException * @throws UnsupportedRDFormatException * @throws RDFParseException * @throws RDFHandlerException */ private void loadInputStreamOrReader(Object inputStreamOrReader, String baseURI, RDFFormat dataFormat, RDFHandler rdfHandler) throws IOException, RDFParseException, RDFHandlerException { RDFParser rdfParser = Rio.createParser(dataFormat, vf); rdfParser.setParserConfig(config); rdfParser.setParseErrorListener(new ParseErrorLogger()); rdfParser.setRDFHandler(rdfHandler); if (inputStreamOrReader instanceof InputStream) { rdfParser.parse((InputStream) inputStreamOrReader, baseURI); } else if (inputStreamOrReader instanceof Reader) { rdfParser.parse((Reader) inputStreamOrReader, baseURI); } else { throw new IllegalArgumentException( "Must be an InputStream or a Reader, is a: " + inputStreamOrReader.getClass()); } }
Example #13
Source File: ContextAwareConnection.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 6 votes |
@Override protected void removeWithoutCommit(Resource subject, IRI predicate, Value object, Resource... contexts) throws RepositoryException { IRI[] archiveContexts = getArchiveContexts(); if (archiveContexts.length > 0) { RDFHandler handler = new RDFInserter(getDelegate()); try { getDelegate().exportStatements(subject, predicate, object, true, handler, archiveContexts); } catch (RDFHandlerException e) { if (e.getCause() instanceof RepositoryException) { throw (RepositoryException) e.getCause(); } throw new AssertionError(e); } } if (isAllContext(contexts)) { getDelegate().remove(subject, predicate, object, getRemoveContexts()); } else { getDelegate().remove(subject, predicate, object, contexts); } }
Example #14
Source File: Rio.java From mobi with GNU Affero General Public License v3.0 | 6 votes |
/** * Writes the given statements to the given {@link RDFHandler}. * <p> * If the collection is a {@link Model}, its namespaces will also be written. * * @param iterable A collection of statements, such as a {@link Model}, to be written. */ public static void write(Iterable<Statement> iterable, RDFHandler writer, SesameTransformer transformer, StatementHandler... statementHandlers) { writer.startRDF(); if (iterable instanceof Model) { for (Namespace nextNamespace : ((Model) iterable).getNamespaces()) { writer.handleNamespace(nextNamespace.getPrefix(), nextNamespace.getName()); } } for (final Statement st : iterable) { Statement handledStatement = st; for (StatementHandler statementHandler : statementHandlers) { handledStatement = statementHandler.handleStatement(handledStatement); } org.eclipse.rdf4j.model.Statement sesameStatement = transformer.sesameStatement(handledStatement); writer.handleStatement(sesameStatement); } writer.endRDF(); }
Example #15
Source File: RyaDaoQueryWrapper.java From rya with Apache License 2.0 | 6 votes |
/** * Handles all results of a query. Closes the query iterator when done. * @param subject the subject {@link Resource} to query for. * @param predicate the predicate {@link IRI} to query for. * @param object the object {@link Value} to query for. * @param rdfStatementHandler the {@link RDFHandler} to use for handling * each statement returned. (not {@code null}) * @param contexts the context {@link Resource}s to query for. * @throws QueryEvaluationException */ public void queryAll(final Resource subject, final IRI predicate, final Value object, final RDFHandler rdfStatementHandler, final Resource... contexts) throws QueryEvaluationException { checkNotNull(rdfStatementHandler); final CloseableIteration<Statement, QueryEvaluationException> iter = RyaDAOHelper.query(ryaDao, subject, predicate, object, conf, contexts); try { while (iter.hasNext()) { final Statement statement = iter.next(); try { rdfStatementHandler.handleStatement(statement); } catch (final Exception e) { throw new QueryEvaluationException("Error handling statement.", e); } } } finally { if (iter != null) { iter.close(); } } }
Example #16
Source File: RyaDaoQueryWrapper.java From rya with Apache License 2.0 | 6 votes |
/** * Handles only the first result of a query. Closes the query iterator when * done. * @param subject the subject {@link Resource} to query for. * @param predicate the predicate {@link IRI} to query for. * @param object the object {@link Value} to query for. * @param rdfStatementHandler the {@link RDFHandler} to use for handling the * first statement returned. (not {@code null}) * @param contexts the context {@link Resource}s to query for. * @throws QueryEvaluationException */ public void queryFirst(final Resource subject, final IRI predicate, final Value object, final RDFHandler rdfStatementHandler, final Resource... contexts) throws QueryEvaluationException { checkNotNull(rdfStatementHandler); final CloseableIteration<Statement, QueryEvaluationException> iter = RyaDAOHelper.query(ryaDao, subject, predicate, object, conf, contexts); try { if (iter.hasNext()) { final Statement statement = iter.next(); try { rdfStatementHandler.handleStatement(statement); } catch (final Exception e) { throw new QueryEvaluationException("Error handling statement.", e); } } } finally { if (iter != null) { iter.close(); } } }
Example #17
Source File: RyaDaoQueryWrapper.java From rya with Apache License 2.0 | 5 votes |
/** * Handles all results of a query. Closes the query iterator when done. * @param statement the {@link Statement} to query for. (not {@code null}) * @param rdfStatementHandler the {@link RDFHandler} to use for handling * each statement returned. (not {@code null}) * @throws QueryEvaluationException */ public void queryAll(final Statement statement, final RDFHandler rdfStatementHandler) throws QueryEvaluationException { final Resource subject = statement.getSubject(); final IRI predicate = statement.getPredicate(); final Value object = statement.getObject(); final Resource context = statement.getContext(); queryAll(subject, predicate, object, rdfStatementHandler, context); }
Example #18
Source File: RestUtils.java From mobi with GNU Affero General Public License v3.0 | 5 votes |
/** * Converts a {@link Model} into a string containing grouped RDF in the specified RDFFormat. * * @param model A {@link Model} of RDF to convert. * @param format The RDFFormat the RDF should be serialized into. * @param transformer The SesameTransformer for model conversions. * @return A String of the serialized grouped RDF from the Model. */ public static String groupedModelToString(Model model, RDFFormat format, SesameTransformer transformer) { long start = System.currentTimeMillis(); try { StringWriter sw = new StringWriter(); RDFHandler rdfWriter = new BufferedGroupingRDFHandler(Rio.createWriter(format, sw)); Rio.write(new StatementIterable(model, transformer), rdfWriter); return sw.toString(); } finally { LOG.trace("groupedModelToString took {}ms", System.currentTimeMillis() - start); } }
Example #19
Source File: Query.java From mobi with GNU Affero General Public License v3.0 | 5 votes |
private void executeGraphQuery(Repository repository, String queryString) { try (RepositoryConnection conn = repository.getConnection()) { GraphQuery query = conn.prepareGraphQuery(queryString); GraphQueryResult result = query.evaluate(); OutputStream out = System.out; RDFFormat format = getFormat(); RDFHandler rdfWriter = new BufferedGroupingRDFHandler(Rio.createWriter(format, out)); Rio.write(new StatementIterable(result, transformer), rdfWriter); } }
Example #20
Source File: RDFExportServiceImpl.java From mobi with GNU Affero General Public License v3.0 | 5 votes |
private void export(Iterable<Statement> statements, OutputStream output, RDFFormat format) throws IOException { if (!quadFormats.contains(format)) { LOGGER.warn("RDF format does not support quads."); } RDFHandler rdfWriter = new BufferedGroupingRDFHandler(Rio.createWriter(format, output)); Rio.write(new StatementIterable(statements, transformer), rdfWriter); }
Example #21
Source File: RepositoryConnectionWrapper.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override public void exportStatements(Resource subj, IRI pred, Value obj, boolean includeInferred, RDFHandler handler, Resource... contexts) throws RepositoryException, RDFHandlerException { if (isDelegatingRead()) { getDelegate().exportStatements(subj, pred, obj, includeInferred, handler, contexts); } else { exportStatements(getStatements(subj, pred, obj, includeInferred, contexts), handler); } }
Example #22
Source File: NquadsUdParser.java From timbuctoo with GNU General Public License v3.0 | 5 votes |
@Override public RDFParser setRDFHandler(RDFHandler handler) { if (handler instanceof TimRdfHandler) { // It might be nicer to override statement, to make it contain the action, but it takes to much effort for now. ((TimRdfHandler) handler).registerActionSupplier(() -> actions.pop()); } return super.setRDFHandler(handler); }
Example #23
Source File: RDFLoader.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 5 votes |
private void loadZip(InputStream in, String baseURI, RDFFormat dataFormat, RDFHandler rdfHandler) throws IOException, RDFParseException, RDFHandlerException { try (ZipInputStream zipIn = new ZipInputStream(in);) { for (ZipEntry entry = zipIn.getNextEntry(); entry != null; entry = zipIn.getNextEntry()) { if (entry.isDirectory()) { continue; } try { RDFFormat format = Rio.getParserFormatForFileName(entry.getName()).orElse(dataFormat); // Prevent parser (Xerces) from closing the input stream UncloseableInputStream wrapper = new UncloseableInputStream(zipIn); load(wrapper, baseURI, format, rdfHandler); } catch (RDFParseException e) { String msg = e.getMessage() + " in " + entry.getName(); RDFParseException pe = new RDFParseException(msg, e.getLineNumber(), e.getColumnNumber()); pe.initCause(e); throw pe; } finally { zipIn.closeEntry(); } } // end for } }
Example #24
Source File: RyaDaoQueryWrapper.java From rya with Apache License 2.0 | 5 votes |
/** * Handles only the first result of a query. Closes the query iterator when * done. * @param statement the {@link Statement} to query for. (not {@code null}) * @param rdfStatementHandler the {@link RDFHandler} to use for handling the * first statement returned. (not {@code null}) * @throws QueryEvaluationException */ public void queryFirst(final Statement statement, final RDFHandler rdfStatementHandler) throws QueryEvaluationException { checkNotNull(statement); final Resource subject = statement.getSubject(); final IRI predicate = statement.getPredicate(); final Value object = statement.getObject(); final Resource context = statement.getContext(); queryFirst(subject, predicate, object, rdfStatementHandler, context); }
Example #25
Source File: BufferedGroupingRDFHandler.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * Creates a new BufferedGroupedWriter that wraps the supplied handlers, using the supplied buffer size. * * @param bufferSize size of the buffer expressed in number of RDF statements * @param handlers one or more wrapped RDFHandlers */ public BufferedGroupingRDFHandler(int bufferSize, RDFHandler... handlers) { super(handlers); this.bufferSize = bufferSize; this.bufferedStatements = getModelFactory().createEmptyModel(); this.contexts = new HashSet<>(); }
Example #26
Source File: HTTPGraphQuery.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override public void evaluate(RDFHandler handler) throws QueryEvaluationException, RDFHandlerException { SPARQLProtocolSession client = getHttpClient(); try { conn.flushTransactionState(Protocol.Action.QUERY); client.sendGraphQuery(queryLanguage, queryString, baseURI, dataset, includeInferred, getMaxExecutionTime(), handler, getBindingsArray()); } catch (IOException | RepositoryException | MalformedQueryException e) { throw new HTTPQueryEvaluationException(e.getMessage(), e); } }
Example #27
Source File: HTTPRepositoryConnection.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override public void exportStatements(Resource subj, IRI pred, Value obj, boolean includeInferred, RDFHandler handler, Resource... contexts) throws RDFHandlerException, RepositoryException { flushTransactionState(Action.GET); try { client.getStatements(subj, pred, obj, includeInferred, handler, contexts); } catch (IOException | QueryInterruptedException e) { throw new RepositoryException(e); } }
Example #28
Source File: ContextAwareConnection.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override public void export(RDFHandler handler, Resource... contexts) throws RepositoryException, RDFHandlerException { if (isAllContext(contexts)) { super.export(handler, getReadContexts()); } else { super.export(handler, contexts); } }
Example #29
Source File: ContextAwareConnection.java From rdf4j with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override public void exportStatements(Resource subj, IRI pred, Value obj, boolean includeInferred, RDFHandler handler, Resource... contexts) throws RepositoryException, RDFHandlerException { if (isAllContext(contexts)) { super.exportStatements(subj, pred, obj, includeInferred, handler, getReadContexts()); } else { super.exportStatements(subj, pred, obj, includeInferred, handler, contexts); } }
Example #30
Source File: SimpleOntology.java From mobi with GNU Affero General Public License v3.0 | 5 votes |
protected synchronized void setSesameModel() throws MobiOntologyException { sesameModel = new org.eclipse.rdf4j.model.impl.LinkedHashModel(); RDFHandler rdfHandler = new StatementCollector(sesameModel); OWLDocumentFormat format = this.owlOntology.getFormat(); format.setAddMissingTypes(false); RioRenderer renderer = new RioRenderer(this.owlOntology, rdfHandler, format); renderer.render(); }