use of org.eclipse.rdf4j.model.Literal in project timbuctoo by HuygensING.
the class TimRdfHandler method handleStatement.
@Override
public void handleStatement(Statement st) throws RDFHandlerException {
try {
if (Thread.currentThread().isInterrupted()) {
rdfProcessor.commit();
throw new RDFHandlerException("Interrupted");
}
String graph = st.getContext() == null ? defaultGraph : st.getContext().stringValue();
rdfProcessor.onQuad(isAssertion(), handleNode(st.getSubject()), st.getPredicate().stringValue(), handleNode(st.getObject()), (st.getObject() instanceof Literal) ? ((Literal) st.getObject()).getDatatype().toString() : null, (st.getObject() instanceof Literal) ? ((Literal) st.getObject()).getLanguage().orElse(null) : null, graph);
} catch (RdfProcessingFailedException e) {
throw new RDFHandlerException(e);
}
}
Aggregations