Ejemplo n.º 1
0
 /// <summary>
 /// Transforms both sides of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return(new AskUnion(optimiser.Optimise(this._lhs), optimiser.Optimise(this._rhs)));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Transforms the RHS of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformRhs(IAlgebraOptimiser optimiser)
 {
     return(new ExistsJoin(_lhs, optimiser.Optimise(_rhs), _mustExist));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Transforms the LHS of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformLhs(IAlgebraOptimiser optimiser)
 {
     return(new Union(optimiser.Optimise(_lhs), _rhs));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return new Select(optimiser.Optimise(this._pattern), this._variables);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return new GroupBy(optimiser.Optimise(this._pattern), this._grouping);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Transforms the RHS of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformRhs(IAlgebraOptimiser optimiser)
 {
     if (optimiser is IExpressionTransformer)
     {
         return new LeftJoin(this._lhs, optimiser.Optimise(this._rhs), new UnaryExpressionFilter(((IExpressionTransformer)optimiser).Transform(this._filter.Expression)));
     }
     else
     {
         return new LeftJoin(this._lhs, optimiser.Optimise(this._rhs), this._filter);
     }
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     if (optimiser is IExpressionTransformer)
     {
         return new Filter(optimiser.Optimise(this._pattern), new UnaryExpressionFilter(((IExpressionTransformer)optimiser).Transform(this._filter.Expression)));
     }
     else
     {
         return new Filter(optimiser.Optimise(this._pattern), this._filter);
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Transforms the RHS algebra only with the given optimiser.
 /// </summary>
 /// <param name="optimiser">Algebra Optimiser.</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformRhs(IAlgebraOptimiser optimiser)
 {
     return(new FilteredProduct(_lhs, optimiser.Optimise(_rhs), _expr));
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return new OrderBy(optimiser.Optimise(this._pattern), this._ordering);
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Transforms the LHS of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformLhs(IAlgebraOptimiser optimiser)
 {
     return(new ExistsJoin(optimiser.Optimise(this._lhs), this._rhs, this._mustExist));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public override ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return(new FullTextMatch(this.SearchProvider, optimiser.Optimise(this.InnerAlgebra), this.MatchItem, this.ScoreItem, this.SearchTerm, this.Limit, this.ScoreThreshold));
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return new Slice(optimiser.Optimise(this._pattern), this._limit, this._offset);
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return new Having(optimiser.Optimise(this._pattern), this._having);
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Transforms the RHS of the Join using the given Optimiser.
 /// </summary>
 /// <param name="optimiser">Optimser.</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformRhs(IAlgebraOptimiser optimiser)
 {
     return(new ParallelJoin(_lhs, optimiser.Optimise(_rhs)));
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return(new Graph(optimiser.Optimise(this._pattern), this._graphSpecifier));
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public override ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return new FullTextMatch(this.SearchProvider, optimiser.Optimise(this.InnerAlgebra), this.MatchItem, this.ScoreItem, this.SearchTerm, this.Limit, this.ScoreThreshold);
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Transforms the RHS of the Join using the given Optimiser.
 /// </summary>
 /// <param name="optimiser">Optimser.</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformRhs(IAlgebraOptimiser optimiser)
 {
     return(new LazyUnion(_lhs, optimiser.Optimise(_rhs)));
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public override ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     if (optimiser is IExpressionTransformer)
     {
         return new IdentityFilter(optimiser.Optimise(this.InnerAlgebra), this.RestrictionVariable, (ConstantTerm)((IExpressionTransformer)optimiser).Transform(this.RestrictionValue));
     }
     else
     {
         return new IdentityFilter(optimiser.Optimise(this.InnerAlgebra), this.RestrictionVariable, this.RestrictionValue);
     }
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Transforms the RHS of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformRhs(IAlgebraOptimiser optimiser)
 {
     return new Union(this._lhs, optimiser.Optimise(this._rhs));
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Transforms the LHS of the Join using the given optimiser.
 /// </summary>
 /// <param name="optimiser">optimser.</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformLhs(IAlgebraOptimiser optimiser)
 {
     return(new ParallelUnion(optimiser.Optimise(Lhs), Rhs));
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Transforms the LHS of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformLhs(IAlgebraOptimiser optimiser)
 {
     return(new LazyUnion(optimiser.Optimise(this._lhs), this._rhs));
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser.
 /// </summary>
 /// <param name="optimiser">Optimiser.</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return(new Slice(optimiser.Optimise(_pattern), _limit, _offset));
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser.
 /// </summary>
 /// <param name="optimiser">Optimiser.</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return(new Distinct(optimiser.Optimise(_pattern)));
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Transforms the LHS algebra only with the given optimiser
 /// </summary>
 /// <param name="optimiser">Algebra Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformLhs(IAlgebraOptimiser optimiser)
 {
     return(new FilteredProduct(optimiser.Optimise(this._lhs), this._rhs, this._expr));
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return(new OrderBy(optimiser.Optimise(this._pattern), this._ordering));
 }
Ejemplo n.º 26
0
 /// <summary>
 /// Transforms this algebra with the given optimiser.
 /// </summary>
 /// <param name="optimiser">Optimiser.</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return(new PropertyFunction(optimiser.Optimise(_algebra), _function));
 }
Ejemplo n.º 27
0
 /// <summary>
 /// Transforms both sides of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return(new Join(optimiser.Optimise(_lhs), optimiser.Optimise(_rhs)));
 }
Ejemplo n.º 28
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return new Reduced(optimiser.Optimise(this._pattern));
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return(new Having(optimiser.Optimise(this._pattern), this._having));
 }
 /// <summary>
 /// Transforms the LHS of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformLhs(IAlgebraOptimiser optimiser)
 {
     return(new ParallelJoin(optimiser.Optimise(this._lhs), this._rhs));
 }
Ejemplo n.º 31
0
 /// <summary>
 /// Transforms both sides of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return new ParallelJoin(optimiser.Optimise(this._lhs), optimiser.Optimise(this._rhs));
 }
Ejemplo n.º 32
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return(new GroupBy(optimiser.Optimise(this._pattern), this._grouping, this._aggregates));
 }
Ejemplo n.º 33
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return(new Reduced(optimiser.Optimise(this._pattern)));
 }
Ejemplo n.º 34
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return new Graph(optimiser.Optimise(this._pattern), this._graphSpecifier);
 }
Ejemplo n.º 35
0
 /// <summary>
 /// Transforms the RHS of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformRhs(IAlgebraOptimiser optimiser)
 {
     return new ExistsJoin(this._lhs, optimiser.Optimise(this._rhs), this._mustExist);
 }
Ejemplo n.º 36
0
 /// <summary>
 /// Transforms the RHS of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformRhs(IAlgebraOptimiser optimiser)
 {
     return new LeftJoin(this._lhs, optimiser.Optimise(this._rhs), this._filter);
 }
Ejemplo n.º 37
0
 /// <summary>
 /// Transforms the LHS of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformLhs(IAlgebraOptimiser optimiser)
 {
     return new Join(optimiser.Optimise(this._lhs), this._rhs);
 }
Ejemplo n.º 38
0
 /// <summary>
 /// Transforms both sides of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return new AskUnion(optimiser.Optimise(this._lhs), optimiser.Optimise(this._rhs));
 }
Ejemplo n.º 39
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     if (optimiser is IExpressionTransformer)
     {
         return new Extend(optimiser.Optimise(this._inner), ((IExpressionTransformer)optimiser).Transform(this._expr), this._var);
     }
     else
     {
         return new Extend(optimiser.Optimise(this._inner), this._expr, this._var);
     }
 }
Ejemplo n.º 40
0
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return new Extend(optimiser.Optimise(this._inner), this._expr, this._var);
 }
Ejemplo n.º 41
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return(new Select(optimiser.Optimise(_pattern), IsSelectAll, _variables));
 }
Ejemplo n.º 42
0
 /// <summary>
 /// Transforms the RHS of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformRhs(IAlgebraOptimiser optimiser)
 {
     return(new Minus(this._lhs, optimiser.Optimise(this._rhs)));
 }
Ejemplo n.º 43
0
 /// <summary>
 /// Transforms the RHS of the Join using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimser</param>
 /// <returns></returns>
 public ISparqlAlgebra TransformRhs(IAlgebraOptimiser optimiser)
 {
     return(new ParallelUnion(this._lhs, optimiser.Optimise(this._rhs)));
 }
Ejemplo n.º 44
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return(new Extend(optimiser.Optimise(this._inner), this._expr, this._var));
 }