use of org.apache.rya.mongodb.iter.RyaStatementBindingSetCursorIterator in project incubator-rya by apache.
the class MongoDBQueryEngine method queryWithBindingSet.
@Override
public CloseableIteration<? extends Entry<RyaStatement, BindingSet>, RyaDAOException> queryWithBindingSet(final Collection<Entry<RyaStatement, BindingSet>> stmts, final StatefulMongoDBRdfConfiguration conf) throws RyaDAOException {
checkNotNull(stmts);
checkNotNull(conf);
final Multimap<RyaStatement, BindingSet> rangeMap = HashMultimap.create();
// TODO: cannot span multiple tables here
try {
for (final Map.Entry<RyaStatement, BindingSet> stmtbs : stmts) {
final RyaStatement stmt = stmtbs.getKey();
final BindingSet bs = stmtbs.getValue();
rangeMap.put(stmt, bs);
}
// TODO not sure what to do about regex ranges?
final RyaStatementBindingSetCursorIterator iterator = new RyaStatementBindingSetCursorIterator(getCollection(conf), rangeMap, strategy, conf.getAuthorizations());
return iterator;
} catch (final Exception e) {
throw new RyaDAOException(e);
}
}
Aggregations