net.ontopia.topicmaps.query.impl.utils
Class QueryOptimizer.AddTypeToRolePlayer
java.lang.Object
net.ontopia.topicmaps.query.impl.utils.QueryOptimizer.AbstractQueryOptimizer
net.ontopia.topicmaps.query.impl.utils.QueryOptimizer.AddTypeToRolePlayer
- All Implemented Interfaces:
- QueryOptimizerIF
- Enclosing class:
- QueryOptimizer
public static class QueryOptimizer.AddTypeToRolePlayer
- extends QueryOptimizer.AbstractQueryOptimizer
INTERNAL:
Optimizes the role-player() predicate when the type of
the role is known from a type() predicate in the same query.
Typical usage is:
role-player($R1, fixed-point),
association-role($A, $R1),
association-role($A, $R2),
$R1 /= $R2,
role-player($R2, $OTHER),
type($R1, required-type)?
What's really needed for the optimization to kick in is two
things:
- In the role-player($A, $B) predicate $A must be unbound and
$B must be bound
- In the type($C, $D) predicate the $C must match $A, and $D
must be bound when the role-player() runs, and not
by the type() predicate
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueryOptimizer.AddTypeToRolePlayer
public QueryOptimizer.AddTypeToRolePlayer()
optimize
public void optimize(TologQuery query,
QueryContext context)
- Specified by:
optimize
in interface QueryOptimizerIF
- Overrides:
optimize
in class QueryOptimizer.AbstractQueryOptimizer
Copyright © 2000-2012 Ontopia.