private void checkInterrupted() throws RDFHandlerException { if (isInterrupted) { throw new RDFHandlerException("RDFHandler took too long"); } } private void interrupt() {
@Override public void handleStatement(final Statement st) throws RDFHandlerException { namespacesReady.countDown(); if (closed) throw new RDFHandlerException("Result closed"); try { queue.put(st); } catch (InterruptedException e) { throw new RDFHandlerException(e); } }
public void handleStatement(Statement st) throws RDFHandlerException { namespacesReady.countDown(); if (closed) throw new RDFHandlerException("Result closed"); try { queue.put(st); } catch (InterruptedException e) { throw new RDFHandlerException(e); } }
protected final void error(@Nullable final Object message) throws RDFHandlerException { final String string = message == null ? "ERROR" : message.toString(); SCRIPT_LOGGER.error(string); throw new RDFHandlerException(string); }
public void handleStatement(Statement s) throws RDFHandlerException { try { addInputs(ttl, s); } catch (Throwable t) { throw new RDFHandlerException(t); } }
@Override public void endRDF() throws RDFHandlerException { try { writer.endQueryResult(); // writer.endDocument(); // } catch (IOException e) { // throw new RDFHandlerException(e); } catch (TupleQueryResultHandlerException e) { throw new RDFHandlerException(e); } }
@Override public void handleNamespace(String prefix, String uri) throws RDFHandlerException { try { writer.handleNamespace(prefix, uri); } catch (QueryResultHandlerException e) { throw new RDFHandlerException(e); } }
@Override public void endRDF() throws RDFHandlerException { try { writer.endQueryResult(); // writer.endDocument(); // } catch (IOException e) { // throw new RDFHandlerException(e); } catch (TupleQueryResultHandlerException e) { throw new RDFHandlerException(e); } }
public void startRDF() throws RDFHandlerException { try { sailConnection = sail.getConnection(); } catch (SailException e) { throw new RDFHandlerException(e); } }
public void handleNamespace(final String prefix, final String uri) throws RDFHandlerException { try { c.setNamespace(prefix, uri); } catch (SailException e) { throw new RDFHandlerException(e); } }
@Override public void endRDF() throws RDFHandlerException { try { flush(true); this.writer.append("]\n}"); this.writer.flush(); } catch (final IOException ex) { throw new RDFHandlerException(ex); } }
public void endRDF() throws RDFHandlerException { RDFJSON.graphToRdfJsonPreordered(graph, writer); try { writer.flush(); } catch (IOException e) { throw new RDFHandlerException(e); } }
@Override public void handleNamespace(String prefix, String uri) throws RDFHandlerException { try { writer.handleNamespace(prefix, uri); } catch (QueryResultHandlerException e) { throw new RDFHandlerException(e); } }
public void handleComment(String comment) throws RDFHandlerException { startRDF(); try { out.writeByte(COMMENT); writeString(comment); } catch (IOException e) { throw new RDFHandlerException(e); } }
private String getValue(Resource r) throws RDFHandlerException { if (r instanceof URI) { return r.stringValue(); } else if (r instanceof BNode) { return "_:" + r.stringValue(); } else if (r == null) { return null; } throw new RDFHandlerException("Can not recognize resource type."); } }
@Override public void parse(InputStream in, String baseURI) throws IOException, RDFParseException, RDFHandlerException { try { parser.parseQueryResult(in); } catch (QueryResultParseException e) { throw new RDFParseException(e); } catch (QueryResultHandlerException e) { throw new RDFHandlerException(e); } }
@Override public void parse(InputStream in, String baseURI) throws IOException, RDFParseException, RDFHandlerException { try { parser.parseQueryResult(in); } catch (QueryResultParseException e) { throw new RDFParseException(e); } catch (QueryResultHandlerException e) { throw new RDFHandlerException(e); } }
@Override public void handleStatement(Statement statement) throws RDFHandlerException { try { sc.addStatement( statement.getSubject(), statement.getPredicate(), statement.getObject(), statement.getContext()); } catch (SailException e) { throw new RDFHandlerException(e); } }
@Override public void handleStatement(final Statement st) throws RDFHandlerException { try { sailConnection.addStatement(st.getSubject(), st.getPredicate(), st.getObject(), st.getContext()); } catch (SailException e) { throw new RDFHandlerException(e); } } }
@Override public void handleStatement(final Statement st) throws RDFHandlerException { try { sailConnection.addStatement(st.getSubject(), st.getPredicate(), st.getObject(), st.getContext()); } catch (SailException e) { throw new RDFHandlerException(e); } } }