Go to the documentation of this file.
   26 #ifndef __TERRALIB_DATAACCESS_INTERNAL_DATASET_H 
   27 #define __TERRALIB_DATAACCESS_INTERNAL_DATASET_H 
   30 #include "../../common/Enums.h" 
   31 #include "../../core/encoding/CharEncoding.h" 
   32 #include "../../datatype/Array.h" 
   33 #include "../../datatype/ByteArray.h" 
   34 #include "../../datatype/DateTime.h" 
   35 #include "../../datatype/Enums.h" 
   36 #include "../../geometry/Enums.h" 
   37 #include "../../raster/Raster.h" 
   38 #include "../Config.h" 
   44 #include <boost/cstdint.hpp> 
   45 #include <boost/noncopyable.hpp> 
   46 #include <boost/shared_ptr.hpp> 
   67     class DataSourceTransactor;
 
  209         virtual std::size_t 
size() 
const = 0;
 
  222         virtual std::unique_ptr<te::gm::Envelope> 
getExtent(std::size_t i) = 0;
 
  279         virtual bool move(std::size_t i) = 0;
 
  330         virtual char getChar(std::size_t i) 
const = 0;
 
  339         virtual char getChar(
const std::string& name) 
const;
 
  348         virtual unsigned char getUChar(std::size_t i) 
const = 0;
 
  357         virtual unsigned char getUChar(
const std::string& name) 
const;
 
  366         virtual boost::int16_t 
getInt16(std::size_t i) 
const = 0;
 
  375         virtual boost::int16_t 
getInt16(
const std::string& name) 
const;
 
  384         virtual boost::int32_t 
getInt32(std::size_t i) 
const = 0;
 
  393         virtual boost::int32_t 
getInt32(
const std::string& name) 
const;
 
  402         virtual boost::int64_t 
getInt64(std::size_t i) 
const = 0;
 
  411         virtual boost::int64_t 
getInt64(
const std::string& name) 
const;
 
  420         virtual bool getBool(std::size_t i) 
const = 0;
 
  429         virtual bool getBool(
const std::string& name) 
const;
 
  447         virtual float getFloat(
const std::string& name) 
const;
 
  465         virtual double getDouble(
const std::string& name) 
const;
 
  483         virtual std::string 
getNumeric(
const std::string& name) 
const;
 
  501         virtual std::string 
getString(
const std::string& name) 
const;
 
  512         virtual std::unique_ptr<te::dt::ByteArray> 
getByteArray(std::size_t i) 
const = 0;
 
  523         virtual std::unique_ptr<te::dt::ByteArray> 
getByteArray(
const std::string& name) 
const;
 
  532         virtual std::unique_ptr<te::gm::Geometry> 
getGeometry(std::size_t i) 
const = 0;
 
  541         virtual std::unique_ptr<te::gm::Geometry> 
getGeometry(
const std::string& name) 
const;
 
  548         virtual std::unique_ptr<te::da::DataSetItem> 
getItem() 
const;
 
  564         virtual std::unique_ptr<te::rst::Raster> 
getRaster(std::size_t i) 
const = 0;
 
  579         virtual std::unique_ptr<te::rst::Raster> 
getRaster(
const std::string& name) 
const;
 
  588         virtual std::unique_ptr<te::dt::DateTime> 
getDateTime(std::size_t i) 
const = 0;
 
  597         virtual std::unique_ptr<te::dt::DateTime> 
getDateTime(
const std::string& name) 
const;
 
  604         virtual std::unique_ptr<te::dt::Array> 
getArray(std::size_t i) 
const = 0;
 
  613           virtual std::unique_ptr<te::dt::Array> 
getArray(
const std::string& name) 
const;
 
  624         virtual std::unique_ptr<te::dt::AbstractData> 
getValue(std::size_t i) 
const;
 
  635         virtual std::unique_ptr<te::dt::AbstractData> 
getValue(
const std::string& name) 
const;
 
  648         virtual std::string 
getAsString(std::size_t i, 
int precision = 0) 
const;
 
  663         virtual std::string 
getAsString(
const std::string& name, 
int precision = 0) 
const;
 
  672         virtual bool isNull(std::size_t i) 
const = 0;
 
  681         virtual bool isNull(
const std::string& name) 
const;
 
  691 #endif  // __TERRALIB_DATAACCESS_INTERNAL_DATASET_H 
  
 
virtual std::unique_ptr< te::rst::Raster > getRaster(std::size_t i) const =0
Method for retrieving a raster attribute value.
 
virtual char getChar(const std::string &name) const
Method for retrieving a signed character attribute value (1 byte long).
 
virtual std::unique_ptr< te::dt::DateTime > getDateTime(const std::string &name) const
Method for retrieving a date and time attribute value.
 
virtual std::unique_ptr< te::rst::Raster > getRaster(const std::string &name) const
Method for retrieving a raster attribute value.
 
virtual std::unique_ptr< te::dt::Array > getArray(const std::string &name) const
Method for retrieving an array.
 
virtual bool moveBeforeFirst()=0
It moves the internal pointer to a position before the first item in the collection.
 
virtual std::string getDatasetNameOfProperty(std::size_t i) const =0
It returns the underlying dataset name of the property at position pos.
 
virtual std::unique_ptr< te::dt::DateTime > getDateTime(std::size_t i) const =0
Method for retrieving a date and time attribute value.
 
virtual bool moveNext()=0
It moves the internal pointer to the next item of the collection.
 
virtual bool isAfterEnd() const =0
It tells if the dataset internal pointer is on the sentinel position after the last element of the co...
 
virtual std::string getPropertyName(std::size_t i) const =0
It returns the property name at position pos.
 
virtual te::common::TraverseType getTraverseType() const =0
It returns the traverse type associated to the dataset.
 
virtual bool isNull(std::size_t i) const =0
It checks if the attribute value is NULL.
 
virtual std::unique_ptr< te::da::DataSetItem > getItem() const
Method for retrieving a dataset item containing all the values in the current row.
 
virtual bool isAtEnd() const =0
It tells if the dataset internal pointer is on the last element of the collection.
 
virtual bool isEmpty() const =0
It returns true if the collection is empty.
 
virtual int getPropertyDataType(std::size_t i) const =0
It returns the underlying data type of the property at position pos.
 
virtual boost::int16_t getInt16(const std::string &name) const
Method for retrieving a 16-bit integer attribute value (2 bytes long).
 
TraverseType
A dataset can be traversed in two ways:
 
virtual std::size_t size() const =0
It returns the collection size, if it is known.
 
virtual std::unique_ptr< te::gm::Geometry > getGeometry(const std::string &name) const
Method for retrieving a geometric attribute value.
 
virtual bool isPositionValid() const =0
It tells if the dataset internal pointer is on a valid position.
 
virtual ~DataSet()
Virtual destructor.
 
virtual boost::int64_t getInt64(std::size_t i) const =0
Method for retrieving a 64-bit integer attribute value (8 bytes long).
 
virtual bool moveLast()=0
It sets the dataset internal pointer to the last item in the collection.
 
virtual bool isConnected() const =0
It returns true if the dataset is connected and false if it is disconnected. A dataset can be connect...
 
virtual std::unique_ptr< te::dt::ByteArray > getByteArray(std::size_t i) const =0
Method for retrieving a byte array.
 
virtual bool isAtBegin() const =0
It tells if the dataset internal pointer is on the first element of the collection or not.
 
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
 
virtual std::string getString(const std::string &name) const
Method for retrieving a string attribute value.
 
virtual boost::int32_t getInt32(std::size_t i) const =0
Method for retrieving a 32-bit integer attribute value (4 bytes long).
 
virtual std::unique_ptr< te::gm::Envelope > getExtent(std::size_t i)=0
It computes the bounding rectangle for a spatial property of the dataset.
 
virtual std::string getNumeric(const std::string &name) const
Method for retrieving a numeric attribute value.
 
virtual bool moveFirst()=0
It moves the internal pointer to the first item in the collection.
 
virtual std::string getNumeric(std::size_t i) const =0
Method for retrieving a numeric attribute value.
 
virtual char getChar(std::size_t i) const =0
Method for retrieving a signed character attribute value (1 byte long).
 
virtual bool isNull(const std::string &name) const
It checks if the attribute value is NULL.
 
virtual bool move(std::size_t i)=0
It moves the dataset internal pointer to a given position.
 
virtual std::string getString(std::size_t i) const =0
Method for retrieving a string value attribute.
 
virtual bool isBeforeBegin() const =0
It tells if the dataset internal pointer is in a position before the first element of the collection ...
 
virtual boost::int16_t getInt16(std::size_t i) const =0
Method for retrieving a 16-bit integer attribute value (2 bytes long).
 
virtual unsigned char getUChar(std::size_t i) const =0
Method for retrieving an unsigned character attribute value (1 byte long).
 
boost::shared_ptr< DataSet > DataSetPtr
 
virtual double getDouble(std::size_t i) const =0
Method for retrieving a double attribute value.
 
DataSet()
Default constructor.
 
virtual std::string getAsString(std::size_t i, int precision=0) const
Method for retrieving a data value as a string plain representation.
 
virtual bool getBool(const std::string &name) const
Method for retrieving a boolean attribute value.
 
virtual std::string getAsString(const std::string &name, int precision=0) const
Method for retrieving a data value as a string plain representation.
 
virtual std::size_t getNumProperties() const =0
It returns the number of properties that composes an item of the dataset.
 
virtual bool movePrevious()=0
It moves the internal pointer to the previous item of the collection.
 
virtual float getFloat(std::size_t i) const =0
Method for retrieving a float attribute value.
 
virtual unsigned char getUChar(const std::string &name) const
Method for retrieving an unsigned character attribute value (1 byte long).
 
A dataset is the unit of information manipulated by the data access module of TerraLib.
 
virtual bool getBool(std::size_t i) const =0
Method for retrieving a boolean attribute value.
 
virtual std::unique_ptr< te::dt::AbstractData > getValue(const std::string &name) const
Method for retrieving any other type of data value stored in the data source.
 
virtual std::unique_ptr< te::dt::ByteArray > getByteArray(const std::string &name) const
Method for retrieving a byte array.
 
virtual float getFloat(const std::string &name) const
Method for retrieving a float attribute value.
 
virtual boost::int64_t getInt64(const std::string &name) const
Method for retrieving a 64-bit integer attribute value (8 bytes long).
 
virtual boost::int32_t getInt32(const std::string &name) const
Method for retrieving a 32-bit integer attribute value (4 bytes long).
 
virtual std::unique_ptr< te::dt::AbstractData > getValue(std::size_t i) const
Method for retrieving any other type of data value stored in the data source.
 
virtual double getDouble(const std::string &name) const
Method for retrieving a double attribute value.
 
virtual std::unique_ptr< te::dt::Array > getArray(std::size_t i) const =0
Method for retrieving an array.
 
virtual std::unique_ptr< te::gm::Geometry > getGeometry(std::size_t i) const =0
Method for retrieving a geometric attribute value.
 
AccessPolicy
Supported data access policies (can be used as bitfield).
 
virtual te::common::AccessPolicy getAccessPolicy() const =0
It returns the read and write permission associated to the dataset.