edu.wpi.cs.dsrg.xmldb.xat.common.xatnode
Interface XATTable

All Known Implementing Classes:
XATTableImp

public interface XATTable
extends XATDataSource, ColumnAccessor, RowAccessor

The class defines the data model of the XAT, which is a table of XML fragments.

Since:
1.0

Method Summary
 void appendTable(XATTable sour)
          Append this table to given table.
 int appendTuple(java.util.Vector new_tuple)
          Append a new tuple to the end of the table.
 XATTable cloneSchema()
          Construct a new XATTable which has the same column names as this XATTable.
 void deleteAllTuples()
          Delete all the tuples in this XATTable.
 java.util.Vector deleteTuple(int position)
          Delete a tuple of the specified position.
 java.util.Vector getCommonColumnNames(XATTable tab2)
          This method takes two XATTables, finds all matching columns.
 java.lang.String getName()
          Get the Name of the XATTable.
 int getNumberOfTuples()
          Get total number of tuples in this table.
 java.util.Vector getRowList()
          Get the vector containing the columns contents.
 java.util.Vector getTuple(int position)
          Get a tuple in a specified position.
 java.util.Vector getUnCommonColumnNames(XATTable tab2)
          This method takes two XATTables, and finds all un-matching columns.
 int insertTuple(int position, java.util.Vector new_tuple)
          Insert a new tuple to the table before specific position.
 void moveTuple(int from_position, int to_position)
          Move a tuple to a specific position.
 void print()
          Prints the XATTable
 void setColumnName(java.lang.String newName, int position)
          Set Column Name in the specified position.
 java.lang.String setName(java.lang.String newName)
          Set the Name of the Table.
 java.lang.String toString()
          Convert the XATTable into a String for output.
 java.util.Vector updateTuple(int position, java.util.Vector new_tuple)
          Update a tuple.
 
Methods inherited from interface edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.XATDataSource
deepCloneDataSource
 
Methods inherited from interface edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.ColumnAccessor
appendColumn, appendColumn, deleteColumn, getColList, getColNames, getColumn, getColumnName, getColumnPosition, getNumberOfColumns, insertColumn, mergeColumnNames, moveColumn, updateColumn
 
Methods inherited from interface edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.RowAccessor
getValue, updateValue
 
Methods inherited from interface edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObject
getStatistics, isValidStatistic
 
Methods inherited from interface edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATProperties
getProperties, getProperty, isValidPropertyName, setProperty
 

Method Detail

appendTable

public void appendTable(XATTable sour)
Append this table to given table.
Parameters:
sour - The source table will be appended.
Returns:
void
Since:
1.0

appendTuple

public int appendTuple(java.util.Vector new_tuple)
                throws XATTableSchemaNoMatchException
Append a new tuple to the end of the table.
Parameters:
new_tuple - The new tuple going to be appended.
Returns:
int The position of the new appended tuple.
Since:
1.0

cloneSchema

public XATTable cloneSchema()
Construct a new XATTable which has the same column names as this XATTable.
Returns:
XATTable The new constructed XATTable.
Since:
1.0

deleteAllTuples

public void deleteAllTuples()
Delete all the tuples in this XATTable.
Returns:
void
Since:
1.0

deleteTuple

public java.util.Vector deleteTuple(int position)
                             throws XATTableOutOfRangeException,
                                    XATTableEmptyException
Delete a tuple of the specified position.
Parameters:
position - The position of the tuple going to be deleted.
Returns:
Vector The content of the deleted tuple.
Since:
1.0

getCommonColumnNames

public java.util.Vector getCommonColumnNames(XATTable tab2)
This method takes two XATTables, finds all matching columns.
Parameters:
tab2 - The another source XATTable.
Returns:
Vector The vector containning all common columns of two XATTable.
Since:
1.0

getName

public java.lang.String getName()
Get the Name of the XATTable.
Returns:
String The name of the XATTable.
Since:
1.0

getNumberOfTuples

public int getNumberOfTuples()
Get total number of tuples in this table.
Returns:
int The total number of tuples with this XATTable.
Since:
1.0

getRowList

public java.util.Vector getRowList()
Get the vector containing the columns contents.
Returns:
Vector The Vector containing the columns contents.
Since:
1.0

getTuple

public java.util.Vector getTuple(int position)
                          throws XATTableEmptyException,
                                 XATTableOutOfRangeException
Get a tuple in a specified position.
Parameters:
position - The position of the tuple start from 1.
Returns:
Vector The Vector of cells in one tuple.
Since:
1.0

getUnCommonColumnNames

public java.util.Vector getUnCommonColumnNames(XATTable tab2)
This method takes two XATTables, and finds all un-matching columns.
Parameters:
tab2 - The another source XATTable.
Returns:
Vector Containing all the un-matching columns.
Since:
1.0

insertTuple

public int insertTuple(int position,
                       java.util.Vector new_tuple)
                throws XATTableOutOfRangeException,
                       XATTableSchemaNoMatchException
Insert a new tuple to the table before specific position.
Parameters:
positoin - The inserted tuple position.
new_tuple - The new tuple content.
Returns:
int The number of tuples after the insertion.
Since:
1.0

moveTuple

public void moveTuple(int from_position,
                      int to_position)
               throws XATTableOutOfRangeException,
                      XATTableEmptyException
Move a tuple to a specific position.
Parameters:
from_position - The position of tuple to be moved.
to_position - Identify the dest position moved to.
Returns:
void
Since:
1.0

print

public void print()
Prints the XATTable
Returns:
void
Since:
1.0

setColumnName

public void setColumnName(java.lang.String newName,
                          int position)
                   throws XATTableOutOfRangeException
Set Column Name in the specified position.
Parameters:
newName - The new name for column.
position - The position for this new column name.
Returns:
void
Since:
1.0

setName

public java.lang.String setName(java.lang.String newName)
Set the Name of the Table.
Parameters:
newName - The new name of the XATTable.
Returns:
The old name of the XATTable.
Since:
1.0

toString

public java.lang.String toString()
Convert the XATTable into a String for output.
Overrides:
toString in class java.lang.Object
Returns:
String The result string.
Since:
1.0

updateTuple

public java.util.Vector updateTuple(int position,
                                    java.util.Vector new_tuple)
                             throws XATTableOutOfRangeException,
                                    XATTableEmptyException,
                                    XATTableSchemaNoMatchException
Update a tuple.
Parameters:
position - The position of tuple to be updated.
new_tuple - The new tuple.
Returns:
Vector The old tuple updated.
Since:
1.0