Package org.aksw.sparqlify.database
Class ExprIndex
java.lang.Object
org.aksw.sparqlify.database.ExprIndex
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is an ugly hack right, but I don't know where to better calculate itvoidcalcEffectiveClauses(List<Dnf> dnfs, int index, Set<Clause> blacklist, Clause parentClause, Set<Clause> result) I use this method for getting constraints for finding view candidatesfilterByVars(Set<org.apache.jena.sparql.core.Var> requiredVars) 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.getAllSingleVarExprs(org.apache.jena.sparql.core.Var var) getDnf()voidgetEffectiveDnf(Collection<org.apache.jena.sparql.core.Var> vars) Set<org.apache.jena.sparql.core.Var>toString()
-
Constructor Details
-
ExprIndex
public ExprIndex() -
ExprIndex
-
ExprIndex
-
ExprIndex
-
-
Method Details
-
getEffectiveDnf
-
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
This method is an ugly hack right, but I don't know where to better calculate it- Returns:
-
getEffectiveClauses
-
getParent
-
getDnf
-
getVarsMentioned
-
getAllClausesWith
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
-
addAll
-
toString
-
filterByVars
-