Package org.aksw.jena_sparql_api.algebra.transform
package org.aksw.jena_sparql_api.algebra.transform
-
ClassDescriptionN-way disjunction.Substitution strategy for constants in SPARQL graph patterns.Given extend(subOp, ?var: 'value') it adds an extra filter filter(extend(subOp, { ?var: 'value'}), { ?var: 'value'}) This is used to streamline satisfiability checking.Transform OpAssign to OpExtend.A transformer that adds SERVICE <cache:env://REMOTE> { } blocksTransformsTurn a join of unions into a union of joins.A transformer that evaluates every op whose sub ops are all
OpTableinstances to anotherOpTableinstance.Transformer that rewritesTransform GROUP([count(distinct *) AS ?.0], subOp) to GROUP([count(*) AS ?.0], DISTINCT(subOp)) Used to mitigate a bug in VirtuosoTransform expressions to property functions.Given a table extract all variables that map to the same constant to a bind block: Given: VALUES (?x ?y) { (a b1) (a b2) } it becomes: VALUES (?y) { b1 b2 ) BIND(a AS ?x)Transform OpFilter(false, subOp) to OpTable(empty)Join(LeftJoin(A, B), C) -> LeftJoin(Join(A, C), B) - if all vars of C shared with B are also shared with ATransform an expression of LeftJoin( LeftJoin(bl, br, be), ar, ae) with the expression e and ae TRUE to LeftJoinSet(bl, ar, br) Further: LeftJoinSet(X, LeftJoin(l, r, e)) becomes: LeftJoinSet(l, X, r)project(project(op, varsA), varsB) -> project(op, VarsB) Assumes that the op expression is valid, such that only the variables of the outer most projection need to be retained.ReplaceGRAPH X { }.Note: TransformRedundantProjectionRemoval seems to be the better choice.Pulls up Extend over joins and distinct join(extend(?foo...), extend(?bar...)) becomes extend(?foo...Pull filters up so that they may be distributed over a join Example: Join( Filter({_?v1_}), ?v1=_), { _?v1_ }) Becomes: Filter(Join({_?v1_}, {_?v1_},?v1=_)) Allows: Subsequent filter placement: Join( Filter({ _?v1_}), ?v1=_), Filter({ _?v1_ }, ?v1=_)TransformMergeBGPS only works if the operands of a join are BGPS.Given filter expressions of form ?x =, where ?x is an undistinguished (mandatory) variable (i.e. Transformation that pushes slices further down and into service clauses.Remove filters in patterns such as OpFilter(OpExtend(constant AS ?x, (subOp)), ?x = constant) Currently this works only if the OpExtend is an immediate child of OpFilter Mainly needed as a workaround for Virtuoso...