private void query(TupleQuery query, TupleQueryResultWriter writer) throws QueryEvaluationException { try { query.evaluate(writer); } catch (TupleQueryResultHandlerException e) { throw new QueryEvaluationException("error while writing query tuple result: ",e); } }
@Override public boolean equals(Object o) { if (o instanceof BindingSet) { return ((BindingSet)o).size() == 0; } return false; }
@Override protected QueryEvaluationException convert(Exception exception) { return new QueryEvaluationException(exception); } };
@Override protected boolean accept(BindingSet bindingSet) { Value context = bindingSet.getValue("context"); return bindingSet.getValue("subject") instanceof Resource && bindingSet.getValue("predicate") instanceof IRI && bindingSet.getValue("object") instanceof Value && (context == null || context instanceof Resource); } };
public MutableTupleQueryResult(TupleQueryResult tqr) throws QueryEvaluationException { this(tqr.getBindingNames(), tqr); }
@Override public String toString() { return getName(); } }
@Override protected void throwInterruptedException() throws QueryEvaluationException { throw new QueryInterruptedException("execution took too long"); } };
@Override public void remove() throws QueryEvaluationException { result.remove(); } }
@Override public boolean equals(final Object o) { if(!(o instanceof BindingSetDecorator)) { return false; } final BindingSetDecorator other = (BindingSetDecorator) o; return set.equals(other.set); }
public IRI getDefaultInsertGraph() { IRI graph = primary.getDefaultInsertGraph(); if (graph == null) return fallback.getDefaultInsertGraph(); return graph; }
/** * Registers the specified query language. * * @param name * The name of the query language, e.g. "SPARQL". */ public static QueryLanguage register(String name) { QueryLanguage ql = new QueryLanguage(name); register(ql); return ql; }
/** * Utility function to set the Query timeout to the global * setting if it is configured. */ protected void setMaxQueryTime(final org.openrdf.query.Query query) { if (maxQueryTime > 0) { query.setMaxQueryTime(maxQueryTime); } }
@Override public void remove() throws QueryEvaluationException { queryResult.remove(); }
@Override public Map<String, String> getNamespaces() throws QueryEvaluationException { return unfiltered.getNamespaces(); } }
private void query(TupleQuery query, TupleQueryResultWriter writer) throws QueryEvaluationException { try { query.evaluate(writer); } catch (TupleQueryResultHandlerException e) { throw new QueryEvaluationException("error while writing query tuple result: ",e); } }
@Override protected boolean accept(BindingSet bindingSet) { Value context = bindingSet.getValue("context"); return bindingSet.getValue("subject") instanceof Resource && bindingSet.getValue("predicate") instanceof URI && bindingSet.getValue("object") instanceof Value && (context == null || context instanceof Resource); } };
public MutableTupleQueryResult(TupleQueryResult tqr) throws QueryEvaluationException { this(tqr.getBindingNames(), tqr); }
@Override public boolean equals(Object o) { if (o instanceof BindingSet) { return ((BindingSet)o).size() == 0; } return false; }
@Override public List<String> getBindingNames() throws QueryEvaluationException { return unfiltered.getBindingNames(); }