org.objectweb.medor.optim.lib
Class FlattenQueryTreeRule

java.lang.Object
  extended byorg.objectweb.medor.optim.lib.BasicRule
      extended byorg.objectweb.medor.optim.lib.FlattenQueryTreeRule
All Implemented Interfaces:
RewriteRule

public class FlattenQueryTreeRule
extends BasicRule

Author:
S.Chassande-Barrioz

Nested Class Summary
 
Nested classes inherited from class org.objectweb.medor.optim.lib.BasicRule
BasicRule.ModifiedExpression
 
Field Summary
 
Fields inherited from class org.objectweb.medor.optim.lib.BasicRule
debug, log
 
Constructor Summary
FlattenQueryTreeRule()
           
 
Method Summary
 QueryTree flatten(QueryNode parent, QueryTree qt)
           
 QueryTree rewrite(QueryTree qt, QueryNode parent)
          This method applies a single rule.
 
Methods inherited from class org.objectweb.medor.optim.lib.BasicRule
replaceUsage, rewrite
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlattenQueryTreeRule

public FlattenQueryTreeRule()
Method Detail

rewrite

public QueryTree rewrite(QueryTree qt,
                         QueryNode parent)
                  throws MedorException
Description copied from interface: RewriteRule
This method applies a single rule.

It is typically called by the QueryRewriter for applying the entire rewriting process.

Parameters:
qt - the QueryTree to be rewritten
parent - the parent QueryNode for which modification of propagated field, if they are replaced in the qt, should be done.
Returns:
the rewritten QueryTree
Throws:
MedorException

flatten

public QueryTree flatten(QueryNode parent,
                         QueryTree qt)
                  throws MedorException
Throws:
MedorException