TeTable Class Reference

#include <TeTable.h>


Detailed Description

Instances of this classes represent non-spatial tables, or tables that donīt have a spatial data as one of its columns. The class stores the table schema and it also can store rows of data.

Rows of data are stored according to handle/hody idiom, to make copies optimized.

See also:
TeAttribute TeTableImpl
Examples:

createLayer.cpp, and createTable.cpp.

Definition at line 89 of file TeTable.h.


Data in Memory

The following members are used to manipulate rows of the table in memory

void add (const TeTableRow &row)
 Add a row to a table.
void clear ()
 Clears the table storage in memory.
string operator() (int row, int col)
 Returns the element indexed by (row,col).
TeTableRow operator[] (int row) const
 Returns the i-th row.
void setValue (int row, int col, string &val)
 Sets the value of a cell indexed by row x col to value val.
unsigned int size () const
 Returns the number of rows in a table.

Temporal Attributes

The following members are used to manipulate the attribute tables with temporal information.

Temporal tables contains columns to store a time interval in which the
attributes (or a row) of an object is valid.


string attFinalTime ()
 Returns the name of the column that has the final time of the validity interval.
void attFinalTime (const string &t)
 Sets the name of the column that has the final time of the validity interval.
string attInitialTime ()
 Returns the name of the column that has the initial time of the validity interval.
void attInitialTime (const string &t)
 Sets the name of the column that has the initial time of the validity interval.
TeChronon attTimeUnit ()
 Returns the time unit relative to the validity interval.
void attTimeUnit (TeChronon t)
 Sets the time unit relative to the validity interval.

External tables

The following members are used to manipulate information about tables that are external: donīt have a direct link to geometries, but can be linked by a column to another attribute table

string relatedAttribute ()
 Return the column that links to a related table (only for TeAttrExternal tables).
void relatedAttribute (const string &columnName)
 Set the name of a column to link to a related table (only for TeAttrExternal tables).
int relatedTableId ()
 Returns the id of a related table (only for TeAttrExternal tables).
void relatedTableId (int id)
 Sets the id of a table to which this is related (only for TeAttrExternal tables).
string relatedTableName ()
 Returns the name of a related table (only for TeAttrExternal tables).
void relatedTableName (string tableName)
 Sets the name of a table to which this is related (only for TeAttrExternal tables).

Public Member Functions

const TeAttributeListattributeList () const
 Retrieves the list of attributes of this table.
TeAttributeListattributeList ()
 Retrieves the list of attributes of this table.
bool attributeNames (vector< string > &attrs)
 Retrieves the list of attribute names of this table.
bool attrLink (TeAttribute &att)
 If there is one, returns the attribute used as an index.
int attrLinkPosition ()
 Returns the position of the link attribute in the attribute list.
bool attrUnique (TeAttribute &attr)
 If there is one, returns the attribute used as primary key.
int attrUniquePosition ()
 Returns the position of the unique attribute in the attribute list.
int getOrder ()
 Get the position of the table in a join.
int id ()
 Returns the unique id of the table in a database.
string linkName ()
 Returns the name of the column used as link between the attribute table and a spatial table.
void name (const string &n)
 Sets the table name.
string name ()
 Returns the table name.
const stringname () const
 Returns the table name.
TeTableoperator= (const TeTable &)
 Operator =.
void primaryKeys (vector< string > &keys)
 Returns the primary key names of the table.
char separator ()
 Returns the table separator.
void setAttributeList (const TeAttributeList &attList)
 Defines the list of attributes of this table.
void setId (int n)
 Sets the id of the table.
void setLinkName (const string &linkName)
 Sets an attribute as the table index.
void setOrder (int n)
 Set the position of the table in a join.
void setSeparator (const char &c)
 Sets the table separator.
bool setTableType (TeAttrTableType attType, int relatedTableId=-1, const string &relatedAttribute="")
 Sets the table type.
void setUniqueName (const string &uniqueName)
 Sets the name of the column that has unique values.
TeAttrTableType tableType ()
 Returns the type of this attribute table.
 TeTable (const TeTable &)
 Copy Constructor.
 TeTable (const string &name, const TeAttributeList &attList, const string &uniqueName, const string &linkName="", TeAttrTableType tableType=TeAttrStatic)
 Constructor by name and attribute list.
 TeTable (const string &name)
 Constructor by name.
 TeTable ()
 Empty constructor.
string uniqueName ()
 Returns the name of the column used as primary key.
 ~TeTable ()
 Destructor.

Private Attributes

string attFinalTime_
string attInitialTime_
string attLink_
TeAttributeList attList_
TeChronon attTimeUnit_
string attUnique_
int id_
string name_
int order_
TeTableImplpImpl_
string relatedAttribute_
int relatedTableId_
string relatedTableName_
char separator_
TeAttrTableType type_

Constructor & Destructor Documentation

TeTable::TeTable (  ) 

Note:
Instance of TeTable will be created with the following default values:
  • name: "" (empty)
  • id_: -1 (no database identifier)
  • type_: static attribute table
  • attList: empty list of attributes
  • attLink_: "" (no index to geometries)
  • attUnique_: "" (no unique values)
  • separator_: ',' comma separator (used to read ASCII tables from files)
  • attInitialTime_: "" no initial time information
  • attFinalTime_: "" no final time information
  • attTimeUnit_: TeYear
  • relatedTableId: -1 (no relation to other table)
  • relatedTableName: "" (name of the related table)
  • relatedAttribute: "" (attribute of the related table)

Definition at line 115 of file TeTable.cpp.

References pImpl_, and TeTableImpl::refCount_.

00115                 :
00116         id_(-1),
00117         name_(""),
00118         type_(TeAttrStatic),
00119         order_(-1),
00120         attLink_(""),
00121         attUnique_(""),
00122         separator_(','),
00123         attInitialTime_(""),
00124         attFinalTime_(""),
00125         attTimeUnit_(TeSECOND),
00126         relatedTableId_(-1),
00127         relatedAttribute_("")
00128 {
00129         pImpl_ = new TeTableImpl;
00130         pImpl_->refCount_ = 1;  
00131 }

TeTable::TeTable ( const string name  ) 

Parameters:
name table name
Note:
Instance of TeTable will be created with the following default values:
  • id_: -1 (no database identifier)
  • tableType_: static attribute table
  • attList: empty list of attributes
  • attLink_: "" (no index to geometries)
  • attUnique_: "" (no unique values)
  • separator_: ',' comma separator (used to read ASCII tables from files)
  • attInitialTime_: "" no initial time information
  • attFinalTime_: "" no final time information
  • attTimeUnit_: TeYear
  • relatedTableId: -1 (no relation to other table)
  • relatedTableName: "" (name of the related table)
  • relatedAttribute: "" (attribute of the related table)

Definition at line 133 of file TeTable.cpp.

References pImpl_, and TeTableImpl::refCount_.

00133                                   :
00134         id_(-1),
00135         name_(name),
00136         type_(TeAttrStatic),
00137         order_(-1),
00138         attLink_(""),
00139         attUnique_(""),
00140         separator_(','),
00141         attInitialTime_(""),
00142         attFinalTime_(""),
00143         attTimeUnit_(TeSECOND),
00144         relatedTableId_(-1),
00145         relatedAttribute_("")
00146 {
00147         pImpl_ = new TeTableImpl;
00148         pImpl_->refCount_ = 1;  
00149 }

TeTable::TeTable ( const string name,
const TeAttributeList attList,
const string uniqueName,
const string linkName = "",
TeAttrTableType  tableType = TeAttrStatic 
)

Parameters:
name table name
attList list of attributes
uniqueName column that unique attributes to be used as a primary key
linkName column that links attributes to geometries
tableType type of attribute table
Note:
Instance of TeTable will be created with the following default values:
  • id_: -1 (no database identifier)
  • separator_: ',' comma separator (used to read ASCII tables from files)
  • attInitialTime_: "" no initial time information
  • attFinalTime_: "" no final time information
  • attTimeUnit_: TeYear
  • relatedTableId: -1 (no relation to other table)
  • relatedTableName: "" (name of the related table)
  • relatedAttribute: "" (attribute of the related table)

Definition at line 151 of file TeTable.cpp.

References pImpl_, and TeTableImpl::refCount_.

00152                                                                                    :
00153         id_(-1),
00154         name_(name),
00155         type_(tableType),
00156         order_(-1),
00157         attList_(attList),
00158         attLink_(linkName),
00159         attUnique_(uniqueName),
00160         separator_(','),
00161         attInitialTime_(""),
00162         attFinalTime_(""),
00163         attTimeUnit_(TeSECOND),
00164         relatedTableId_(-1),
00165         relatedAttribute_("")
00166 {
00167         pImpl_ = new TeTableImpl;
00168         pImpl_->refCount_ = 1;  
00169 }

TeTable::~TeTable (  ) 

Definition at line 171 of file TeTable.cpp.

References attList_, pImpl_, and TeTableImpl::refCount_.

00172 {
00173         if ( --(pImpl_->refCount_) <= 0 )
00174                 delete pImpl_;  
00175         attList_.clear();
00176 }

TeTable::TeTable ( const TeTable other  ) 

Copies the representation pointer increments the reference counter

Definition at line 182 of file TeTable.cpp.

References attFinalTime_, attInitialTime_, attLink_, attList_, attTimeUnit_, attUnique_, id_, name_, order_, pImpl_, TeTableImpl::refCount_, relatedAttribute_, relatedTableId_, relatedTableName_, separator_, and type_.

00183 {
00184         id_= other.id_;
00185         name_ = other.name_;
00186         type_ = other.type_;
00187         attLink_ = other.attLink_;
00188         attUnique_ = other.attUnique_;
00189         separator_ = other.separator_;
00190         order_ = other.order_;
00191         attInitialTime_ = other.attInitialTime_;
00192         attFinalTime_ = other.attFinalTime_;
00193         attTimeUnit_ = other.attTimeUnit_;
00194         attList_.clear();
00195         attList_.resize(other.attList_.size());
00196         attList_=other.attList_;
00197         relatedTableId_ = other.relatedTableId_;
00198         relatedTableName_ = other.relatedTableName_;
00199         relatedAttribute_ = other.relatedAttribute_;
00200         pImpl_ = other.pImpl_;
00201         pImpl_->refCount_++;
00202 }


Member Function Documentation

void TeTable::add ( const TeTableRow row  ) 

Examples:
createLayer.cpp, and createTable.cpp.

Definition at line 253 of file TeTable.cpp.

References TeComposite< T >::add(), and pImpl_.

Referenced by TeTin::createPointSet(), TeTin::createPolygon(), insertBoundaryCells(), TeDatabase::loadTable(), main(), populateTable(), TeDatabase::selectTable(), TeCopyDatabase(), TeCopyExternThemeToLayer(), TeCopyLayerToLayer(), TeCopyTable(), TeCopyThemeToLayer(), TeCreateCells(), TeGeoOpAssignByLocationCollect(), TeGeoOpAssignDataLocationDistribute(), TeImportDBFTable(), TeImportGeometriesToLayer(), TeImportShape(), TeReadBNAObjects(), TeReadCSVFile(), TeReadDBFAttributes(), TeReadMIFAttributes(), TeReadSHPAttributes(), and TeDatabase::updateVisual().

00254 {
00255         pImpl_->add ( row );
00256 }

string TeTable::attFinalTime (  )  [inline]

Definition at line 322 of file TeTable.h.

00323         {       return attFinalTime_; }

void TeTable::attFinalTime ( const string t  )  [inline]

Definition at line 318 of file TeTable.h.

Referenced by TeTemporalSeries::buildFrameIntervals(), TeDatabasePortal::getAttrTable(), TeQuerierDBStr1::initGeomPortal(), TeQuerierDBStr1::initPortal(), insertRow(), TeSQLite::insertTableInfo(), TePostgreSQL::insertTableInfo(), TeOCIOracle::insertTableInfo(), TeMySQL::insertTableInfo(), TeFirebird::insertTableInfo(), TeOracle::insertTableInfo(), TeAdo::insertTableInfo(), TeQtGridSource::isDateTimeRegistered(), TeQtGrid::isDateTimeRegistered(), TeCreateBasicDynamicCellTable(), updateRow(), and TeDatabase::updateTableInfo().

00319         {       attFinalTime_ = t; }

string TeTable::attInitialTime (  )  [inline]

Definition at line 314 of file TeTable.h.

00315         {       return attInitialTime_; }

void TeTable::attInitialTime ( const string t  )  [inline]

Definition at line 310 of file TeTable.h.

Referenced by TeTemporalSeries::buildFrameIntervals(), TeDatabasePortal::getAttrTable(), TeQuerierDBStr1::initGeomPortal(), TeQuerierDBStr3::initPortal(), TeQuerierDBStr2::initPortal(), TeQuerierDBStr1::initPortal(), insertRow(), TeSQLite::insertTableInfo(), TePostgreSQL::insertTableInfo(), TeOCIOracle::insertTableInfo(), TeMySQL::insertTableInfo(), TeFirebird::insertTableInfo(), TeOracle::insertTableInfo(), TeAdo::insertTableInfo(), TeQtGridSource::isDateTimeRegistered(), TeQtGrid::isDateTimeRegistered(), TeCreateBasicDynamicCellTable(), updateRow(), and TeDatabase::updateTableInfo().

00311         {       attInitialTime_ = t; }

const TeAttributeList& TeTable::attributeList (  )  const [inline]

Definition at line 203 of file TeTable.h.

00204         { return attList_; }

TeAttributeList& TeTable::attributeList (  )  [inline]

Definition at line 199 of file TeTable.h.

Referenced by TeQtGrid::arrangeColumns(), TeAppTheme::concatTableName(), TeOGRDriver::createAttributeTable(), TeLayer::createAttributeTable(), fillColumnCombo(), TePostgreSQL::insertTable(), TeOCIOracle::insertTable(), TeMySQL::insertTable(), TeFirebird::insertTable(), TeDatabase::insertTable(), TeSqlServer::insertTable(), TeAdo::insertTable(), TeTheme::loadAttrLists(), TeDatabase::loadTable(), TeLayer::saveAttributeTable(), TeCopyDatabase(), TeCopyExternThemeToLayer(), TeCopyLayerToLayer(), TeCopyThemeToLayer(), TeGeoOpBuffer(), TeImportCSVFile(), TeReadCSVFile(), TeUpdateDBFromSet(), updateDB301To302(), TePostgreSQL::updateTable(), TeOCIOracle::updateTable(), TeMySQL::updateTable(), TeFirebird::updateTable(), TeDatabase::updateTable(), TeDatabase::updateVisual(), and TeDatabase::validTable().

00200         { return attList_; }

bool TeTable::attributeNames ( vector< string > &  attrs  ) 

Definition at line 351 of file TeTable.cpp.

References attList_.

Referenced by insertRow(), TeDatabase::loadVersionStamp(), TeCopyExternThemeToLayer(), TeCopyLayerToLayer(), TeCopyThemeToLayer(), and updateRow().

00352 {
00353         attrs.clear();
00354         TeAttributeList::iterator it = attList_.begin();
00355         while(it!=attList_.end())
00356         {
00357                 attrs.push_back((*it).rep_.name_);
00358                 ++it;
00359         }
00360         return true;
00361 }

bool TeTable::attrLink ( TeAttribute att  ) 

Parameters:
att to return the attribute used as an index
Returns:
TRUE if there is an index, FALSE otherwise

Definition at line 289 of file TeTable.cpp.

References attLink_, attList_, and TeConvertToUpperCase().

00290 {       
00291         TeAttributeList::iterator it = attList_.begin();
00292         while (it != attList_.end())
00293         {
00294                 if (TeConvertToUpperCase((*it).rep_.name_) == TeConvertToUpperCase(attLink_))
00295                 {
00296                         att = (*it);
00297                         return true;
00298                 }
00299                 ++it;
00300         }
00301         return false;
00302 }

int TeTable::attrLinkPosition (  ) 

Definition at line 321 of file TeTable.cpp.

References attLink_, attList_, and TeConvertToUpperCase().

Referenced by TeReadCSVFile().

00322 {
00323         int i = 0;
00324         TeAttributeList::iterator it = attList_.begin();
00325         while (it != attList_.end())
00326         {
00327                 if (TeConvertToUpperCase((*it).rep_.name_) == TeConvertToUpperCase(attLink_))
00328                         return i;
00329                 ++it;
00330                 ++i;
00331         }
00332         return -1;
00333 }

bool TeTable::attrUnique ( TeAttribute attr  ) 

Parameters:
attr to return the attribute used as primary key
Returns:
TRUE if there is an index, FALSE otherwise

Definition at line 305 of file TeTable.cpp.

References attList_, attUnique_, and TeConvertToUpperCase().

Referenced by TeDatabase::insertTable(), and TeDatabase::updateTable().

00306 {
00307         TeAttributeList::iterator it = attList_.begin();
00308         while(it!=attList_.end())
00309         {
00310                 if(TeConvertToUpperCase((*it).rep_.name_) == TeConvertToUpperCase(attUnique_))
00311                 {
00312                         attr = (*it);
00313                         return true;
00314                 }
00315                 ++it;
00316         }
00317         return false;
00318 }

int TeTable::attrUniquePosition (  ) 

Definition at line 336 of file TeTable.cpp.

References attList_, attUnique_, and TeConvertToUpperCase().

Referenced by TeDatabase::insertTable(), and TeReadCSVFile().

00337 {
00338         int i = 0;
00339         TeAttributeList::iterator it = attList_.begin();
00340         while (it != attList_.end())
00341         {
00342                 if (TeConvertToUpperCase((*it).rep_.name_) == TeConvertToUpperCase(attUnique_))
00343                         return i;
00344                 ++it;
00345                 ++i;
00346         }
00347         return -1;
00348 }

TeChronon TeTable::attTimeUnit (  )  [inline]

Definition at line 330 of file TeTable.h.

00331         {       return attTimeUnit_; }

void TeTable::attTimeUnit ( TeChronon  t  )  [inline]

Definition at line 326 of file TeTable.h.

Referenced by TeDatabasePortal::getAttrTable(), TeSQLite::insertTableInfo(), TePostgreSQL::insertTableInfo(), TeOCIOracle::insertTableInfo(), TeMySQL::insertTableInfo(), TeFirebird::insertTableInfo(), TeOracle::insertTableInfo(), TeAdo::insertTableInfo(), TeCreateBasicDynamicCellTable(), and TeDatabase::updateTableInfo().

00327         {       attTimeUnit_ = t; }

void TeTable::clear ( void   ) 

Definition at line 270 of file TeTable.cpp.

References TeComposite< T >::clear(), and pImpl_.

Referenced by insertBoundaryCells(), main(), TeCopyDatabase(), TeCopyExternThemeToLayer(), TeCopyLayerToLayer(), TeCopyTable(), TeCopyThemeToLayer(), TeCreateCells(), TeGeoOpAssignByLocationCollect(), TeGeoOpAssignDataLocationDistribute(), TeImportBNA(), TeImportDBFTable(), TeImportGeometriesToLayer(), TeImportMIF(), TeImportShape(), and TeReadCSVFile().

00271 {
00272         pImpl_->clear();
00273 }

int TeTable::getOrder (  )  [inline]

Definition at line 192 of file TeTable.h.

00192 { return order_;}

int TeTable::id (  )  [inline]

Definition at line 183 of file TeTable.h.

Referenced by TeSQLite::insertTableInfo(), TePostgreSQL::insertTableInfo(), TeAdo::insertTableInfo(), TeDatabase::insertThemeTable(), TeDatabase::loadLayer(), TeDatabase::loadLayerSet(), TeLayer::saveAttributeTable(), TeCopyViewNode(), and TeDatabase::updateTableInfo().

00183 { return id_; }

string TeTable::linkName (  )  [inline]

Definition at line 239 of file TeTable.h.

Referenced by TeTemporalSeries::buildFrameIntervals(), TeAddressLocator::findByCentroid(), TeQuerierDBStr3::initPortal(), TeQuerierDBStr2::initPortal(), insertObjectIntoCollection(), insertRow(), TeSQLite::insertTableInfo(), TePostgreSQL::insertTableInfo(), TeOCIOracle::insertTableInfo(), TeMySQL::insertTableInfo(), TeFirebird::insertTableInfo(), TeOracle::insertTableInfo(), TeAdo::insertTableInfo(), TeDatabase::insertThemeTable(), TeTheme::loadTablesJoin(), TeTheme::loadThemeTablesJoin(), TeQuerierDB::sqlFrom(), TeCopyExternThemeToLayer(), TeCopyThemeToLayer(), updateDB301To302(), updateRow(), TeDatabase::updateTableInfo(), TeDatabase::validTable(), and TeQtGrid::writeCell().

00240         {       return attLink_; }

void TeTable::name ( const string n  )  [inline]

Definition at line 179 of file TeTable.h.

00180         { name_ = n; }

string TeTable::name (  )  [inline]

Definition at line 175 of file TeTable.h.

00176         { return name_; }

const string& TeTable::name (  )  const [inline]

Definition at line 171 of file TeTable.h.

Referenced by TeLayer::addAttributeTable(), TeTheme::addThemeTable(), TeTemporalSeries::buildFrameIntervals(), TeLayer::createAttributeTable(), TeTin::createAttrTable(), TeQtGrid::eventFilter(), TeQuerierDBStr1::fillSTONoGrouped(), fillTableCombo(), TeDatabasePortal::getAttrTable(), TeDatabase::getAttrTables(), TeQuerierDBStr1::initGeomPortal(), TeQuerierDBStr3::initPortal(), TeQuerierDBStr2::initPortal(), TeQuerierDBStr1::initPortal(), insertObjectIntoCollection(), insertRow(), TePostgreSQL::insertTable(), TeOCIOracle::insertTable(), TeMySQL::insertTable(), TeFirebird::insertTable(), TeDatabase::insertTable(), TeSqlServer::insertTable(), TeAdo::insertTable(), TeSQLite::insertTableInfo(), TePostgreSQL::insertTableInfo(), TeOCIOracle::insertTableInfo(), TeMySQL::insertTableInfo(), TeFirebird::insertTableInfo(), TeOracle::insertTableInfo(), TeAdo::insertTableInfo(), TeDatabase::insertThemeTable(), TeTheme::loadAliasVector(), TeTheme::loadAttrLists(), TeDatabase::loadLayer(), TeDatabase::loadLayerSet(), TeDatabase::loadLayerTable(), TeDatabase::loadTable(), TeDatabase::loadTableInfo(), TeTheme::loadTablesJoin(), TeTheme::loadThemeTablesJoin(), TeLayer::saveAttributeTable(), TeDatabase::selectTable(), TeQuerierDB::sqlFrom(), TeCopyDatabase(), TeCopyExternThemeToLayer(), TeCopyLayerToLayer(), TeCopyThemeToLayer(), TeImportCSVFile(), TeKeepStatistics(), TeUpdateDBFromSet(), TeLayer::updateAttributeTable(), updateDB301To302(), updateRow(), TePostgreSQL::updateTable(), TeOCIOracle::updateTable(), TeMySQL::updateTable(), TeFirebird::updateTable(), TeDatabase::updateTable(), TeDatabase::updateTableInfo(), and TeQtGrid::writeCell().

00172         { return name_; }

string TeTable::operator() ( int  row,
int  col 
)

Definition at line 282 of file TeTable.cpp.

References pImpl_.

00283 {
00284         return pImpl_->operator () (row, col );
00285 }

TeTable & TeTable::operator= ( const TeTable rhs  ) 

Copies the representation pointer Decrements the reference counter of the current object Increments the reference counter for the new object

Definition at line 209 of file TeTable.cpp.

References attFinalTime_, attInitialTime_, attLink_, attList_, attTimeUnit_, attUnique_, id_, name_, order_, pImpl_, TeTableImpl::refCount_, relatedAttribute_, relatedTableId_, relatedTableName_, separator_, and type_.

00210 {
00211         if ( this != &rhs )
00212         {
00213                 rhs.pImpl_->refCount_++;
00214         
00215                 if ( --(pImpl_->refCount_) <= 0 )
00216                         delete pImpl_;
00217                 pImpl_ = rhs.pImpl_;
00218 
00219                 separator_ = rhs.separator_;
00220                 attLink_ = rhs.attLink_;
00221                 attUnique_ = rhs.attUnique_;
00222                 order_ = rhs.order_;
00223                 attInitialTime_ = rhs.attInitialTime_;
00224                 attFinalTime_ = rhs.attFinalTime_;
00225                 attTimeUnit_ = rhs.attTimeUnit_;
00226                 type_ = rhs.type_;
00227                 name_ = rhs.name_;      
00228                 attList_.clear();
00229                 attList_ = rhs.attList_;
00230                 relatedTableId_ = rhs.relatedTableId_;
00231                 relatedTableName_ = rhs.relatedTableName_;
00232                 relatedAttribute_ = rhs.relatedAttribute_;
00233                 id_ = rhs.id_;
00234         }
00235         return *this;
00236 }

TeTableRow TeTable::operator[] ( int  row  )  const

Definition at line 276 of file TeTable.cpp.

References pImpl_.

00277 {
00278         return pImpl_->operator [] ( i );
00279 }

void TeTable::primaryKeys ( vector< string > &  keys  ) 

Definition at line 365 of file TeTable.cpp.

References attList_.

00366 {
00367         keys.empty();
00368         TeAttributeList::iterator it = attList_.begin();
00369         while(it!=attList_.end())
00370         {
00371                 if((*it).rep_.isPrimaryKey_)
00372                         keys.push_back((*it).rep_.name_);
00373                 ++it;
00374         }
00375         return;
00376 }

string TeTable::relatedAttribute (  )  [inline]

Definition at line 296 of file TeTable.h.

00297         { return relatedAttribute_; }

void TeTable::relatedAttribute ( const string columnName  )  [inline]

Definition at line 292 of file TeTable.h.

Referenced by TeDatabase::insertThemeTable(), and TeTheme::loadThemeTablesJoin().

int TeTable::relatedTableId (  )  [inline]

Definition at line 280 of file TeTable.h.

00281         {   return relatedTableId_; }

void TeTable::relatedTableId ( int  id  )  [inline]

Definition at line 276 of file TeTable.h.

Referenced by TeDatabase::insertThemeTable().

00277         {   relatedTableId_ = id; }

string TeTable::relatedTableName (  )  [inline]

Definition at line 288 of file TeTable.h.

00289         {   return relatedTableName_; }

void TeTable::relatedTableName ( string  tableName  )  [inline]

Definition at line 284 of file TeTable.h.

Referenced by TeDatabase::loadTableInfo(), TeDatabase::loadThemeTable(), TeTheme::loadThemeTablesJoin(), and TeCopyViewNode().

00285         {   relatedTableName_ = tableName; }

char TeTable::separator (  )  [inline]

Definition at line 218 of file TeTable.h.

Referenced by TeReadBNAObjects(), and TeReadMIFAttributes().

00219         { return separator_; }

void TeTable::setAttributeList ( const TeAttributeList attList  )  [inline]

Definition at line 195 of file TeTable.h.

Referenced by TeTin::createPointSet(), TeDatabase::getAttrTables(), TeDatabase::loadLayer(), TeDatabase::loadLayerSet(), TeDatabase::loadLayerTable(), TeDatabase::loadTable(), TeDatabase::loadTableInfo(), TeDatabase::loadThemeTable(), TeDatabase::selectTable(), TeCopyTable(), TeCreateBasicDynamicCellTable(), TeExportToOGR(), TeImportDBFTable(), TeReadSHPAttributes(), and TeUpdateDBFromSet().

00196         { attList_ = attList; }

void TeTable::setId ( int  n  )  [inline]

Definition at line 186 of file TeTable.h.

Referenced by TeDatabasePortal::getAttrTable(), TeSQLite::insertTableInfo(), TePostgreSQL::insertTableInfo(), TeOCIOracle::insertTableInfo(), TeMySQL::insertTableInfo(), TeFirebird::insertTableInfo(), TeOracle::insertTableInfo(), TeAdo::insertTableInfo(), TeDatabase::loadThemeTable(), TeCopyDatabase(), TeCopyExternThemeToLayer(), TeCopyLayerToLayer(), TeCopyThemeToLayer(), and TeCopyViewNode().

00186 { id_ = n; }

void TeTable::setLinkName ( const string linkName  )  [inline]

Index in this context, means an attribute that is a link between the attribute table and a spatial table (a table of geometrical representation of objects).

Definition at line 236 of file TeTable.h.

Referenced by TeAddressLocator::addressGeocode(), TeTin::createPointSet(), TeDatabasePortal::getAttrTable(), TeDatabase::loadTableInfo(), TeTheme::loadTablesJoin(), TeDatabase::loadThemeTable(), TeCopyViewNode(), TeCreateBasicDynamicCellTable(), and TeDatabase::validTable().

00236 { attLink_ = linkName;}

void TeTable::setOrder ( int  n  )  [inline]

Definition at line 189 of file TeTable.h.

Referenced by TeDatabase::insertThemeTable(), and TeDatabase::loadThemeTable().

00189 { order_ = n; }

void TeTable::setSeparator ( const char &  c  )  [inline]

Definition at line 214 of file TeTable.h.

Referenced by TeImportBNA(), and TeImportMIF().

00215         { separator_ = c ; }

bool TeTable::setTableType ( TeAttrTableType  attType,
int  relatedTableId = -1,
const string relatedAttribute = "" 
)

Parameters:
attType table type
Note:
In case of external tables
Parameters:
relatedTableId is the id of the related table
relatedAttribute is column name of the related table

Definition at line 239 of file TeTable.cpp.

References relatedAttribute_, relatedTableId_, TeAttrExternal, and type_.

Referenced by TeAddressLocator::addressGeocode(), TeDatabasePortal::getAttrTable(), TeDatabase::loadTableInfo(), TeTheme::loadTablesJoin(), TeDatabase::loadThemeTable(), TeCopyViewNode(), TeCreateBasicDynamicCellTable(), and TeImportDBFTable().

00240 { 
00241         type_ = attType; 
00242         if ( attType == TeAttrExternal && relatedTableId > 0 && !relatedAttribute.empty())
00243         {
00244                 relatedTableId_ = relatedTableId;
00245                 relatedAttribute_ = relatedAttribute;
00246 
00247                 return true;
00248         }
00249         return false;
00250 }

void TeTable::setUniqueName ( const string uniqueName  )  [inline]

Definition at line 243 of file TeTable.h.

Referenced by TeAddressLocator::addressGeocode(), TeTin::createPointSet(), TeDatabasePortal::getAttrTable(), TeTheme::loadTablesJoin(), TeCreateBasicDynamicCellTable(), TeImportDBFTable(), TePostgreSQL::updateTable(), TeMySQL::updateTable(), TeFirebird::updateTable(), TeDatabase::updateTable(), and TeDatabase::validTable().

00243 { attUnique_ = uniqueName; }    

void TeTable::setValue ( int  row,
int  col,
string val 
)

Definition at line 259 of file TeTable.cpp.

References pImpl_, and TeTableImpl::setValue().

00260 {
00261         pImpl_->setValue (row,col,val);
00262 }

unsigned int TeTable::size ( void   )  const

Definition at line 265 of file TeTable.cpp.

References pImpl_, and TeComposite< T >::size().

Referenced by insertBoundaryCells(), TePostgreSQL::insertTable(), TeOCIOracle::insertTable(), TeMySQL::insertTable(), TeFirebird::insertTable(), TeDatabase::insertTable(), TeSqlServer::insertTable(), TeAdo::insertTable(), TeDatabase::loadVersionStamp(), main(), TeCopyDatabase(), TeCopyExternThemeToLayer(), TeCopyLayerToLayer(), TeCopyTable(), TeCopyThemeToLayer(), TeCreateCells(), TeGeoOpAssignByLocationCollect(), TeGeoOpAssignDataLocationDistribute(), TeImportBNA(), TeImportDBFTable(), TeImportMIF(), TeImportShape(), TePostgreSQL::updateTable(), TeOCIOracle::updateTable(), TeMySQL::updateTable(), TeFirebird::updateTable(), TeDatabase::updateTable(), and TeDatabase::updateVersionStamp().

00266 {
00267         return pImpl_->size();
00268 }

TeAttrTableType TeTable::tableType (  )  [inline]

Definition at line 210 of file TeTable.h.

Referenced by TeTheme::addThemeTable(), TeTemporalSeries::buildFrameIntervals(), deletePointedObjects(), TeQtGrid::eventFilter(), TeQtGridSource::getPortalInfo(), TeQtGrid::init(), TeQuerierDBStr3::initPortal(), TeQuerierDBStr2::initPortal(), insertObjectIntoCollection(), TeSQLite::insertTableInfo(), TePostgreSQL::insertTableInfo(), TeOCIOracle::insertTableInfo(), TeMySQL::insertTableInfo(), TeFirebird::insertTableInfo(), TeOracle::insertTableInfo(), TeAdo::insertTableInfo(), TeDatabase::insertThemeTable(), TeQtGrid::isExternalTable(), TeTheme::loadAliasVector(), TeDatabase::loadTableInfo(), TeTheme::loadTablesJoin(), TeDatabase::loadThemeTable(), TeTheme::loadThemeTablesJoin(), TeQuerierDB::sqlFrom(), TeCopyExternThemeToLayer(), TeCopyThemeToLayer(), TeFillCellCategoryAreaPercentageOperation(), TeFillCellCategoryCountPercentageRasterOperation(), TeFillCellDistanceOperation(), TeFillCellNonSpatialOperation(), TeFillCellNonSpatialRasterOperation(), TeFillCellSpatialOperation(), TeUpdateDBFromSet(), updateDB301To302(), TeDatabase::updateTableInfo(), and TeQtGrid::writeCell().

00211         { return type_; }

string TeTable::uniqueName (  )  [inline]

Definition at line 246 of file TeTable.h.

Referenced by TeTemporalSeries::buildFrameIntervals(), TeQtGridSource::getPortalInfo(), TeQuerierDBStr1::initGeomPortal(), TeQuerierDBStr3::initPortal(), insertObjectIntoCollection(), insertRow(), TeSQLite::insertTableInfo(), TePostgreSQL::insertTableInfo(), TeOCIOracle::insertTableInfo(), TeMySQL::insertTableInfo(), TeFirebird::insertTableInfo(), TeOracle::insertTableInfo(), TeAdo::insertTableInfo(), TeTheme::isIndex(), TeTheme::loadTablesJoin(), TeQtGridSource::setCell(), TeQuerierDB::sqlFrom(), TeUpdateDBFromSet(), updateDB301To302(), updateRow(), TePostgreSQL::updateTable(), TeOCIOracle::updateTable(), TeMySQL::updateTable(), TeFirebird::updateTable(), TeDatabase::updateTable(), TeDatabase::updateTableInfo(), TeDatabase::validTable(), and TeQtGrid::writeCell().

00247         {       return attUnique_;      }


Field Documentation

string TeTable::attFinalTime_ [private]

Definition at line 376 of file TeTable.h.

Referenced by operator=(), and TeTable().

string TeTable::attInitialTime_ [private]

Definition at line 375 of file TeTable.h.

Referenced by operator=(), and TeTable().

string TeTable::attLink_ [private]

Definition at line 368 of file TeTable.h.

Referenced by attrLink(), attrLinkPosition(), operator=(), and TeTable().

TeAttributeList TeTable::attList_ [private]

Definition at line 367 of file TeTable.h.

Referenced by attributeNames(), attrLink(), attrLinkPosition(), attrUnique(), attrUniquePosition(), operator=(), primaryKeys(), TeTable(), and ~TeTable().

TeChronon TeTable::attTimeUnit_ [private]

Definition at line 377 of file TeTable.h.

Referenced by operator=(), and TeTable().

string TeTable::attUnique_ [private]

Definition at line 370 of file TeTable.h.

Referenced by attrUnique(), attrUniquePosition(), operator=(), and TeTable().

int TeTable::id_ [private]

Definition at line 362 of file TeTable.h.

Referenced by operator=(), and TeTable().

string TeTable::name_ [private]

Definition at line 363 of file TeTable.h.

Referenced by operator=(), and TeTable().

int TeTable::order_ [private]

Definition at line 365 of file TeTable.h.

Referenced by operator=(), and TeTable().

TeTableImpl* TeTable::pImpl_ [private]

Definition at line 385 of file TeTable.h.

Referenced by add(), clear(), operator()(), operator=(), operator[](), setValue(), size(), TeTable(), and ~TeTable().

string TeTable::relatedAttribute_ [private]

Definition at line 382 of file TeTable.h.

Referenced by operator=(), setTableType(), and TeTable().

int TeTable::relatedTableId_ [private]

Definition at line 380 of file TeTable.h.

Referenced by operator=(), setTableType(), and TeTable().

string TeTable::relatedTableName_ [private]

Definition at line 381 of file TeTable.h.

Referenced by operator=(), and TeTable().

char TeTable::separator_ [private]

Definition at line 371 of file TeTable.h.

Referenced by operator=(), and TeTable().

TeAttrTableType TeTable::type_ [private]

Definition at line 364 of file TeTable.h.

Referenced by operator=(), setTableType(), and TeTable().


The documentation for this class was generated from the following files:
Generated on Sun Jul 29 04:11:09 2012 for TerraLib - Development Source by  doxygen 1.5.3