edu.wpi.cs.dsrg.xmldb.xat.common.operator.updateoperator
Class ReplaceImp

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.updateoperator.UpdateOperatorImp
                          |
                          +--edu.wpi.cs.dsrg.xmldb.xat.common.operator.updateoperator.ReplaceImp

public class ReplaceImp
extends UpdateOperatorImp
implements Replace

Implementation for the Replace interface.

Since:
1.0
See Also:
Serialized Form

Field Summary
protected  java.lang.String[] funcArgs
          vector containing the arguments of the function
protected  int updateFunction
          integer indicating update function name (new_attribute() OR new_ref() )
 
Fields inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.updateoperator.UpdateOperatorImp
context, variable
 
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
 
Fields inherited from interface edu.wpi.cs.dsrg.xmldb.xat.common.operator.updateoperator.Replace
NEW_ATTRIBUTE, NEW_REF
 
Constructor Summary
ReplaceImp(XATNode xnodInit)
          Assigns a node to this operator .
ReplaceImp(XATNode xnodInit, java.lang.String contextInit, java.lang.String variableInit)
          Replace $x WITH Assigns a node to this operator, a context, and a variable.
ReplaceImp(XATNode xnodInit, java.lang.String contextInit, java.lang.String variableInit, int updateFunctionInit, java.lang.String[] params)
          Replace WITH new_attribute()/new_ref() Assigns a node to this operator, a context, a variable, a replacing variable, and function arrguments.
ReplaceImp(XATNode xnodInit, java.lang.String contextInit, java.lang.String variableInit, java.lang.String repVar)
          Replace $x WITH $y Assigns a node to this operator, a context, a variable, and a replacing variable.
 
Method Summary
 java.lang.String[] getFuncArgs()
          Sets the PCDATA content that should replace the original content
 java.lang.String getPCDATAContent()
          Gets the PCDATA content of the operator
 java.lang.String getReplacingVariable()
          Gets the replacing varible.
 XATTable getRight()
          Gets the right (secondary) data source
 int getUpdateFunction()
          Gets the update function
 void setFuncArgs(java.lang.String[] funArgs)
          Sets the PCDATA content that should replace the original content
 void setPCDATAContent(java.lang.String pcdata)
          Sets the PCDATA content that should replace the original content
 void setReplacingVariable(java.lang.String repVar)
          Sets the replacing varible.
 void setUpdateFunction(int updateFunc)
          Sets the update function
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.updateoperator.UpdateOperatorImp
getContext, getVariable, setContext, setVariable
 
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, toString
 
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

updateFunction

protected int updateFunction
integer indicating update function name (new_attribute() OR new_ref() )

funcArgs

protected java.lang.String[] funcArgs
vector containing the arguments of the function
Constructor Detail

ReplaceImp

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

ReplaceImp

public ReplaceImp(XATNode xnodInit,
                  java.lang.String contextInit,
                  java.lang.String variableInit)
Replace $x WITH Assigns a node to this operator, a context, and a variable.
Parameters:
XATNode - edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.XATNode
contextInit - String
variableInit - String
Since:
1.0

ReplaceImp

public ReplaceImp(XATNode xnodInit,
                  java.lang.String contextInit,
                  java.lang.String variableInit,
                  java.lang.String repVar)
Replace $x WITH $y Assigns a node to this operator, a context, a variable, and a replacing variable.
Parameters:
XATNode - edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.XATNode
contextInit - String
variableInit - String
repVar - String
Since:
1.0

ReplaceImp

public ReplaceImp(XATNode xnodInit,
                  java.lang.String contextInit,
                  java.lang.String variableInit,
                  int updateFunctionInit,
                  java.lang.String[] params)
Replace WITH new_attribute()/new_ref() Assigns a node to this operator, a context, a variable, a replacing variable, and function arrguments.
Parameters:
XATNode - edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.XATNode
contextInit - String
variableInit - String
repVar - String
params - an array of String
Since:
1.0
Method Detail

getPCDATAContent

public java.lang.String getPCDATAContent()
Gets the PCDATA content of the operator
Specified by:
getPCDATAContent in interface Replace
Returns:
int
Since:
1.0

getRight

public XATTable getRight()
                  throws XATNodeDoesNotExistException
Gets the right (secondary) data source
Specified by:
getRight in interface Replace
Returns:
XATTAble containing columns representing the new element throws XATNodeDoesNotExistException
Since:
1.0

getUpdateFunction

public int getUpdateFunction()
Gets the update function
Specified by:
getUpdateFunction in interface Replace
Returns:
int
Since:
1.0

getFuncArgs

public java.lang.String[] getFuncArgs()
Sets the PCDATA content that should replace the original content
Specified by:
getFuncArgs in interface Replace
Parameters:
String -  
Since:
1.0

getReplacingVariable

public java.lang.String getReplacingVariable()
Gets the replacing varible.
Specified by:
getReplacingVariable in interface Replace
Parameters:
newVar - String
Since:
1.0

setFuncArgs

public void setFuncArgs(java.lang.String[] funArgs)
Sets the PCDATA content that should replace the original content
Specified by:
setFuncArgs in interface Replace
Parameters:
funcArgs - an array of String
Since:
1.0

setPCDATAContent

public void setPCDATAContent(java.lang.String pcdata)
Sets the PCDATA content that should replace the original content
Specified by:
setPCDATAContent in interface Replace
Parameters:
String -  
Since:
1.0

setReplacingVariable

public void setReplacingVariable(java.lang.String repVar)
Sets the replacing varible.
Specified by:
setReplacingVariable in interface Replace
Parameters:
newVar - String
Since:
1.0

setUpdateFunction

public void setUpdateFunction(int updateFunc)
Sets the update function
Specified by:
setUpdateFunction in interface Replace
Parameters:
funcType - int
Since:
1.0