Search in sources :

Example 1 with CloseableIterableIteration

use of org.apache.rya.api.utils.CloseableIterableIteration in project incubator-rya by apache.

the class AccumuloRyaQueryEngine method query.

@Override
public CloseableIteration<RyaStatement, RyaDAOException> query(RyaStatement stmt, AccumuloRdfConfiguration conf) throws RyaDAOException {
    if (conf == null) {
        conf = configuration;
    }
    RyaQuery ryaQuery = RyaQuery.builder(stmt).load(conf).build();
    CloseableIterable<RyaStatement> results = query(ryaQuery);
    return new CloseableIterableIteration<RyaStatement, RyaDAOException>(results);
}
Also used : CloseableIterableIteration(org.apache.rya.api.utils.CloseableIterableIteration) RyaStatement(org.apache.rya.api.domain.RyaStatement) BatchRyaQuery(org.apache.rya.api.persist.query.BatchRyaQuery) RyaQuery(org.apache.rya.api.persist.query.RyaQuery)

Example 2 with CloseableIterableIteration

use of org.apache.rya.api.utils.CloseableIterableIteration in project incubator-rya by apache.

the class AccumuloRyaQueryEngine method batchQuery.

@Override
public CloseableIteration<RyaStatement, RyaDAOException> batchQuery(Collection<RyaStatement> stmts, AccumuloRdfConfiguration conf) throws RyaDAOException {
    if (conf == null) {
        conf = configuration;
    }
    BatchRyaQuery batchRyaQuery = BatchRyaQuery.builder(stmts).load(conf).build();
    CloseableIterable<RyaStatement> results = query(batchRyaQuery);
    return new CloseableIterableIteration<RyaStatement, RyaDAOException>(results);
}
Also used : BatchRyaQuery(org.apache.rya.api.persist.query.BatchRyaQuery) CloseableIterableIteration(org.apache.rya.api.utils.CloseableIterableIteration) RyaStatement(org.apache.rya.api.domain.RyaStatement)

Aggregations

RyaStatement (org.apache.rya.api.domain.RyaStatement)2 BatchRyaQuery (org.apache.rya.api.persist.query.BatchRyaQuery)2 CloseableIterableIteration (org.apache.rya.api.utils.CloseableIterableIteration)2 RyaQuery (org.apache.rya.api.persist.query.RyaQuery)1