Class ExprIndex

java.lang.Object
org.aksw.sparqlify.database.ExprIndex

public class ExprIndex extends Object
TODO Clarify: Do I want disjunctive or conjunctive normal form? (a and b) or (c and d) or (a or b) and(c or d) ? I guess the former is better, as (a and not a) can be easily detected What happens if we allow conjunctions of disjunctive normal forms? ((a, b) or (c, d) AND ((x) or (y))) becomes (abx or aby or cdx or cdy) (so the cross product of the involved clauses) Maybe i could do virtual clauses: CrossJoinClause(Clauses ...) Hm, but with CNF it is easier to add new expressions.
Author:
Claus Stadler <cstadler@informatik.uni-leipzig.de>
  • Constructor Details

    • ExprIndex

      public ExprIndex()
    • ExprIndex

      public ExprIndex(ExprIndex parent)
    • ExprIndex

      public ExprIndex(ExprIndex parent, Iterable<org.apache.jena.sparql.expr.Expr> exprs)
    • ExprIndex

      public ExprIndex(Set<Dnf> dnfs)
  • Method Details

    • getEffectiveDnf

      public void getEffectiveDnf(Collection<org.apache.jena.sparql.core.Var> vars)
    • calcEffectiveClauses

      public void calcEffectiveClauses(List<Dnf> dnfs, int index, Set<Clause> blacklist, Clause parentClause, Set<Clause> result)
      I use this method for getting constraints for finding view candidates
      Parameters:
      dnfs -
      index -
      dnfIndex -
      blacklist -
      depth -
      parentClause -
      result -
    • calcEffectiveClauses

      public Set<Clause> calcEffectiveClauses()
      This method is an ugly hack right, but I don't know where to better calculate it
      Returns:
    • getEffectiveClauses

      public Set<Clause> getEffectiveClauses()
    • getParent

      public ExprIndex getParent()
    • getDnf

      public Collection<Dnf> getDnf()
    • getVarsMentioned

      public Set<org.apache.jena.sparql.core.Var> getVarsMentioned()
    • getAllClausesWith

      public Set<Clause> getAllClausesWith(org.apache.jena.sparql.core.Var var)
      Any clause containing a var means, that in order for the clause to evaluate to true, the expression it is involved must be true.
      Parameters:
      var -
      Returns:
    • getAllSingleVarExprs

      public Set<Clause> getAllSingleVarExprs(org.apache.jena.sparql.core.Var var)
    • addAll

      public void addAll(Iterable<org.apache.jena.sparql.expr.Expr> exprs)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • filterByVars

      public ExprIndex filterByVars(Set<org.apache.jena.sparql.core.Var> requiredVars)