org.objectweb.medor.optim.jorm
Class JormGoUpDecodeRule
- RewriteRule
public class JormGoUpDecodeRule
The aim of this rule is to remove comparaisons between PNames and move
up the Decode operators (i.e. SinglePName and CompositePName) at the root of
the QueryTree.
This rule is applied in one shot on the tree.
The Decode operators (SinglePName and CompositePName) are produced by
the JormLeafRewriter rule.
- S. Chassande-Barrioz
JormLeafRewriter
Map | goUpDecode(QueryNode qn, boolean isRoot) - This recursive method performs the real work of the rule.
|
QueryTree | rewrite(QueryTree qt, QueryNode _parent) - Rewrites a QueryTree by removing comparisons between PNames and moving
up the Decode operators at the root of the QueryTree.
|
JormGoUpDecodeRule
public JormGoUpDecodeRule()
goUpDecode
public Map goUpDecode(QueryNode qn,
boolean isRoot)
throws MedorException
This recursive method performs the real work of the rule.
qn
- is the QueryNode on which the rule must be applied.isRoot
- is a boolean which indicates if the qn is the root of the
QueryTree.
- a map with the following characteristics:
-
key = an old projected field of a child. The old field is a PName decode
or a Propagated field.
- value = A map of composite field name associated to the new projected
fields of the child. These fields replace the PName identifier. They are
the PName fields. (key=composite fname, value=field)
rewrite
public QueryTree rewrite(QueryTree qt,
QueryNode _parent)
throws MedorException
Rewrites a QueryTree by removing comparisons between PNames and moving
up the Decode operators at the root of the QueryTree.
It relies on the goUpDecode method to perform the real work.
- rewrite in interface RewriteRule
qt
- the QueryTree to be rewritten
- the rewritten QueryTree
MedorException
-