Class AbstractQueryMetaContext
java.lang.Object
tools.refinery.interpreter.matchers.context.AbstractQueryMetaContext
- All Implemented Interfaces:
IQueryMetaContext
Common abstract class for implementers of
IQueryMetaContext
- Since:
- 1.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tells whether the givenIInputKey
is an edge and may lead out of scope.getConditionalImplications
(IInputKey implyingKey) Returns known "double dispatch" implications, where the given implying key implies other input keys under certain additional conditions (themselves input keys).Returns anIPosetComparator
for the given set ofIInputKey
s.For query normalizing, this is the order suggested for trying to eliminate input keys.getWeakenedAlternatives
(IInputKey implyingKey) Returns a set of implications (weakened alternatives), with a suggestion for the query planner that satisfying them first may help in satisfying the implying key.boolean
isPosetKey
(IInputKey key) Returns true if the givenIInputKey
represents a poset type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface tools.refinery.interpreter.matchers.context.IQueryMetaContext
getFunctionalDependencies, getImplications, isEnumerable, isStateless
-
Constructor Details
-
AbstractQueryMetaContext
public AbstractQueryMetaContext()
-
-
Method Details
-
getConditionalImplications
public Map<InputKeyImplication,Set<InputKeyImplication>> getConditionalImplications(IInputKey implyingKey) Description copied from interface:IQueryMetaContext
Returns known "double dispatch" implications, where the given implying key implies other input keys under certain additional conditions (themselves input keys). For example, a "type x, unscoped" input key may imply the "type x, in scope" input key under the condition of the input key "x is in scope"Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys (either as the implying key or as the additional condition).
Note that symmetry is not required, i.e. the additional conditions do not have to list the same conditional implication.
- Specified by:
getConditionalImplications
in interfaceIQueryMetaContext
- Returns:
- multi-map, where the keys are additional conditions and the values are input key implications jointly implied by the condition and the given implying key.
- Since:
- 2.0
-
canLeadOutOfScope
Description copied from interface:IQueryMetaContext
Tells whether the givenIInputKey
is an edge and may lead out of scope.- Specified by:
canLeadOutOfScope
in interfaceIQueryMetaContext
- Since:
- 1.6
-
getSuggestedEliminationOrdering
Description copied from interface:IQueryMetaContext
For query normalizing, this is the order suggested for trying to eliminate input keys.- Specified by:
getSuggestedEliminationOrdering
in interfaceIQueryMetaContext
- Since:
- 1.6
-
getWeakenedAlternatives
Description copied from interface:IQueryMetaContext
Returns a set of implications (weakened alternatives), with a suggestion for the query planner that satisfying them first may help in satisfying the implying key.Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys.
Must follow directly or transitively from implications of
IQueryMetaContext.getImplications(IInputKey)
.- Specified by:
getWeakenedAlternatives
in interfaceIQueryMetaContext
- Since:
- 1.6
-
isPosetKey
Description copied from interface:IQueryMetaContext
Returns true if the givenIInputKey
represents a poset type.- Specified by:
isPosetKey
in interfaceIQueryMetaContext
-
getPosetComparator
Description copied from interface:IQueryMetaContext
Returns anIPosetComparator
for the given set ofIInputKey
s.- Specified by:
getPosetComparator
in interfaceIQueryMetaContext
- Parameters:
key
- an iterable collection of input keys- Returns:
- the poset comparator
-