@Override public void startDocument() throws TupleQueryResultHandlerException { documentStarted = true; try { out.write(MAGIC_NUMBER); out.writeInt(FORMAT_VERSION); } catch (IOException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void startDocument() throws TupleQueryResultHandlerException { documentStarted = true; try { out.write(MAGIC_NUMBER); out.writeInt(FORMAT_VERSION); } catch (IOException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void startDocument() throws TupleQueryResultHandlerException { documentStarted = true; try { out.write(MAGIC_NUMBER); out.writeInt(FORMAT_VERSION); } catch (IOException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void endQueryResult() throws TupleQueryResultHandlerException { if (bindingNames == null) { throw new IllegalStateException( "Could not end query result as startQueryResult was not called first."); } try { writer.flush(); } catch (IOException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void endQueryResult() throws TupleQueryResultHandlerException { if (!tupleVariablesFound) { throw new IllegalStateException( "Could not end query result as startQueryResult was not called first."); } try { writer.flush(); } catch (IOException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void endQueryResult() throws TupleQueryResultHandlerException { if (!tupleVariablesFound) { throw new IllegalStateException( "Could not end query result as startQueryResult was not called first."); } try { writer.flush(); } catch (IOException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void endQueryResult() throws TupleQueryResultHandlerException { if (bindingNames == null) { throw new IllegalStateException( "Could not end query result as startQueryResult was not called first."); } try { writer.flush(); } catch (IOException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void endQueryResult() throws TupleQueryResultHandlerException { resultSetNode = null; try { rdfHandler.endRDF(); } catch (RDFHandlerException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void endQueryResult() throws TupleQueryResultHandlerException { resultSetNode = null; try { rdfHandler.endRDF(); } catch (RDFHandlerException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void endQueryResult() throws TupleQueryResultHandlerException { resultSetNode = null; try { rdfHandler.endRDF(); } catch (RDFHandlerException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void parseQueryResult(InputStream in) throws IOException, QueryResultParseException, TupleQueryResultHandlerException { try { parseQueryResultInternal(in, false, true); } catch (QueryResultHandlerException e) { if (e instanceof TupleQueryResultHandlerException) { throw (TupleQueryResultHandlerException)e; } else { throw new TupleQueryResultHandlerException(e); } } }
@Override @Deprecated public void parse(InputStream in) throws IOException, QueryResultParseException, TupleQueryResultHandlerException { try { parseQueryResultInternal(in, false, true); } catch (TupleQueryResultHandlerException e) { throw e; } catch (QueryResultHandlerException e) { throw new TupleQueryResultHandlerException(e); } }
@Override @Deprecated public void parse(InputStream in) throws IOException, QueryResultParseException, TupleQueryResultHandlerException { try { parseQueryResultInternal(in, false, true); } catch (TupleQueryResultHandlerException e) { throw e; } catch (QueryResultHandlerException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void endQueryResult() throws TupleQueryResultHandlerException { if (!tupleVariablesFound) { throw new IllegalStateException( "Could not end query result as startQueryResult was not called first."); } try { out.writeByte(TABLE_END_RECORD_MARKER); endDocument(); } catch (IOException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void endQueryResult() throws TupleQueryResultHandlerException { if (!tupleVariablesFound) { throw new IllegalStateException( "Could not end query result as startQueryResult was not called first."); } try { out.writeByte(TABLE_END_RECORD_MARKER); endDocument(); } catch (IOException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void parseQueryResult(InputStream in) throws IOException, QueryResultParseException, TupleQueryResultHandlerException { try { parseQueryResultInternal(in, false, true); } catch (QueryResultHandlerException e) { if (e instanceof TupleQueryResultHandlerException) { throw (TupleQueryResultHandlerException)e; } else { throw new TupleQueryResultHandlerException(e); } } }
@Override public void endQueryResult() throws TupleQueryResultHandlerException { if (!tupleVariablesFound) { throw new IllegalStateException( "Could not end query result as startQueryResult was not called first."); } try { out.writeByte(TABLE_END_RECORD_MARKER); endDocument(); } catch (IOException e) { throw new TupleQueryResultHandlerException(e); } }
@Override public void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException { try { rdfHandler.startRDF(); resultSetNode = vf.createBNode(); bnodeMap.clear(); reportStatement(resultSetNode, RDF.TYPE, RESULTSET); for (String bindingName : bindingNames) { Literal bindingNameLit = vf.createLiteral(bindingName); reportStatement(resultSetNode, RESULTVARIABLE, bindingNameLit); } } catch (RDFHandlerException e) { throw new TupleQueryResultHandlerException(e); } }
public void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException { try { conn.remove(ThreadVars.valueFactory.get().createStatement( (BNode) bs.getValue("s"), (IRI) bs.getValue("p"), bs.getValue("o"))); } catch (RepositoryException e) { throw new TupleQueryResultHandlerException("failed to remove " + bs, e); } count++; }
@Override public void handleSolution(BindingSet bindingSet) throws TupleQueryResultHandlerException { try { RepositoryResult<Statement> statements = fconn.getStatements(fvf.createIRI(bindingSet.getValue("s").stringValue()), null, null, false); Assert.assertNotNull(statements); } catch (Exception e) { e.printStackTrace(); throw new TupleQueryResultHandlerException(e); } }