edu.wpi.cs.dsrg.xmldb.xat.component.xatrewrite
Class NavTaggerCancelout
java.lang.Object
|
+--edu.wpi.cs.dsrg.xmldb.xat.component.xatrewrite.NavTaggerCancelout
- public class NavTaggerCancelout
- extends java.lang.Object
This Class is used to cancel out Navigate and Tagger by using the binding tables.
- Since:
- 1.0
Method Summary |
static void |
cancelOut(XATTree tree)
Cancel out Navigate and Tagger if possible. |
static java.util.Vector |
computeAlias(java.lang.String key,
BindingTable btable)
Compute the alias of given column. |
static boolean |
isDebug()
Get the value of the propertity 'DEBUG_NavTaggerCancelout'. |
void |
setDebug(boolean debug)
Set the propertity 'DEBUG_NavTaggerCancelout'. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
NavTaggerCancelout
public NavTaggerCancelout()
- Default NavTaggerCancelout constructor.
- Since:
- 1.0
cancelOut
public static void cancelOut(XATTree tree)
- Cancel out Navigate and Tagger if possible.
This method first compute the Simplified Full Path for each variable in the Binding Table.
Then it will compare the values for each keys, and find alias.
Third, search through the trees to change the Navigation with alias into rename operators.
Forth, do the schema clean up to get rid of the unnecessary rename and tagger operators.
- Parameters:
tree
- edu.wpi.cs.dsrg.xmldb.xat.common.treestructure.XATTree- Returns:
- void
- Since:
- 1.0
- See Also:
XATTree
computeAlias
public static java.util.Vector computeAlias(java.lang.String key,
BindingTable btable)
- Compute the alias of given column.
This method will return a Vector of columns on this Key's chain columns,
And then if the columns'full path same as this Key's simplifiedpath,
Then, it is its alias.
- Parameters:
key
- The column name searching alias for.bind
- The BindingTable used to search alias for the given column name 'key'.- Returns:
- Vector All the alias of this Key. The lowest one is at the end of this Vector.
- Since:
- 1.0
- See Also:
BindingTable
isDebug
public static boolean isDebug()
- Get the value of the propertity 'DEBUG_NavTaggerCancelout'.
- Returns:
- boolean True: With debug information. False: No debug information.
- Since:
- 1.0
setDebug
public void setDebug(boolean debug)
- Set the propertity 'DEBUG_NavTaggerCancelout'.
- Parameters:
debug
- The flag indicate: True - with debug information output.
False - without debug information output.- Returns:
- void
- Since:
- 1.0