Search in sources :

Example 1 with RangeURI

use of org.apache.rya.api.domain.RangeURI in project incubator-rya by apache.

the class FilterRangeVisitor method meet.

@Override
public void meet(final StatementPattern node) throws Exception {
    super.meet(node);
    final Var subjectVar = node.getSubjectVar();
    final RangeValue subjRange = rangeValues.get(subjectVar);
    final Var predVar = node.getPredicateVar();
    final RangeValue predRange = rangeValues.get(predVar);
    final Var objVar = node.getObjectVar();
    final RangeValue objRange = rangeValues.get(objVar);
    if (subjRange != null) {
        // Assumes no blank nodes can be ranges
        subjectVar.setValue(new RangeURI(subjRange));
    }
    if (predRange != null) {
        predVar.setValue(new RangeURI(predRange));
    }
    if (objRange != null) {
        objVar.setValue(objRange);
    }
}
Also used : RangeURI(org.apache.rya.api.domain.RangeURI) Var(org.openrdf.query.algebra.Var) RangeValue(org.apache.rya.api.domain.RangeValue)

Aggregations

RangeURI (org.apache.rya.api.domain.RangeURI)1 RangeValue (org.apache.rya.api.domain.RangeValue)1 Var (org.openrdf.query.algebra.Var)1