net.ontopia.topicmaps.query.impl.utils
Class QueryOptimizer.AddTypeToRolePlayer

java.lang.Object
  extended by net.ontopia.topicmaps.query.impl.utils.QueryOptimizer.AbstractQueryOptimizer
      extended by 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:


Constructor Summary
QueryOptimizer.AddTypeToRolePlayer()
           
 
Method Summary
 void optimize(TologQuery query, QueryContext context)
           
 
Methods inherited from class net.ontopia.topicmaps.query.impl.utils.QueryOptimizer.AbstractQueryOptimizer
optimize, optimize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryOptimizer.AddTypeToRolePlayer

public QueryOptimizer.AddTypeToRolePlayer()
Method Detail

optimize

public void optimize(TologQuery query,
                     QueryContext context)
Specified by:
optimize in interface QueryOptimizerIF
Overrides:
optimize in class QueryOptimizer.AbstractQueryOptimizer


Copyright © 2000-2012 Ontopia.