edu.wpi.cs.dsrg.xmldb.xat.common.operator
Class XATMultiSourceOperatorImp

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.XATMultiSourceOperatorImp
Direct Known Subclasses:
AllImp, CartesianProductImp, DifferenceImp, IfExprImp, IntersectionImp, MergeImp, OrImp, OuterUnionImp, UnionImp, XMLDifferenceImp, XMLIntersectionImp

public abstract class XATMultiSourceOperatorImp
extends XATOperatorImp
implements XATMultiSourceOperator

Implementation for the Interface for XATMultiSourceOperator.

Since:
1.0
See Also:
Serialized Form

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
XATMultiSourceOperatorImp(XATNode init)
          Assigns a node to this opertor.
 
Method Summary
 XATDataSource getDataSourceAt(int position)
          Get a specific source of a certain number.
 XATDataSource[] getDataSources()
          Return an array of XATDataSource objects got from its child nodes.
 XATTable getSourceAt(int position)
          Deprecated. use XATMultiSourceOperator.getDataSourceAt(int position)
 XATTable[] getSources()
          Deprecated. use XATMultiSourceOperator.getDataSources(int position)
 void setProperty(java.lang.String name, java.lang.String value)
          sets the given property to the new value.
 
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, 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
 

Constructor Detail

XATMultiSourceOperatorImp

public XATMultiSourceOperatorImp(XATNode init)
Assigns a node to this opertor.
Parameters:
init - is an XAT node
Since:
1.0
Method Detail

getDataSourceAt

public XATDataSource getDataSourceAt(int position)
Get a specific source of a certain number.
Specified by:
getDataSourceAt in interface XATMultiSourceOperator
Returns:
XATDataSource of that position.
Since:
1.0

getDataSources

public XATDataSource[] getDataSources()
Return an array of XATDataSource objects got from its child nodes. You can get those XATDataSource objects from children nodes.
Specified by:
getDataSources in interface XATMultiSourceOperator
Returns:
Vector of XATDataSource.
Since:
1.0

getSourceAt

public XATTable getSourceAt(int position)
Deprecated. use XATMultiSourceOperator.getDataSourceAt(int position)

Get a specific source of a certain number.
Specified by:
getSourceAt in interface XATMultiSourceOperator
Returns:
XATTable of that position.
Since:
1.0

getSources

public XATTable[] getSources()
Deprecated. use XATMultiSourceOperator.getDataSources(int position)

Return a vector of XATTable objects got from its child nodes. You can get those XATTable objects from children nodes.
Specified by:
getSources in interface XATMultiSourceOperator
Returns:
Vector of XATTable.
Since:
1.0

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
                 throws java.lang.Exception
sets the given property to the new value. This method is responsible for validating the given property. An exception is thrown if the value is not correct. Validation should be done in the following manner: First the method should check if the object supports the given property by calling isValidPropertyName(String). If it is not a valid property name, then an exception should be thrown.

Once it is known that the object supports the property, the value must be validated. Each implementor of XATStatistics has a set of properties that are common to all of its types and some that are specific to types. For example, all XATOperators (which implement XATStatistics) have certain properties while an individual XATOperator has specific properties. The indivual types should only validate their own specific types. If the caller is trying to set a common type, it should be validated by the super class by calling super.setProperty(name, value). This will reduce duplicate code.

When it is determined the name / value pair is correct, the pair is updated using setNewPropertyValue()

XATStatisticsImp provides default validation by checking to see if the property's value is >=0. propertyValues that are Strings will just be set. If the property requires more strict constraints than this, it is up to the subclass that created the property to validate it (as described above).

Overrides:
setProperty in class XATOperatorImp
Parameters:
name - the name of the property to set
value - the new value of the property
Throws:
java.lang.Exception - if the given property cannot be found or if the value is not valid for the given property.
Since:
1.0