org.objectweb.medor.optim.jorm
Class JormLeafRewriter
- LeafRewriter, RewriteRule
public abstract class JormLeafRewriter
- S. Chassande-Barrioz
QueryTreeField | addPrimitiveElement(QueryLeaf neo, PrimitiveElement pe, JormExtent extent)
|
protected void | addReference(NameDef nd, PNameField pnf, QueryNode qt, QueryLeaf specificQL, JormExtent extent)
|
boolean | canRewrite(QueryLeaf ql) - It returns true is the QueryLeaf can be rewrite by this LeafRewriter.
|
protected QueryLeaf | createQueryLeaf(JormExtent extent)
|
QueryTreeField | getField(QueryLeaf neo, PrimitiveElement pe, JormExtent extent)
|
protected String | getFieldName(String prefix, String nodeName)
|
protected String | getShortFieldName(String fn)
|
QueryTree | rewrite(QueryLeaf ql) - It rewrites the QueryLeaf into a QueryTree.
|
QueryTree | rewrite(QueryTree qt, QueryNode parent) - This method applies a single rule.
|
JormLeafRewriter
public JormLeafRewriter(String suffix)
canRewrite
public boolean canRewrite(QueryLeaf ql)
It returns true is the QueryLeaf can be rewrite by this LeafRewriter.
- canRewrite in interface LeafRewriter
getFieldName
protected String getFieldName(String prefix,
String nodeName)
getShortFieldName
protected String getShortFieldName(String fn)
rewrite
public QueryTree rewrite(QueryTree qt,
QueryNode parent)
throws MedorException
This method applies a single rule.
It is typically called by the
QueryRewriter for applying the entire rewriting process.
- rewrite in interface RewriteRule
qt
- the QueryTree to be rewrittenparent
- the parent QueryNode for which modification of propagated
field, if they are replaced in the qt, should be done.
- the rewritten QueryTree
MedorException
-