public class CandidateViewSelectorImplUseTheGenericImplInstead extends Object implements CandidateViewSelectorOld
| Constructor and Description |
|---|
CandidateViewSelectorImplUseTheGenericImplInstead(MappingOps mappingOps) |
| Modifier and Type | Method and Description |
|---|---|
com.hp.hpl.jena.sparql.algebra.Op |
_getApplicableViews(com.hp.hpl.jena.sparql.algebra.Op op)
Given a sparql query in quad form, this method replaces
(sub sets of) quad patterns with view instances (view patterns)
The method also passes the filter conditions that an op must
satisfy.
|
com.hp.hpl.jena.sparql.algebra.Op |
_getApplicableViews(com.hp.hpl.jena.sparql.algebra.Op op,
RestrictionManagerImpl restrictions) |
void |
addView(ViewDefinition viewDef) |
static StartsWithConstraint |
deriveConstraint(com.hp.hpl.jena.sparql.expr.E_StrConcat expr) |
static StartsWithConstraint |
deriveConstraint(E_StrConcatPermissive expr) |
static Constraint |
deriveConstraint(com.hp.hpl.jena.sparql.expr.Expr expr) |
static VariableConstraint |
deriveIsPrefixOfConstraint(com.hp.hpl.jena.sparql.expr.Expr a,
com.hp.hpl.jena.sparql.expr.Expr b)
If a variable equals a (uri or string) constant, it means that the view must provide
a prefix for that value.
|
static VariableConstraint |
deriveViewLookupConstraint(com.hp.hpl.jena.sparql.expr.Expr expr)
Returns IsPrefixOf Constraints for equality expressions between variables and constants.
|
static RestrictionManagerImpl |
filterRestrictionsBound(RestrictionManagerImpl restrictions)
Create a new retrictions manager, where "bound" retrictions are removed
|
Set<ViewQuad> |
findCandidates(com.hp.hpl.jena.sparql.core.Quad quad,
RestrictionManagerImpl restrictions)
TODO: This method is far from optimal performance right now:
We need to consider prefix-set-restrictions of the variables during the lookup in order to rule
out returning to many view-quad candidates.
|
org.aksw.commons.util.Pair<NavigableMap<Integer,Set<com.hp.hpl.jena.sparql.core.Quad>>,Map<com.hp.hpl.jena.sparql.core.Quad,Set<ViewQuad>>> |
findQuadWithFewestViewCandidates(com.hp.hpl.jena.sparql.core.QuadPattern queryQuads,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpAssign op,
RestrictionManagerImpl _restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpConditional op,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpDistinct op,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpExtend op,
RestrictionManagerImpl _restrictions)
Extend defines now variables and is therefore similar to a VarDefinition.
|
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpFilter op,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpGroup op,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpJoin op,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpLeftJoin op,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpOrder op,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpProject op,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpQuadPattern op,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpSequence op,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpSlice op,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpUnion op,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
getApplicableViews(com.hp.hpl.jena.query.Query query) |
List<ViewInstanceJoin> |
getApplicableViewsBase(com.hp.hpl.jena.sparql.algebra.op.OpQuadPattern op,
RestrictionManagerImpl restrictions)
Order the quads of the quadPattern by selectivity.
|
void |
getApplicableViewsRec2(int index,
List<com.hp.hpl.jena.sparql.core.Quad> quadOrder,
Set<ViewQuad> viewQuads,
Map<com.hp.hpl.jena.sparql.core.Quad,Set<ViewQuad>> candidates,
RestrictionManagerImpl restrictions,
NestedStack<ViewInstance> instances,
List<ViewInstanceJoin> result,
Mapping baseMapping) |
static List<String> |
getCandidateNames(NestedStack<ViewInstance> instances) |
static List<RestrictionManagerImpl> |
getRestrictions(com.hp.hpl.jena.sparql.algebra.Op op) |
static void |
getRestrictions(com.hp.hpl.jena.sparql.algebra.Op op,
Collection<RestrictionManagerImpl> result)
Returns a disjunction (list) of restrictions that apply for a given node
|
static RestrictionManagerImpl |
getRestrictions2(com.hp.hpl.jena.sparql.algebra.Op op) |
static RdfTermType |
getType(com.hp.hpl.jena.graph.Node node,
RestrictionManagerImpl restrictions) |
Collection<ViewDefinition> |
getViews() |
static boolean |
isSatisfiable(List<ViewInstance> list)
TODO FIX THIS
|
com.hp.hpl.jena.sparql.algebra.op.OpLeftJoin |
processLeftJoin(com.hp.hpl.jena.sparql.algebra.Op left,
com.hp.hpl.jena.sparql.algebra.Op right,
Iterable<com.hp.hpl.jena.sparql.expr.Expr> exprs,
RestrictionManagerImpl restrictions) |
com.hp.hpl.jena.sparql.algebra.Op |
processOpExtend(com.hp.hpl.jena.sparql.algebra.Op subOp,
com.hp.hpl.jena.sparql.core.VarExprList varExprs,
RestrictionManagerImpl _restrictions) |
public CandidateViewSelectorImplUseTheGenericImplInstead(MappingOps mappingOps)
opMappingRewriter - May be null. If given, we can do rewrites during the SQL generation to prune empty result mappings early.public void addView(ViewDefinition viewDef)
addView in interface CandidateViewSelectorOldpublic static Constraint deriveConstraint(com.hp.hpl.jena.sparql.expr.Expr expr)
public static StartsWithConstraint deriveConstraint(com.hp.hpl.jena.sparql.expr.E_StrConcat expr)
public static StartsWithConstraint deriveConstraint(E_StrConcatPermissive expr)
public static RdfTermType getType(com.hp.hpl.jena.graph.Node node, RestrictionManagerImpl restrictions)
public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.query.Query query)
getApplicableViews in interface CandidateViewSelectorOldpublic static VariableConstraint deriveIsPrefixOfConstraint(com.hp.hpl.jena.sparql.expr.Expr a, com.hp.hpl.jena.sparql.expr.Expr b)
a - b - public static VariableConstraint deriveViewLookupConstraint(com.hp.hpl.jena.sparql.expr.Expr expr)
expr - public List<ViewInstanceJoin> getApplicableViewsBase(com.hp.hpl.jena.sparql.algebra.op.OpQuadPattern op, RestrictionManagerImpl restrictions)
public Set<ViewQuad> findCandidates(com.hp.hpl.jena.sparql.core.Quad quad, RestrictionManagerImpl restrictions)
quad - restrictions - public org.aksw.commons.util.Pair<NavigableMap<Integer,Set<com.hp.hpl.jena.sparql.core.Quad>>,Map<com.hp.hpl.jena.sparql.core.Quad,Set<ViewQuad>>> findQuadWithFewestViewCandidates(com.hp.hpl.jena.sparql.core.QuadPattern queryQuads, RestrictionManagerImpl restrictions)
public static List<String> getCandidateNames(NestedStack<ViewInstance> instances)
public void getApplicableViewsRec2(int index,
List<com.hp.hpl.jena.sparql.core.Quad> quadOrder,
Set<ViewQuad> viewQuads,
Map<com.hp.hpl.jena.sparql.core.Quad,Set<ViewQuad>> candidates,
RestrictionManagerImpl restrictions,
NestedStack<ViewInstance> instances,
List<ViewInstanceJoin> result,
Mapping baseMapping)
index - quadOrder - viewQuads - The viewQuads provided by the parent invocation - with any restrictions encountered during the rewrite taken into accountcandidates - The viewQuads here are the ones from only analyzing the query filter
In some cases (small candidate sets) it might be faster filtering this set of view candidates, rather than doing a new lookup.restrictions - result - public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpQuadPattern op,
RestrictionManagerImpl restrictions)
public static boolean isSatisfiable(List<ViewInstance> list)
list - public com.hp.hpl.jena.sparql.algebra.Op _getApplicableViews(com.hp.hpl.jena.sparql.algebra.Op op)
op - public com.hp.hpl.jena.sparql.algebra.Op _getApplicableViews(com.hp.hpl.jena.sparql.algebra.Op op,
RestrictionManagerImpl restrictions)
public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpSequence op,
RestrictionManagerImpl restrictions)
public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpProject op,
RestrictionManagerImpl restrictions)
public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpOrder op,
RestrictionManagerImpl restrictions)
public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpGroup op,
RestrictionManagerImpl restrictions)
public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpExtend op,
RestrictionManagerImpl _restrictions)
public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpAssign op,
RestrictionManagerImpl _restrictions)
public com.hp.hpl.jena.sparql.algebra.Op processOpExtend(com.hp.hpl.jena.sparql.algebra.Op subOp,
com.hp.hpl.jena.sparql.core.VarExprList varExprs,
RestrictionManagerImpl _restrictions)
public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpFilter op,
RestrictionManagerImpl restrictions)
public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpUnion op,
RestrictionManagerImpl restrictions)
public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpJoin op,
RestrictionManagerImpl restrictions)
public static RestrictionManagerImpl filterRestrictionsBound(RestrictionManagerImpl restrictions)
restrictions - public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpLeftJoin op,
RestrictionManagerImpl restrictions)
public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpConditional op,
RestrictionManagerImpl restrictions)
public com.hp.hpl.jena.sparql.algebra.op.OpLeftJoin processLeftJoin(com.hp.hpl.jena.sparql.algebra.Op left,
com.hp.hpl.jena.sparql.algebra.Op right,
Iterable<com.hp.hpl.jena.sparql.expr.Expr> exprs,
RestrictionManagerImpl restrictions)
public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpSlice op,
RestrictionManagerImpl restrictions)
public com.hp.hpl.jena.sparql.algebra.Op getApplicableViews(com.hp.hpl.jena.sparql.algebra.op.OpDistinct op,
RestrictionManagerImpl restrictions)
public static RestrictionManagerImpl getRestrictions2(com.hp.hpl.jena.sparql.algebra.Op op)
public static List<RestrictionManagerImpl> getRestrictions(com.hp.hpl.jena.sparql.algebra.Op op)
public static void getRestrictions(com.hp.hpl.jena.sparql.algebra.Op op,
Collection<RestrictionManagerImpl> result)
public Collection<ViewDefinition> getViews()
getViews in interface CandidateViewSelectorOldCopyright © 2014. All rights reserved.