terralib4::TableDataSet Class Reference

Implementation of a dataset for the TerraLib 4 driver. More...

#include <TableDataSet.h>

Inheritance diagram for terralib4::TableDataSet:
te::da::DataSet

Public Member Functions

te::common::AccessPolicy getAccessPolicy () const
 It returns the read and write permission associated to the dataset. More...
 
std::unique_ptr< te::dt::ArraygetArray (std::size_t i) const
 Method for retrieving an array. More...
 
bool getBool (std::size_t i) const
 Method for retrieving a boolean attribute value. More...
 
std::unique_ptr< te::dt::ByteArraygetByteArray (std::size_t i) const
 Method for retrieving a byte array. More...
 
char getChar (std::size_t i) const
 Method for retrieving a signed character attribute value (1 byte long). More...
 
std::string getDatasetNameOfProperty (std::size_t i) const
 It returns the underlying dataset name of the property at position pos. More...
 
std::unique_ptr< te::dt::DateTimegetDateTime (std::size_t i) const
 Method for retrieving a date and time attribute value. More...
 
double getDouble (std::size_t i) const
 Method for retrieving a double attribute value. More...
 
std::unique_ptr< te::gm::EnvelopegetExtent (std::size_t i)
 It computes the bounding rectangle for a spatial property of the dataset. More...
 
float getFloat (std::size_t i) const
 Method for retrieving a float attribute value. More...
 
std::unique_ptr< te::gm::GeometrygetGeometry (std::size_t i) const
 Method for retrieving a geometric attribute value. More...
 
boost::int16_t getInt16 (std::size_t i) const
 Method for retrieving a 16-bit integer attribute value (2 bytes long). More...
 
boost::int32_t getInt32 (std::size_t i) const
 Method for retrieving a 32-bit integer attribute value (4 bytes long). More...
 
boost::int64_t getInt64 (std::size_t i) const
 Method for retrieving a 64-bit integer attribute value (8 bytes long). More...
 
std::string getNumeric (std::size_t i) const
 Method for retrieving a numeric attribute value. More...
 
std::size_t getNumProperties () const
 It returns the number of properties that composes an item of the dataset. More...
 
int getPropertyDataType (std::size_t i) const
 It returns the underlying data type of the property at position pos. More...
 
std::string getPropertyName (std::size_t i) const
 It returns the property name at position pos. More...
 
std::unique_ptr< te::rst::RastergetRaster (std::size_t i) const
 Method for retrieving a raster attribute value. More...
 
std::string getString (std::size_t i) const
 Method for retrieving a string value attribute. More...
 
te::common::TraverseType getTraverseType () const
 It returns the traverse type associated to the dataset. More...
 
unsigned char getUChar (std::size_t i) const
 Method for retrieving an unsigned character attribute value (1 byte long). More...
 
bool isAfterEnd () const
 It tells if the dataset internal pointer is on the sentinel position after the last element of the collection or not. More...
 
bool isAtBegin () const
 It tells if the dataset internal pointer is on the first element of the collection or not. More...
 
bool isAtEnd () const
 It tells if the dataset internal pointer is on the last element of the collection. More...
 
bool isBeforeBegin () const
 It tells if the dataset internal pointer is in a position before the first element of the collection or not. More...
 
bool isConnected () const
 It returns true if the dataset is connected and false if it is disconnected. A dataset can be connected or disconnected. A connected dataset, after its creation through the data source transactor, continues to depend on the connection given by its associated data source. Differently, a disconnected dataset, after its creation, no more depends of the connection given by the data source, and it continues to live after the connection has been released to the data source. More...
 
bool isEmpty () const
 It returns true if the collection is empty. More...
 
bool isNull (std::size_t i) const
 It checks if the attribute value is NULL. More...
 
bool isPositionValid () const
 It tells if the dataset internal pointer is on a valid position. More...
 
bool move (std::size_t i)
 It moves the dataset internal pointer to a given position. More...
 
bool moveBeforeFirst ()
 It moves the internal pointer to a position before the first item in the collection. More...
 
bool moveFirst ()
 It moves the internal pointer to the first item in the collection. More...
 
bool moveLast ()
 It sets the dataset internal pointer to the last item in the collection. More...
 
bool moveNext ()
 It moves the internal pointer to the next item of the collection. More...
 
bool movePrevious ()
 It moves the internal pointer to the previous item of the collection. More...
 
std::size_t size () const
 It returns the collection size, if it is known. More...
 
 TableDataSet (TeDatabase *db, TeTable table)
 
 ~TableDataSet ()
 
DataSet Element Properties

Methods for retrieving/setting the dataset item component values without the need to explicitly instantiate an item via getItem method.

virtual char getChar (const std::string &name) const
 Method for retrieving a signed character attribute value (1 byte long). More...
 
virtual unsigned char getUChar (const std::string &name) const
 Method for retrieving an unsigned character attribute value (1 byte long). More...
 
virtual boost::int16_t getInt16 (const std::string &name) const
 Method for retrieving a 16-bit integer attribute value (2 bytes long). More...
 
virtual boost::int32_t getInt32 (const std::string &name) const
 Method for retrieving a 32-bit integer attribute value (4 bytes long). More...
 
virtual boost::int64_t getInt64 (const std::string &name) const
 Method for retrieving a 64-bit integer attribute value (8 bytes long). More...
 
virtual bool getBool (const std::string &name) const
 Method for retrieving a boolean attribute value. More...
 
virtual float getFloat (const std::string &name) const
 Method for retrieving a float attribute value. More...
 
virtual double getDouble (const std::string &name) const
 Method for retrieving a double attribute value. More...
 
virtual std::string getNumeric (const std::string &name) const
 Method for retrieving a numeric attribute value. More...
 
virtual std::string getString (const std::string &name) const
 Method for retrieving a string attribute value. More...
 
virtual std::unique_ptr< te::dt::ByteArraygetByteArray (const std::string &name) const
 Method for retrieving a byte array. More...
 
virtual std::unique_ptr< te::gm::GeometrygetGeometry (const std::string &name) const
 Method for retrieving a geometric attribute value. More...
 
virtual std::unique_ptr< te::rst::RastergetRaster (const std::string &name) const
 Method for retrieving a raster attribute value. More...
 
virtual std::unique_ptr< te::dt::DateTimegetDateTime (const std::string &name) const
 Method for retrieving a date and time attribute value. More...
 
virtual std::unique_ptr< te::dt::ArraygetArray (const std::string &name) const
 Method for retrieving an array. More...
 
virtual std::unique_ptr< te::dt::AbstractDatagetValue (std::size_t i) const
 Method for retrieving any other type of data value stored in the data source. More...
 
virtual std::unique_ptr< te::dt::AbstractDatagetValue (const std::string &name) const
 Method for retrieving any other type of data value stored in the data source. More...
 
virtual std::string getAsString (std::size_t i, int precision=0) const
 Method for retrieving a data value as a string plain representation. More...
 
virtual std::string getAsString (const std::string &name, int precision=0) const
 Method for retrieving a data value as a string plain representation. More...
 
virtual bool isNull (const std::string &name) const
 It checks if the attribute value is NULL. More...
 

Protected Attributes

te::da::DataSetm_data
 
TeDatabase * m_db
 
te::da::DataSetTypem_dt
 
int m_i
 
int m_nCols
 
TeDatabasePortal * m_portal
 
int m_size
 
TeTable m_table
 

Detailed Description

Implementation of a dataset for the TerraLib 4 driver.

See also
te::da::DataSet

Definition at line 61 of file TableDataSet.h.

Constructor & Destructor Documentation

terralib4::TableDataSet::~TableDataSet ( )

Definition at line 187 of file TableDataSet.cpp.

References m_dt.

Member Function Documentation

te::common::AccessPolicy terralib4::TableDataSet::getAccessPolicy ( ) const
virtual

It returns the read and write permission associated to the dataset.

Returns
The read and write permission associated to the dataset.

Implements te::da::DataSet.

Definition at line 197 of file TableDataSet.cpp.

std::unique_ptr< te::dt::Array > terralib4::TableDataSet::getArray ( std::size_t  i) const
virtual

Method for retrieving an array.

Parameters
iThe attribute index.

Implements te::da::DataSet.

Definition at line 375 of file TableDataSet.cpp.

std::unique_ptr< te::dt::Array > te::da::DataSet::getArray ( const std::string &  name) const
virtualinherited

Method for retrieving an array.

Parameters
nameThe attribute name.
Returns
An array. The caller will take its ownership.

Reimplemented in te::gdal::DataSet.

Definition at line 145 of file dataaccess/dataset/DataSet.cpp.

References te::da::DataSet::getArray(), and te::da::GetPropertyPos().

std::string te::da::DataSet::getAsString ( std::size_t  i,
int  precision = 0 
) const
virtualinherited

Method for retrieving a data value as a string plain representation.

Parameters
iThe attribute index.
precisionThe precision in the conversion.
Returns
The attribute value in a string format.
Note
It is safe to call this method for any data type, the data source implementation will take care of how to convert the internal representation to a string.

Definition at line 219 of file dataaccess/dataset/DataSet.cpp.

References te::dt::ARRAY_TYPE, b, te::dt::BOOLEAN_TYPE, te::dt::BYTE_ARRAY_TYPE, te::dt::CHAR_TYPE, te::common::Convert2String(), te::dt::DATETIME_TYPE, te::dt::DOUBLE_TYPE, te::dt::FLOAT_TYPE, te::dt::GEOMETRY_TYPE, te::da::DataSet::getArray(), te::da::DataSet::getBool(), te::da::DataSet::getByteArray(), te::da::DataSet::getChar(), te::da::DataSet::getDateTime(), te::da::DataSet::getDouble(), te::da::DataSet::getFloat(), te::da::DataSet::getGeometry(), te::da::DataSet::getInt16(), te::da::DataSet::getInt32(), te::da::DataSet::getInt64(), te::da::DataSet::getNumeric(), te::da::DataSet::getPropertyDataType(), te::da::DataSet::getRaster(), te::da::DataSet::getString(), te::da::DataSet::getUChar(), te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::dt::NUMERIC_TYPE, te::dt::RASTER_TYPE, te::dt::STRING_TYPE, and te::dt::UCHAR_TYPE.

Referenced by te::ogr::Transactor::add(), te::gpkg::Transactor::add(), te::sa::AssociateGPMVertexAttribute(), te::sa::KernelMapOperation::buildTree(), te::sa::KernelRatioOperation::buildTree(), te::sa::SkaterOperation::createDataSet(), te::qt::widgets::DataSetTableModel::data(), te::map::QueryLayerRenderer::drawDatSetGeometries(), te::da::DataSet::getAsString(), te::attributefill::VectorToVectorMemory::getDistinctClasses(), te::qt::widgets::DefaultFeatureInfoMaker::getGeometryInfo(), te::edit::EditInfoTool::getInfo(), te::qt::widgets::Promoter::preProcessKeys(), PrintDataSet(), PrintDataSetValues(), te::sa::BayesLocalOperation::runBayesLocal(), ToHighlight(), te::da::TupleToStringConverter(), TupleToStringUpperCaseConverter(), te::ado::Transactor::update(), and te::pgis::Transactor::update().

std::string te::da::DataSet::getAsString ( const std::string &  name,
int  precision = 0 
) const
virtualinherited

Method for retrieving a data value as a string plain representation.

Parameters
nameThe attribute name.
precisionThe precision in the conversion.
Returns
The attribute value in a string format.
Exceptions
Exceptionif property not found.
Note
It is safe to call this method for any data type, the data source implementation will take care of how to convert the internal representation to a string.

Definition at line 307 of file dataaccess/dataset/DataSet.cpp.

References te::da::DataSet::getAsString(), te::da::DataSet::getNumProperties(), te::da::GetPropertyPos(), and TE_TR.

bool terralib4::TableDataSet::getBool ( std::size_t  i) const
virtual

Method for retrieving a boolean attribute value.

Parameters
iThe attribute index.
Returns
The boolean attribute value in the given position.

Implements te::da::DataSet.

Definition at line 323 of file TableDataSet.cpp.

References m_portal.

bool te::da::DataSet::getBool ( const std::string &  name) const
virtualinherited

Method for retrieving a boolean attribute value.

Parameters
nameThe attribute name.
Returns
The boolean attribute value with the given name.

Reimplemented in te::gdal::DataSet.

Definition at line 82 of file dataaccess/dataset/DataSet.cpp.

References te::da::DataSet::getBool(), and te::da::GetPropertyPos().

std::unique_ptr< te::dt::ByteArray > terralib4::TableDataSet::getByteArray ( std::size_t  i) const
virtual

Method for retrieving a byte array.

You can use this method in order to retrieve a BLOB data.

Parameters
iThe attribute index.
Returns
The byte array attribute.

Implements te::da::DataSet.

Definition at line 348 of file TableDataSet.cpp.

std::unique_ptr< te::dt::ByteArray > te::da::DataSet::getByteArray ( const std::string &  name) const
virtualinherited

Method for retrieving a byte array.

You can use this method in order to retrieve a BLOB data.

Parameters
nameThe attribute name.
Returns
The byte array attribute.

Reimplemented in te::gdal::DataSet.

Definition at line 117 of file dataaccess/dataset/DataSet.cpp.

References te::da::DataSet::getByteArray(), and te::da::GetPropertyPos().

char terralib4::TableDataSet::getChar ( std::size_t  i) const
virtual

Method for retrieving a signed character attribute value (1 byte long).

Parameters
iThe attribute index.
Returns
The signed character attribute value (1 byte long) in the given position.

Implements te::da::DataSet.

Definition at line 298 of file TableDataSet.cpp.

char te::da::DataSet::getChar ( const std::string &  name) const
virtualinherited

Method for retrieving a signed character attribute value (1 byte long).

Parameters
nameThe attribute name.
Returns
The signed character attribute value (1 byte long) with the given name.

Reimplemented in te::gdal::DataSet.

Definition at line 47 of file dataaccess/dataset/DataSet.cpp.

References te::da::DataSet::getChar(), and te::da::GetPropertyPos().

std::string terralib4::TableDataSet::getDatasetNameOfProperty ( std::size_t  i) const
virtual

It returns the underlying dataset name of the property at position pos.

Parameters
iThe property position of interest.
Returns
The underlying dataset name of the property at position pos.

Implements te::da::DataSet.

Definition at line 223 of file TableDataSet.cpp.

std::unique_ptr< te::dt::DateTime > terralib4::TableDataSet::getDateTime ( std::size_t  i) const
virtual

Method for retrieving a date and time attribute value.

Parameters
iThe attribute index.
Returns
The date and time attribute value in the given position.

Implements te::da::DataSet.

Definition at line 368 of file TableDataSet.cpp.

std::unique_ptr< te::dt::DateTime > te::da::DataSet::getDateTime ( const std::string &  name) const
virtualinherited

Method for retrieving a date and time attribute value.

Parameters
nameThe attribute name.
Returns
The date and time attribute value with the given name.

Reimplemented in te::gdal::DataSet.

Definition at line 138 of file dataaccess/dataset/DataSet.cpp.

References te::da::DataSet::getDateTime(), and te::da::GetPropertyPos().

double terralib4::TableDataSet::getDouble ( std::size_t  i) const
virtual

Method for retrieving a double attribute value.

Parameters
iThe attribute index.
Returns
The double attribute value in the given position.

Implements te::da::DataSet.

Definition at line 333 of file TableDataSet.cpp.

References te::da::DataSet::getDouble(), and m_data.

double te::da::DataSet::getDouble ( const std::string &  name) const
virtualinherited

Method for retrieving a double attribute value.

Parameters
nameThe attribute name.
Returns
The double attribute value with the given name.

Reimplemented in te::gdal::DataSet.

Definition at line 96 of file dataaccess/dataset/DataSet.cpp.

References te::da::DataSet::getDouble(), and te::da::GetPropertyPos().

std::unique_ptr< te::gm::Envelope > terralib4::TableDataSet::getExtent ( std::size_t  i)
virtual

It computes the bounding rectangle for a spatial property of the dataset.

Parameters
iThe position of a spatial property to get its bounding box.
Precondition
The position i must be associated to a spatial property of the dataset.
Exceptions
ExceptionIt throws an exception if something goes wrong during MBR search.
Returns
The spatial property bounding rectangle, or an invalid box, if none is found.

Implements te::da::DataSet.

Definition at line 202 of file TableDataSet.cpp.

float terralib4::TableDataSet::getFloat ( std::size_t  i) const
virtual

Method for retrieving a float attribute value.

Parameters
iThe attribute index.
Returns
The float attribute value in the given position.

Implements te::da::DataSet.

Definition at line 328 of file TableDataSet.cpp.

References te::da::DataSet::getFloat(), and m_data.

float te::da::DataSet::getFloat ( const std::string &  name) const
virtualinherited

Method for retrieving a float attribute value.

Parameters
nameThe attribute name.
Returns
The float attribute value with the given name.

Reimplemented in te::gdal::DataSet.

Definition at line 89 of file dataaccess/dataset/DataSet.cpp.

References te::da::DataSet::getFloat(), and te::da::GetPropertyPos().

std::unique_ptr< te::gm::Geometry > terralib4::TableDataSet::getGeometry ( std::size_t  i) const
virtual

Method for retrieving a geometric attribute value.

Parameters
iThe attribute index.
Returns
The geometric attribute value in the given position.

Implements te::da::DataSet.

Definition at line 358 of file TableDataSet.cpp.

std::unique_ptr< te::gm::Geometry > te::da::DataSet::getGeometry ( const std::string &  name) const
virtualinherited

Method for retrieving a geometric attribute value.

Parameters
nameThe attribute name.
Returns
The geometric attribute value with the given name.

Reimplemented in te::gdal::DataSet.

Definition at line 124 of file dataaccess/dataset/DataSet.cpp.

References te::da::DataSet::getGeometry(), and te::da::GetPropertyPos().

boost::int16_t terralib4::TableDataSet::getInt16 ( std::size_t  i) const
virtual

Method for retrieving a 16-bit integer attribute value (2 bytes long).

Parameters
iThe attribute index.
Returns
The 16-bit integer attribute value (2 bytes long) in the given position.

Implements te::da::DataSet.

Definition at line 308 of file TableDataSet.cpp.

References te::da::DataSet::getInt16(), and m_data.

boost::int16_t te::da::DataSet::getInt16 ( const std::string &  name) const
virtualinherited

Method for retrieving a 16-bit integer attribute value (2 bytes long).

Parameters
nameThe attribute name.
Returns
The 16-bit integer attribute value (2 bytes long) with the given name.

Reimplemented in te::gdal::DataSet.

Definition at line 61 of file dataaccess/dataset/DataSet.cpp.

References te::da::DataSet::getInt16(), and te::da::GetPropertyPos().

boost::int32_t terralib4::TableDataSet::getInt32 ( std::size_t  i) const
virtual

Method for retrieving a 32-bit integer attribute value (4 bytes long).

Parameters
iThe attribute index.
Returns
The 32-bit integer attribute value in the given position.

Implements te::da::DataSet.

Definition at line 313 of file TableDataSet.cpp.

References te::da::DataSet::getInt32(), and m_data.

boost::int32_t te::da::DataSet::getInt32 ( const std::string &  name) const
virtualinherited

Method for retrieving a 32-bit integer attribute value (4 bytes long).

Parameters
nameThe attribute name.
Returns
The 32-bit integer attribute value with the given name.

Reimplemented in te::gdal::DataSet.

Definition at line 68 of file dataaccess/dataset/DataSet.cpp.

References te::da::DataSet::getInt32(), and te::da::GetPropertyPos().

boost::int64_t terralib4::TableDataSet::getInt64 ( std::size_t  i) const
virtual

Method for retrieving a 64-bit integer attribute value (8 bytes long).

Parameters
iThe attribute index.
Returns
The 64-bit integer attribute value in the given position.

Implements te::da::DataSet.

Definition at line 318 of file TableDataSet.cpp.

References te::da::DataSet::getInt64(), and m_data.

boost::int64_t te::da::DataSet::getInt64 ( const std::string &  name) const
virtualinherited

Method for retrieving a 64-bit integer attribute value (8 bytes long).

Parameters
nameThe attribute name.
Returns
The 64-bit integer attribute value with the given name.

Reimplemented in te::gdal::DataSet.

Definition at line 75 of file dataaccess/dataset/DataSet.cpp.

References te::da::DataSet::getInt64(), and te::da::GetPropertyPos().

std::string terralib4::TableDataSet::getNumeric ( std::size_t  i) const
virtual

Method for retrieving a numeric attribute value.

Parameters
iThe attribute index.
Returns
The numeric attribute value in the given position.

Implements te::da::DataSet.

Definition at line 338 of file TableDataSet.cpp.

References te::da::DataSet::getNumeric(), and m_data.

std::string te::da::DataSet::getNumeric ( const std::string &  name) const
virtualinherited

Method for retrieving a numeric attribute value.

Parameters
nameThe attribute name.
Returns
The numeric attribute value with the given name.

Reimplemented in te::gdal::DataSet.

Definition at line 103 of file dataaccess/dataset/DataSet.cpp.

References te::da::DataSet::getNumeric(), and te::da::GetPropertyPos().

std::size_t terralib4::TableDataSet::getNumProperties ( ) const
virtual

It returns the number of properties that composes an item of the dataset.

Returns
The number of properties that composes an item of the dataset.

Implements te::da::DataSet.

Definition at line 207 of file TableDataSet.cpp.

References m_nCols.

int terralib4::TableDataSet::getPropertyDataType ( std::size_t  i) const
virtual

It returns the underlying data type of the property at position pos.

Parameters
iThe property position of interest.
Returns
The underlying data type of the property at position pos.

Implements te::da::DataSet.

Definition at line 212 of file TableDataSet.cpp.

References te::dt::CompositeProperty::getProperty(), te::dt::Property::getType(), and m_dt.

std::string terralib4::TableDataSet::getPropertyName ( std::size_t  i) const
virtual

It returns the property name at position pos.

Parameters
iThe property name at the position of interest.
Returns
The property name at position pos.

Implements te::da::DataSet.

Definition at line 217 of file TableDataSet.cpp.

std::unique_ptr< te::rst::Raster > terralib4::TableDataSet::getRaster ( std::size_t  i) const
virtual

Method for retrieving a raster attribute value.

Parameters
iThe attribute index.
Returns
The raster attribute value in the given position.
Exceptions
ExceptionIt can throw an exception if:
  • something goes wrong during the data retrieval
  • the maximum number of simultaneous accesses has been reached

Implements te::da::DataSet.

Definition at line 363 of file TableDataSet.cpp.

std::unique_ptr< te::rst::Raster > te::da::DataSet::getRaster ( const std::string &  name) const
virtualinherited

Method for retrieving a raster attribute value.

Parameters
nameThe attribute name.
Returns
The raster attribute value with the given name.
Exceptions
ExceptionIt can throw an exception if:
  • something goes wrong during the data retrieval
  • the maximum number of simultaneous accesses has been reached

Reimplemented in te::gdal::DataSet.

Definition at line 131 of file dataaccess/dataset/DataSet.cpp.

References te::da::GetPropertyPos(), and te::da::DataSet::getRaster().

std::string terralib4::TableDataSet::getString ( std::size_t  i) const
virtual

Method for retrieving a string value attribute.

Parameters
iThe attribute index.
Returns
The string attribute value in the given position.

Implements te::da::DataSet.

Definition at line 343 of file TableDataSet.cpp.

References te::da::DataSet::getString(), and m_data.

std::string te::da::DataSet::getString ( const std::string &  name) const
virtualinherited

Method for retrieving a string attribute value.

Parameters
nameThe attribute name.
Returns
The string attribute value with the given name.

Reimplemented in te::gdal::DataSet.

Definition at line 110 of file dataaccess/dataset/DataSet.cpp.

References te::da::GetPropertyPos(), and te::da::DataSet::getString().

te::common::TraverseType terralib4::TableDataSet::getTraverseType ( ) const
virtual

It returns the traverse type associated to the dataset.

Returns
The traverse type associated to the dataset.

Implements te::da::DataSet.

Definition at line 192 of file TableDataSet.cpp.

unsigned char terralib4::TableDataSet::getUChar ( std::size_t  i) const
virtual

Method for retrieving an unsigned character attribute value (1 byte long).

Parameters
iThe attribute index.
Returns
The unsigned character attribute value (1 byte long) in the given position.

Implements te::da::DataSet.

Definition at line 303 of file TableDataSet.cpp.

unsigned char te::da::DataSet::getUChar ( const std::string &  name) const
virtualinherited

Method for retrieving an unsigned character attribute value (1 byte long).

Parameters
nameThe attribute name.
Returns
The unsigned character attribute value (1 byte long) with the given name.

Reimplemented in te::gdal::DataSet.

Definition at line 54 of file dataaccess/dataset/DataSet.cpp.

References te::da::GetPropertyPos(), and te::da::DataSet::getUChar().

std::unique_ptr< te::dt::AbstractData > te::da::DataSet::getValue ( std::size_t  i) const
virtualinherited

Method for retrieving any other type of data value stored in the data source.

This method can be use for extensible datatypes.

Parameters
iThe attribute index.
Returns
A pointer to the data value.

Reimplemented in te::stmem::DataSet, and te::mem::DataSet.

Definition at line 152 of file dataaccess/dataset/DataSet.cpp.

References te::dt::BOOLEAN_TYPE, te::dt::BYTE_ARRAY_TYPE, te::dt::CHAR_TYPE, te::dt::DATETIME_TYPE, te::dt::DOUBLE_TYPE, te::dt::FLOAT_TYPE, te::dt::GEOMETRY_TYPE, te::da::DataSet::getBool(), te::da::DataSet::getByteArray(), te::da::DataSet::getChar(), te::da::DataSet::getDateTime(), te::da::DataSet::getDouble(), te::da::DataSet::getFloat(), te::da::DataSet::getGeometry(), te::da::DataSet::getInt16(), te::da::DataSet::getInt32(), te::da::DataSet::getInt64(), te::da::DataSet::getNumeric(), te::da::DataSet::getPropertyDataType(), te::da::DataSet::getRaster(), te::da::DataSet::getString(), te::da::DataSet::getUChar(), te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::dt::NUMERIC_TYPE, te::dt::RASTER_TYPE, te::dt::STRING_TYPE, te::dt::UCHAR_TYPE, te::dt::UINT16_TYPE, te::dt::UINT32_TYPE, and te::dt::UINT64_TYPE.

Referenced by te::sa::AssociateGPMVertexAttribute(), te::sa::KernelRatioOperation::buildTree(), te::sa::KernelMapOperation::buildTree(), te::mem::DataSet::copy(), te::stmem::DataSet::copy(), te::sa::SkaterOperation::createDataSet(), te::sa::BayesLocalOperation::createDataSet(), te::sa::BayesGlobalOperation::createDataSet(), te::sa::KernelOperation::createDataSet(), te::sa::CreateGeostatisticalData(), te::vp::Union::executeMemory(), te::vp::Difference::executeMemory(), te::vp::Intersection::executeMemory(), te::vp::Merge::executeMemory(), te::da::GenerateOID(), te::da::GenericAttributeConverter(), te::attributefill::VectorToVectorMemory::getDataValues(), Editor::getEditedDataSet(), te::vp::GetFilledItemMemory(), te::edit::EditInfoTool::getInfo(), te::vp::GroupThreadManager::getNextGroup(), te::st::TimeSeriesDataSet::getTimeSeries(), te::st::TimeSeriesDataSet::getTimeSeriesSet(), te::da::DataSet::getValue(), te::edit::EditInfoTool::onOkPushButtonPressed(), te::vp::IntersectionMemory::pairwiseIntersection(), te::sa::SetMainDiagonal(), te::vp::IntersectionQuery::updateGeomType(), and te::vp::Intersection::updateGeomType().

std::unique_ptr< te::dt::AbstractData > te::da::DataSet::getValue ( const std::string &  name) const
virtualinherited

Method for retrieving any other type of data value stored in the data source.

This method can be use for extensible datatypes.

Parameters
nameThe attribute name.
Returns
A pointer to the data value.

Definition at line 212 of file dataaccess/dataset/DataSet.cpp.

References te::da::GetPropertyPos(), and te::da::DataSet::getValue().

bool terralib4::TableDataSet::isAfterEnd ( ) const
virtual

It tells if the dataset internal pointer is on the sentinel position after the last element of the collection or not.

Returns
True, if the dataset internal pointer is on the sentinel position after the last element otherwise it returns false.

Implements te::da::DataSet.

Definition at line 288 of file TableDataSet.cpp.

bool terralib4::TableDataSet::isAtBegin ( ) const
virtual

It tells if the dataset internal pointer is on the first element of the collection or not.

Returns
True if the dataset internal pointer is on the first element otherwise it returns false.

Implements te::da::DataSet.

Definition at line 273 of file TableDataSet.cpp.

bool terralib4::TableDataSet::isAtEnd ( ) const
virtual

It tells if the dataset internal pointer is on the last element of the collection.

Returns
True, if the dataset internal pointer is on the last element otherwise it returns false.

Implements te::da::DataSet.

Definition at line 283 of file TableDataSet.cpp.

bool terralib4::TableDataSet::isBeforeBegin ( ) const
virtual

It tells if the dataset internal pointer is in a position before the first element of the collection or not.

Returns
True, if the dataset internal pointer is in a position before the first element otherwise it returns false.

Implements te::da::DataSet.

Definition at line 278 of file TableDataSet.cpp.

bool terralib4::TableDataSet::isConnected ( ) const
virtual

It returns true if the dataset is connected and false if it is disconnected. A dataset can be connected or disconnected. A connected dataset, after its creation through the data source transactor, continues to depend on the connection given by its associated data source. Differently, a disconnected dataset, after its creation, no more depends of the connection given by the data source, and it continues to live after the connection has been released to the data source.

Returns
True, if the dataset is connected, or false if it is disconnected.

Implements te::da::DataSet.

Definition at line 233 of file TableDataSet.cpp.

bool terralib4::TableDataSet::isEmpty ( ) const
virtual

It returns true if the collection is empty.

Returns
True, if the collection is empty.

Implements te::da::DataSet.

Definition at line 228 of file TableDataSet.cpp.

References size().

bool terralib4::TableDataSet::isNull ( std::size_t  i) const
virtual

It checks if the attribute value is NULL.

Parameters
iThe attribute index.
Returns
True if the attribute value is NULL.

Implements te::da::DataSet.

Definition at line 380 of file TableDataSet.cpp.

bool te::da::DataSet::isNull ( const std::string &  name) const
virtualinherited

It checks if the attribute value is NULL.

Parameters
nameThe attribute name.
Returns
True if the attribute value is NULL.

Reimplemented in te::gdal::DataSet.

Definition at line 319 of file dataaccess/dataset/DataSet.cpp.

References te::da::GetPropertyPos(), and te::da::DataSet::isNull().

bool terralib4::TableDataSet::isPositionValid ( ) const
virtual

It tells if the dataset internal pointer is on a valid position.

Returns
True, if the dataset internal pointer is on a valid position.

Implements te::da::DataSet.

Definition at line 293 of file TableDataSet.cpp.

bool terralib4::TableDataSet::move ( std::size_t  i)
virtual

It moves the dataset internal pointer to a given position.

Parameters
iThe position the dataset internal pointer must be set up.
Returns
True, if it was possible to move the dataset reading to the given position.
Note
The first item in the collection starts at address 0.

Implements te::da::DataSet.

Definition at line 268 of file TableDataSet.cpp.

bool terralib4::TableDataSet::moveBeforeFirst ( )
virtual

It moves the internal pointer to a position before the first item in the collection.

Returns
True, if it was possible to move to a sentinel position before the first item in the collection.
Note
This method is not supported by FORWARDONLY datasets.

Implements te::da::DataSet.

Definition at line 253 of file TableDataSet.cpp.

bool terralib4::TableDataSet::moveFirst ( )
virtual

It moves the internal pointer to the first item in the collection.

Returns
True, if it was possible to move to the first item in the collection.
Note
This method is not supported by FORWARDONLY datasets.

Implements te::da::DataSet.

Definition at line 258 of file TableDataSet.cpp.

bool terralib4::TableDataSet::moveLast ( )
virtual

It sets the dataset internal pointer to the last item in the collection.

Returns
True, if it was possible to move to the last item in the collection.

Implements te::da::DataSet.

Definition at line 263 of file TableDataSet.cpp.

bool terralib4::TableDataSet::moveNext ( )
virtual

It moves the internal pointer to the next item of the collection.

You always has to call this method in order to move the internal pointer to the first item in the collection. This method can be used to traverse a dataset.

Returns
True if the internal pointer is on a valid item, or false otherwise.
Note
All dataset types support this method: FORWARDONLY, BIDIRECTIONAL and RANDOM.

Implements te::da::DataSet.

Definition at line 243 of file TableDataSet.cpp.

References m_data, and te::da::DataSet::moveNext().

bool terralib4::TableDataSet::movePrevious ( )
virtual

It moves the internal pointer to the previous item of the collection.

Returns
True, if the internal pointer (cursor position) is on a valid item, or false otherwise.
Note
This method is not supported by FORWARDONLY datasets.

Implements te::da::DataSet.

Definition at line 248 of file TableDataSet.cpp.

std::size_t terralib4::TableDataSet::size ( ) const
virtual

It returns the collection size, if it is known.

It may return std::string::npos if the size is not known, or it would be too costly to compute it.

Returns
The size of the collection, if it is known.

Implements te::da::DataSet.

Definition at line 238 of file TableDataSet.cpp.

References m_size.

Referenced by isEmpty(), and TableDataSet().

Member Data Documentation

te::da::DataSet* terralib4::TableDataSet::m_data
protected
TeDatabase* terralib4::TableDataSet::m_db
protected

Definition at line 151 of file TableDataSet.h.

Referenced by TableDataSet().

te::da::DataSetType* terralib4::TableDataSet::m_dt
protected

Definition at line 145 of file TableDataSet.h.

Referenced by getPropertyDataType(), TableDataSet(), and ~TableDataSet().

int terralib4::TableDataSet::m_i
protected

Definition at line 147 of file TableDataSet.h.

int terralib4::TableDataSet::m_nCols
protected

Definition at line 149 of file TableDataSet.h.

Referenced by getNumProperties(), and TableDataSet().

TeDatabasePortal* terralib4::TableDataSet::m_portal
protected

Definition at line 152 of file TableDataSet.h.

Referenced by getBool().

int terralib4::TableDataSet::m_size
protected

Definition at line 148 of file TableDataSet.h.

Referenced by size(), and TableDataSet().

TeTable terralib4::TableDataSet::m_table
protected

Definition at line 146 of file TableDataSet.h.

Referenced by TableDataSet().


The documentation for this class was generated from the following files: