edu.wpi.cs.dsrg.xmldb.xat.common.operator.specialoperator
Class NameColumnImp

java.lang.Object
  |
  +--edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATPropertiesImp
        |
        +--edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObjectImp
              |
              +--edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATOperatorImp
                    |
                    +--edu.wpi.cs.dsrg.xmldb.xat.common.operator.specialoperator.NameColumnImp

public class NameColumnImp
extends XATOperatorImp
implements NameColumn

Implementation for the interface NameColumn.

Since:
1.0
See Also:
Serialized Form

Field Summary
protected  NavigationStep[] columnPath
          the absolute path of the column to be renamed
protected  java.lang.String desc
          Block description.
protected  java.lang.String sNewColumnName
          the name of the new column
protected  java.lang.String sOrgColumnName
          the original name of the column
 
Fields inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATOperatorImp
columnsFiltered, outputColumnName, xnodOwner, xtabOutput
 
Fields inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObjectImp
stats, statsPresent
 
Constructor Summary
NameColumnImp(XATNode xnodInit)
          Assigns a node to this operator .
NameColumnImp(XATNode xnodInit, java.lang.String sOrgNameInit, java.lang.String sNewNameInit)
          Assigns a node to this operator also assigns original and new column names.
NameColumnImp(XATNode xnodInit, java.lang.String sOrgNameInit, java.lang.String sNewNameInit, NavigationStep[] colPath)
          Assigns a node to this operator also assigns original and new column names and column path.
 
Method Summary
 void accept(Visitor visitor)
          It used to implement a visitor pattern.
 java.lang.String getBlockDesc()
          Extends the semantic of NameColumn operator.
 NavigationStep[] getColumnPath()
          Gets the absolute path for this column.
 java.lang.String getNewColumnName()
          Gets the new column name.
 java.lang.String getOriginalColumnName()
          Gets the original column name.
 void setBlockDesc(java.lang.String desc)
          Sets block description.
 void setColumnPath(NavigationStep[] newColumnPath)
          Sets the absolute path for this rename.
 void setNewColumnName(java.lang.String new_name)
          Sets the new name for the column
 void setOriginalColumnName(java.lang.String original_name)
          Set the name of the column to be renamed
 java.lang.String toString()
          returns a string representation
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATOperatorImp
clone, getColumnsFiltered, getNode, getOutput, getOutputColumnName, getOutputDataSource, getOutputDataSources, getPrimaryDataSource, getPrimarySource, setDefaultProperties, setNode, setOutput, setOutputColumnName, setProperty
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObjectImp
addStatistic, compareTo, getStatistics, isValidStatistic, setDefaultStatistics
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATPropertiesImp
addProperty, getProperties, getProperty, isValidPropertyName, setNewPropertyValue
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sNewColumnName

protected java.lang.String sNewColumnName
the name of the new column

sOrgColumnName

protected java.lang.String sOrgColumnName
the original name of the column

columnPath

protected NavigationStep[] columnPath
the absolute path of the column to be renamed

desc

protected java.lang.String desc
Block description. used to extend the functionality of namecolumn operator.
Constructor Detail

NameColumnImp

public NameColumnImp(XATNode xnodInit)
Assigns a node to this operator .
Parameters:
init - edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.XATNode
Since:
1.0

NameColumnImp

public NameColumnImp(XATNode xnodInit,
                     java.lang.String sOrgNameInit,
                     java.lang.String sNewNameInit)
Assigns a node to this operator also assigns original and new column names.
Parameters:
init - edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.XATNode
sOrgNameInit - original column name
sNewNameInit - new column name
Since:
1.0

NameColumnImp

public NameColumnImp(XATNode xnodInit,
                     java.lang.String sOrgNameInit,
                     java.lang.String sNewNameInit,
                     NavigationStep[] colPath)
Assigns a node to this operator also assigns original and new column names and column path.
Parameters:
init - edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.XATNode
sOrgNameInit - original column name
sNewNameInit - new column name
colPath - is column path
Since:
1.0
Method Detail

accept

public void accept(Visitor visitor)
It used to implement a visitor pattern.
Parameters:
visitor - for the visitor pattern
Since:
1.0

getBlockDesc

public java.lang.String getBlockDesc()
Extends the semantic of NameColumn operator. It also used to identify a start of a new query block. This will give back query block description. So far, we have one meaningful desc: "return". Which is used to tell the decore engine to put the LOJ below that operator.
Specified by:
getBlockDesc in interface NameColumn
Returns:
java.lang.String
Since:
1.0

getColumnPath

public NavigationStep[] getColumnPath()
Gets the absolute path for this column.
Specified by:
getColumnPath in interface NameColumn
Returns:
NavigationStepImp[]
Since:
1.0

getNewColumnName

public java.lang.String getNewColumnName()
Gets the new column name.
Specified by:
getNewColumnName in interface NameColumn
Returns:
new column name
Since:
1.0

getOriginalColumnName

public java.lang.String getOriginalColumnName()
Gets the original column name.
Specified by:
getOriginalColumnName in interface NameColumn
Returns:
original column name
Since:
1.0

setBlockDesc

public void setBlockDesc(java.lang.String desc)
Sets block description.
Specified by:
setBlockDesc in interface NameColumn
Parameters:
desc - java.lang.String
Since:
1.0
See Also:
getBlockDesc()

setColumnPath

public void setColumnPath(NavigationStep[] newColumnPath)
Sets the absolute path for this rename.
Specified by:
setColumnPath in interface NameColumn
Parameters:
newColumnPath - NavigationStepImp[]
Since:
1.0

setNewColumnName

public void setNewColumnName(java.lang.String new_name)
Sets the new name for the column
Specified by:
setNewColumnName in interface NameColumn
Parameters:
new_name - new name for the column
Since:
1.0

setOriginalColumnName

public void setOriginalColumnName(java.lang.String original_name)
Set the name of the column to be renamed
Specified by:
setOriginalColumnName in interface NameColumn
Parameters:
original_name - name of the column to be renamed
Since:
1.0

toString

public java.lang.String toString()
returns a string representation
Overrides:
toString in class XATOperatorImp
Returns:
java.lang.String
Since:
1.0