java.lang.Object
org.apache.jena.sparql.util.PrintSerializableBase
org.apache.jena.sparql.algebra.op.OpBase
org.apache.jena.sparql.algebra.op.Op1
org.apache.jena.sparql.algebra.op.OpFilter
- All Implemented Interfaces:
org.apache.jena.atlas.io.Printable
,Op
,Named
,PrintSerializable
-
Method Summary
Modifier and TypeMethodDescriptionstatic OpFilter
ensureFilter
(Op op) Ensure that the algebra op is a filter.boolean
equalTo
(Op other, NodeIsomorphismMap labelMap) static Op
Add expression - mutates an existing filterstatic OpFilter
filterAlways
(ExprList exprs, Op subOp) Create a OpFilter with the expressions and subOp.static Op
Combine an ExprList with an Op so that the expressions filter the Op.static OpFilter
filterDirect
(ExprList exprs, Op op) Make a OpFilter - guaranteed to return an fresh OpFilterstatic OpFilter
filterDirect
(Expr expr, Op op) Make a OpFilter - guaranteed to return an fresh OpFiltergetExprs()
getName()
int
hashCode()
static OpFilter
Compress multiple filters: (filter (filter (filter op)))) into one (filter op)void
Methods inherited from class org.apache.jena.sparql.util.PrintSerializableBase
toString, toString
Methods inherited from interface org.apache.jena.sparql.util.PrintSerializable
toString
-
Method Details
-
filter
Add expression - mutates an existing filter -
ensureFilter
Ensure that the algebra op is a filter. If the input is a filter, just return that, else create a filter with no expressions and "this" as the subOp.- API Note:
- This operation assumes the caller is going to add expressions.
Filters without any expressions are discouraged.
Consider collecting the expressions together first and using
filterBy(org.apache.jena.sparql.expr.ExprList, org.apache.jena.sparql.algebra.Op)
.
-
filterBy
Combine an ExprList with an Op so that the expressions filter the Op. If the exprs are empty, return the Op. If the op is already a OpFilter, merge the expressions into the filters existing expressions. Else create a new OpFilter with the expressions and subOp. -
filterAlways
Create a OpFilter with the expressions and subOp. If subOp is a filter, combine expressions (de-layer). -
filterDirect
Make a OpFilter - guaranteed to return an fresh OpFilter -
filterDirect
Make a OpFilter - guaranteed to return an fresh OpFilter -
tidy
Compress multiple filters: (filter (filter (filter op)))) into one (filter op) -
getExprs
-
getName
-
apply
-
visit
-
copy
-
hashCode
public int hashCode() -
equalTo
-