Пример #1
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);
     }
 }
Пример #2
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));
 }
Пример #3
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(this._pattern));
 }
Пример #4
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);
     }
 }
Пример #5
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);
 }
Пример #6
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));
 }
Пример #7
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(this._pattern, this._variables);
 }
Пример #8
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(this._lhs, optimiser.Optimise(this._rhs)));
 }
Пример #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 Having(optimiser.Optimise(_pattern), _having));
 }
Пример #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(_lhs), _rhs, _mustExist));
 }
Пример #11
0
 /// <summary>
 /// Removes an Algebra Optimiser
 /// </summary>
 /// <param name="optimiser"></param>
 public static void RemoveOptimiser(IAlgebraOptimiser optimiser)
 {
     _algebraOpt.Remove(optimiser);
 }
Пример #12
0
 /// <summary>
 /// Adds a new Algebra Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 public static void AddOptimiser(IAlgebraOptimiser optimiser)
 {
     _algebraOpt.Add(optimiser);
 }
Пример #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 Select(optimiser.Optimise(this._pattern), this.IsSelectAll, this._variables));
 }
Пример #14
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));
 }
Пример #15
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 ParallelJoin(optimiser.Optimise(_lhs), _rhs));
 }
Пример #16
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));
 }
Пример #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(this._lhs, optimiser.Optimise(this._rhs)));
 }
Пример #18
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));
 }
Пример #19
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 Filter(this._pattern, this._filter);
 }
Пример #20
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)));
 }
Пример #21
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);
 }
Пример #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(this._pattern, this._limit, this._offset));
 }
Пример #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 GroupBy(optimiser.Optimise(this._pattern), this._grouping);
 }
Пример #24
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 Bindings(this._bindings, this._pattern);
 }
Пример #25
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);
 }
Пример #26
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 Ask(optimiser.Optimise(_pattern)));
 }
Пример #27
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(this._pattern, this._limit, this._offset);
 }
Пример #28
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));
 }
Пример #29
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 AskUnion(_lhs, optimiser.Optimise(_rhs)));
 }
Пример #30
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));
 }
Пример #31
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(_pattern), _grouping, _aggregates));
 }
Пример #32
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser.
 /// </summary>
 /// <param name="optimiser">Optimiser.</param>
 /// <returns></returns>
 public abstract ISparqlAlgebra Transform(IAlgebraOptimiser optimiser);
Пример #33
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));
 }
Пример #34
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 Minus(optimiser.Optimise(this._lhs), this._rhs));
 }
Пример #35
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(this._lhs), this._rhs));
 }
Пример #36
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(this._pattern, this._ordering);
 }
Пример #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 LazyUnion(optimiser.Optimise(_lhs), _rhs));
 }
Пример #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 Minus(optimiser.Optimise(_lhs), optimiser.Optimise(_rhs)));
 }
Пример #39
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));
 }
Пример #40
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)));
 }
Пример #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 Ask(this._pattern);
 }
Пример #42
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);
 }
Пример #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 LeftJoin(this._lhs, optimiser.Optimise(this._rhs), this._filter);
 }
Пример #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 Graph(optimiser.Optimise(this._pattern), this._graphSpecifier));
 }
Пример #45
0
 public ISparqlAlgebra Transform(IAlgebraOptimiser optimiser)
 {
     return new Extend(optimiser.Optimise(this._inner), this._expr, this._var);
 }
Пример #46
0
 /// <summary>
 /// Transforms the Inner Algebra using the given Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 /// <returns></returns>
 public abstract ISparqlAlgebra Transform(IAlgebraOptimiser optimiser);
Пример #47
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));
 }
Пример #48
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(Lhs, optimiser.Optimise(Rhs)));
 }
Пример #49
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);
     }
 }
Пример #50
0
 /// <summary>
 /// Adds a new Algebra Optimiser
 /// </summary>
 /// <param name="optimiser">Optimiser</param>
 public static void AddOptimiser(IAlgebraOptimiser optimiser)
 {
     _algebraOpt.Add(optimiser);
 }
Пример #51
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));
 }
Пример #52
0
 /// <summary>
 /// Removes an Algebra Optimiser
 /// </summary>
 /// <param name="optimiser"></param>
 public static void RemoveOptimiser(IAlgebraOptimiser optimiser)
 {
     _algebraOpt.Remove(optimiser);
 }
Пример #53
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);
     }
 }
Пример #54
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));
 }
Пример #55
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(this._pattern, this._having);
 }
Пример #56
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 Project(optimiser.Optimise(this._pattern), this._variables);
 }