26#ifndef __TERRALIB_DATAACCESS_INTERNAL_UTILS_H
27#define __TERRALIB_DATAACCESS_INTERNAL_UTILS_H
38#include <boost/ptr_container/ptr_vector.hpp>
49 namespace dt {
class AbstracData;
class Property; }
68 class DataSourceCatalogLoader;
86 const std::string& propertyName,
87 const std::string& datasourceId);
227 std::vector<std::string>& pnames,
228 std::vector<int>& ptypes);
231 std::vector<std::string>& pnames,
232 std::vector<int>& ptypes);
281 const std::map<std::string, std::string>& options,
282 std::size_t limit = 0);
305 const std::string& propertyName);
308 const std::vector<std::string>& properties);
311 const std::vector<std::string>& properties,
312 const std::string& geometryProperty,
318 const std::vector<std::string>& properties,
319 const std::string& geometryProperty,
324 const std::vector<std::string>& properties,
The Fields class can be used to model a set of expressions that form the output items of a SELECT.
te::da::DataSourceCapabilities capabilities
A Select models a query to be used when retrieving data from a data source.
A class to store the proxy information that must be used to access data located in URIs.
Class used to centralize and control access to data in terralib. It aims to create a high-level inter...
An converter for DataSetType.
A class that models the description of a dataset.
A dataset is the unit of information manipulated by the data access module of TerraLib.
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
A DataSourceTransactor can be viewed as a connection to the data source for reading/writing things in...
An abstract class for data providers like a DBMS, Web Services or a regular file.
This is an abstract class that models a query expression.
This class is responsible for validating field names. It can handle size limits, fix special characte...
This class models a literal value.
This class represents a set of unique ids created in the same context. i.e. from the same data set.
This class represents an unique id for a data set element.
A base class for values that can be retrieved from the data access module.
It models a property definition.
An Envelope defines a 2D rectangular region.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
An abstract class for data providers like a DBMS, Web Services or a regular file.
This is an abstract class that models a query expression.
Enumerations related to Geometry module.
Namespace for the DataAccess API of TerraLib.
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSetTypeConverter > CreateConverterForDataSetType(const te::da::DataSetType *inputDataSetType, const te::da::DataSetType *outputDataSetType, const te::da::DataSourceCapabilities *outputCapabilities)
Removes the auto-increment property from the converter. This is done to allow the destination dataSou...
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSetType > CreateDataSetType(const std::string &dataSetName, te::da::DataSet *dataSet)
Creates a FieldNameValidator object based on the given DataSourceCapabilities.
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSet > CreateAdapterToHandlePersistence(const te::da::DataAccess *destinationDataAccess, te::da::DataSet *inputDataSet)
//Creates an adapter to handle correctly the primary key and autonumber atributes....
TEDATAACCESSEXPORT int GetPropertyIndex(te::da::DataSet *dataSet, const std::string propName)
TEDATAACCESSEXPORT std::string GetSQLValueNames(const DataSetType *dt)
TEDATAACCESSEXPORT std::vector< int > GetPropertyDataTypes(const te::da::DataSet *dataset)
TEDATAACCESSEXPORT te::da::FieldNameValidator CreateValidator(const te::da::DataSourceCapabilities *capabilities)
This function will prepare the given 'inputDataSetType' by validating the names of the properties of ...
TEDATAACCESSEXPORT void GetOIDPropertyPos(const DataSetType *type, std::vector< std::size_t > &ppos)
TEDATAACCESSEXPORT void AssociateDataSetTypeConverterSRID(DataSetTypeConverter *converter, const int &inputSRID, const int &outputSRID=TE_UNKNOWN_SRS)
TEDATAACCESSEXPORT void RemoveAutoIncrementProperties(te::da::DataSetTypeConverter *converter)
Converts a DataAccess to its String representation.
TEDATAACCESSEXPORT bool HasLinkedTable(te::da::DataSetType *type)
It checks if the datasettype has a linked table.
TEDATAACCESSEXPORT ObjectId * GenerateOID(DataSet *dataset, const std::vector< std::string > &names)
TEDATAACCESSEXPORT te::dt::AbstractData * DataAccessToStringConverter(te::dt::AbstractData *absData)
Converts the String representtion of a DataAccess to the concrete class.
TEDATAACCESSEXPORT void GetOIDPropertyNames(const DataSetType *type, std::vector< std::string > &pnames)
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSetType > PrepareDateSetType(const te::da::DataSetType *dataSetType, const te::da::DataSourceCapabilities *capabilities)
Creates a converter between the given inputDataSetType and outputDataSetType. It handles different or...
TEDATAACCESSEXPORT DataSetType * GetDataSetType(const std::string &name, const std::string &datasourceId)
TEDATAACCESSEXPORT void GetPropertyInfo(const DataSetType *const dt, std::vector< std::string > &pnames, std::vector< int > &ptypes)
TEDATAACCESSEXPORT void GetDataSetNames(std::vector< std::string > &datasetNames, const std::string &datasourceId)
TEDATAACCESSEXPORT bool HasDataSet(const std::string &datasourceId)
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
TEDATAACCESSEXPORT bool HasOption(const std::map< std::string, std::string > &options, const std::string &option)
TEDATAACCESSEXPORT void LoadFull(te::da::DataSetType *dataset, const std::string &datasourceId)
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager.
TEDATAACCESSEXPORT void GetEmptyOIDSet(const DataSetType *type, ObjectIdSet *&set)
Returns an empty ObjectIdSet, with the definitions of fields that compose it.
TEDATAACCESSEXPORT DataSetAdapter * CreateAdapter(DataSet *ds, DataSetTypeConverter *converter, bool isOwner=false)
TEDATAACCESSEXPORT std::size_t GetPropertyPos(const DataSet *dataset, const std::string &name)
TEDATAACCESSEXPORT void Create(DataSource *ds, DataSetType *dt, DataSet *d, std::size_t limit=0)
It creates the dataset definition in a data source and then fill it with data from the input dataset.
TEDATAACCESSEXPORT std::unique_ptr< Select > BuildSelect(const std::string &dsname)
TEDATAACCESSEXPORT double Round(const double &value, const size_t &precision)
It gets the round value.
TEDATAACCESSEXPORT double GetSummarizedValue(std::vector< double > &values, const std::string &summary)
It gets the summarized value.
TEDATAACCESSEXPORT std::unique_ptr< te::da::DataSet > HideColumns(te::da::DataSet *ds, te::da::DataSetType *dst, const std::vector< std::string > &columns)
It hide columns of a DataSet using DataSetAdapter.
TEDATAACCESSEXPORT std::string GetDataSetCategoryName(int category)
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
TEDATAACCESSEXPORT void GetOIDDatasetProps(const DataSetType *type, std::pair< std::string, int > &dsProps)
TEDATAACCESSEXPORT std::unique_ptr< Fields > BuildFields(const std::vector< std::string > &properties)
TEDATAACCESSEXPORT te::rst::RasterProperty * GetFirstRasterProperty(const DataSetType *dt)
TEDATAACCESSEXPORT bool IsValidName(const std::string &name, std::string &invalidChar)
It checks if the name is not valid as the existence of invalid characters, reserved words,...
TEDATAACCESSEXPORT te::dt::Property * GetFirstSpatialProperty(const DataSetType *dt)
TEDATAACCESSEXPORT DataSet * GetDataSet(const std::string &name, const std::string &datasourceId)
TEDATAACCESSEXPORT std::size_t GetFirstSpatialPropertyPos(const te::da::DataSet *dataset)
It returns the first dataset spatial property or NULL if none is found.
TEDATAACCESSEXPORT void LoadProperties(te::da::DataSetType *dataset, const std::string &datasourceId)
TEDATAACCESSEXPORT te::da::Literal * GetLiteralFromAbstractData(const te::dt::AbstractData *abstractData)
Creates the concrete literal class based on the given abstract data.
TEDATAACCESSEXPORT double GetValueAsDouble(const te::da::DataSet *ds, const size_t pos)
It gets the value as double.
TEDATAACCESSEXPORT te::gm::Envelope * GetExtent(const std::string &datasetName, const std::string &propertyName, const std::string &datasourceId)
boost::shared_ptr< DataSource > DataSourcePtr
TEDATAACCESSEXPORT std::string getBasePkey(te::da::ObjectId *oid, std::pair< std::string, int > &dsProps)
TEDATAACCESSEXPORT std::unique_ptr< Expression > BuildSpatialOp(Expression *e1, Expression *e2, te::gm::SpatialRelation r)
TEDATAACCESSEXPORT std::string GetAliasName(std::string fullName)
Get alias based on a input name.
TEDATAACCESSEXPORT te::dt::AbstractData * StringToDataAccessConverter(te::dt::AbstractData *absData)
TEDATAACCESSEXPORT ObjectIdSet * GenerateOIDSet(DataSet *dataset, const DataSetType *type)
Namespace for the Data Type module of TerraLib.
Namespace for the Vector Geometry module of TerraLib.
SpatialRelation
Spatial relations between geometric objects.
Namespace for the Raster module of TerraLib.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Configuration flags for the TerraLib SRS module.
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.