public Node next() { return this.it.next().getValue(this.extractVariable); }
QueryResultTable result = new QueryResultTableImpl(exec); return Long .parseLong(result.iterator().next().getLiteralValue("count"));
public Object getValue(String varname) { return RDFReactorRuntime.node2javatype(this.ooQueryResultTable.getModel(), this.row.getValue(varname), this.ooQueryResultTable.getReturnType(varname)); }
@Override public Collection<Resource> getAllReificationsOf(Statement statement) { QueryResultTable table = this.sparqlSelect("SELECT ?res WHERE { " + " ?res " + RDF.type.toSPARQL() + " " + RDF.Statement.toSPARQL() + " ." + " ?res " + RDF.subject.toSPARQL() + " " + statement.getSubject().toSPARQL() + " ." + " ?res " + RDF.predicate.toSPARQL() + " " + statement.getPredicate().toSPARQL() + " ." + " ?res " + RDF.object.toSPARQL() + " " + statement.getObject().toSPARQL() + " ." + " }"); LinkedList<Resource> result = new LinkedList<Resource>(); ClosableIterator<QueryRow> it = table.iterator(); while(it.hasNext()) { Resource res = it.next().getValue("res").asResource(); result.add(res); } it.close(); return result; }
public Collection<Resource> getAllReificationsOf(Statement statement) { QueryResultTable table = this.sparqlSelect("SELECT ?res WHERE { " + " ?res " + RDF.type.toSPARQL() + " " + RDF.Statement + " ." + " ?res " + RDF.subject.toSPARQL() + " " + statement.getSubject().toSPARQL() + " ." + " ?res " + RDF.predicate.toSPARQL() + " " + statement.getPredicate().toSPARQL() + " ." + " ?res " + RDF.object.toSPARQL() + " " + statement.getObject().toSPARQL() + " ." + " }"); LinkedList<Resource> result = new LinkedList<Resource>(); ClosableIterator<QueryRow> it = table.iterator(); while (it.hasNext()) { Resource res = it.next().getValue("res").asResource(); result.add(res); } it.close(); return result; }
public Collection<Resource> getAllReificationsOf(Statement statement) { QueryResultTable table = this.sparqlSelect("SELECT ?res WHERE { " + " ?res " + RDF.type.toSPARQL() + " " + RDF.Statement + " ." + " ?res " + RDF.subject.toSPARQL() + " " + statement.getSubject().toSPARQL() + " ." + " ?res " + RDF.predicate.toSPARQL() + " " + statement.getPredicate().toSPARQL() + " ." + " ?res " + RDF.object.toSPARQL() + " " + statement.getObject().toSPARQL() + " ." + " }"); LinkedList<Resource> result = new LinkedList<Resource>(); ClosableIterator<QueryRow> it = table.iterator(); while (it.hasNext()) { Resource res = it.next().getValue("res").asResource(); result.add(res); } it.close(); return result; }
@Override public Collection<Resource> getAllReificationsOf(Statement statement) { QueryResultTable table = this.sparqlSelect("SELECT ?res WHERE { \n" + " ?res " + RDF.type.toSPARQL() + " " + RDF.Statement.toSPARQL() + " ." + " ?res " + RDF.subject.toSPARQL() + " " + statement.getSubject().toSPARQL() + " ." + " ?res " + RDF.predicate.toSPARQL() + " " + statement.getPredicate().toSPARQL() + " ." + " ?res " + RDF.object.toSPARQL() + " " + statement.getObject().toSPARQL() + " ." + " }"); LinkedList<Resource> result = new LinkedList<Resource>(); ClosableIterator<QueryRow> it = table.iterator(); while (it.hasNext()) { Resource res = it.next().getValue("res").asResource(); result.add(res); } it.close(); return result; }