27 #include "../../common/StringUtils.h" 28 #include "../../core/translator/Translator.h" 29 #include "../../core/uri/URI.h" 30 #include "../../geometry/Envelope.h" 31 #include "../../geometry/GeometryProperty.h" 32 #include "../../raster/RasterProperty.h" 33 #include "../dataset/DataSet.h" 34 #include "../dataset/DataSetAdapter.h" 35 #include "../dataset/DataSetType.h" 36 #include "../dataset/DataSetTypeConverter.h" 37 #include "../dataset/ObjectId.h" 38 #include "../dataset/ObjectIdSet.h" 39 #include "../dataset/PrimaryKey.h" 40 #include "../dataset/UniqueKey.h" 41 #include "../datasource/DataSourceCapabilities.h" 42 #include "../datasource/DataSourceInfoManager.h" 43 #include "../datasource/DataSourceManager.h" 44 #include "../query/DataSetName.h" 45 #include "../query/Field.h" 46 #include "../query/Fields.h" 47 #include "../query/LiteralEnvelope.h" 48 #include "../query/LiteralGeom.h" 49 #include "../query/PropertyName.h" 50 #include "../query/ST_Contains.h" 51 #include "../query/ST_Crosses.h" 52 #include "../query/ST_Disjoint.h" 53 #include "../query/ST_Equals.h" 54 #include "../query/ST_Intersects.h" 55 #include "../query/ST_Overlaps.h" 56 #include "../query/ST_Touches.h" 57 #include "../query/ST_Within.h" 58 #include "../query/Where.h" 60 #include "../Exception.h" 68 #include <boost/algorithm/string.hpp> 69 #include <boost/math/special_functions/round.hpp> 70 #include <boost/lexical_cast.hpp> 75 assert(!datasourceId.empty());
80 if(datasource.get() ==
nullptr)
83 if(dataset->
size() == 0)
85 boost::ptr_vector<te::dt::Property> properties = datasource->getProperties(dataset->
getName());
87 dataset->
add(properties);
125 assert(!datasourceId.empty());
130 if(datasource.get() ==
nullptr)
133 boost::ptr_vector<te::dt::Property> properties = datasource->getProperties(dataset->
getName());
135 dataset->
add(properties);
139 const std::string& propertyName,
140 const std::string& datasourceId)
142 assert(!datasourceId.empty());
147 if(datasource.get() ==
nullptr)
148 throw Exception(
TE_TR(
"Could not retrieve data source in order to search for a property extent!"));
150 std::unique_ptr<te::gm::Envelope> mbr(datasource->getExtent(datasetName, propertyName));
152 return mbr.release();
157 assert(!datasourceId.empty());
160 if(ds.get() ==
nullptr)
163 datasetNames = ds->getDataSetNames();
195 return "Regular File";
204 assert(!datasourceId.empty());
209 if(datasource.get() ==
nullptr)
212 return datasource->hasDataSets();
217 assert(!datasourceId.empty());
223 if(datasource.get() ==
nullptr)
226 std::unique_ptr<DataSet> dataset(datasource->getDataSet(name));
228 return dataset.release();
233 assert(!datasourceId.empty());
237 if(datasource.get() ==
nullptr)
240 std::unique_ptr<DataSetType> datasettype(datasource->getDataSetType(name));
242 return datasettype.release();
268 assert(!datasourceId.empty());
272 if(datasource.get() ==
nullptr)
276 if(dsinfo.get() ==
nullptr)
282 if(opened && !datasource->isOpened())
292 std::vector<size_t> ppos;
293 std::vector<int> ptypes;
294 std::vector<std::string> pnames;
295 std::vector<size_t>::iterator it;
300 for(it=ppos.begin(); it!=ppos.end(); ++it)
303 ptypes.push_back(prop->
getType());
304 pnames.push_back(prop->
getName());
307 for(
size_t i=0; i<ppos.size(); i++)
308 set->addProperty(pnames[i], ppos[i], ptypes[i]);
319 const std::vector<te::dt::Property*>& pkProperties = pk->
getProperties();
321 for(std::size_t i = 0; i < pkProperties.size(); ++i)
322 pnames.push_back(pkProperties[i]->getName());
334 const std::vector<te::dt::Property*>& ukProperties = uk->
getProperties();
336 for(std::size_t j = 0; j < ukProperties.size(); ++j)
337 pnames.push_back(ukProperties[j]->getName());
345 const std::vector<te::dt::Property*>& props = type->
getProperties();
346 for(std::size_t i = 0; i < props.size(); ++i)
353 pnames.push_back(props[i]->getName());
360 std::map<std::string, std::pair<int, int> > dsNames;
361 std::map<std::string, std::pair<int, int> >::const_iterator dsNamesIt;
362 std::vector<te::dt::Property*> props;
370 for(
size_t i = 0; i < props.size(); ++i)
374 int propPos = (
int)dsNames.size();
380 for(dsNamesIt = dsNames.begin(); dsNamesIt != dsNames.end(); ++dsNamesIt)
382 if((*dsNamesIt).second.first == 0)
384 dsProps.first = (*dsNamesIt).first;
385 dsProps.second = (*dsNamesIt).second.second;
395 boost::ptr_vector<te::dt::AbstractData> curValues;
397 for(
int i = 0; i < dsProps.second; ++i)
399 res = res + curValues[i].toString();
408 std::vector<std::string> oidprops;
411 for(std::size_t i = 0; i < oidprops.size(); ++i)
420 std::vector<std::string> oidprops;
429 assert(!names.empty());
433 for(std::size_t i = 0; i < names.size(); ++i)
437 if(pos == std::string::npos)
452 assert(!names.empty());
456 for(std::size_t i = 0; i < names.size(); ++i)
458 if(!dataset->
isNull(names[i]))
459 oid->addValue(dataset->
getValue(names[i]).release());
471 for(std::size_t i = 0; i != np; ++i)
481 return std::string::npos;
490 for(std::size_t i = 0; i != np; ++i)
500 return std::string::npos;
509 for(std::size_t i = 0; i != np; ++i)
513 if(boost::iequals(pname, name))
517 return std::string::npos;
526 for(std::size_t i = 0; i != np; ++i)
530 if(boost::iequals(pname, name))
534 return std::string::npos;
541 const std::size_t np = dt->
size();
543 for(std::size_t i = 0; i != np; ++i)
602 std::vector<std::string>& pnames,
603 std::vector<int>& ptypes)
607 for(std::size_t i = 0; i != dt->
size(); ++i)
611 pnames.push_back(p->
getName());
612 ptypes.push_back(p->
getType());
617 std::vector<std::string>& pnames,
618 std::vector<int>& ptypes)
631 std::map<std::string, std::string> options;
633 Create(ds, dt, d, options, limit);
639 const std::map<std::string, std::string>& options,
656 const std::vector<AttributeConverter>& funcs = converter->
getConverters();
658 assert((type->
size() == indexes.size()) && (type->
size() == funcs.size()));
662 for(std::size_t i = 0; i < type->
size(); ++i)
687 geomPropClone->
setSRID(inputSRID);
691 converter->
add(pos, geomPropClone, sridConverter);
702 gmPropResult->
setSRID(outputSRID);
706 gmPropResult->
setSRID(inputSRID);
714 std::string valueNames(
"(");
716 const std::size_t np = dt->
size();
718 for(std::size_t i = 0; i != np; ++i)
733 std::string valueNames(
"(");
737 for(std::size_t i = 0; i != np; ++i)
752 std::vector<int> properties;
756 for(std::size_t i = 0; i != np; ++i)
769 std::unique_ptr<te::da::Expression> op;
813 std::unique_ptr<Fields> fields(
new Fields);
815 for(std::size_t i = 0; i < properties.size(); ++i)
826 std::unique_ptr<te::da::Select>
te::da::BuildSelect(
const std::string& dsname,
const std::string& propertyName)
828 std::vector<std::string>
p;
834 std::unique_ptr<te::da::Select>
te::da::BuildSelect(
const std::string& dsname,
const std::vector<std::string>& properties)
837 std::unique_ptr<Fields> fields =
BuildFields(properties);
845 std::unique_ptr<Select> select(
new Select(fields.release(), from));
851 const std::vector<std::string>& properties,
852 const std::string& geometryProperty,
858 std::unique_ptr<Fields> fields =
BuildFields(properties);
861 fields->push_back(
new Field(geometryProperty));
872 std::unique_ptr<Expression> spatialOp =
BuildSpatialOp(geomPropertyName, lenv, r);
878 std::unique_ptr<Select> select(
new Select(fields.release(), from, filter));
884 const std::vector<std::string>& properties,
885 const std::string& geometryProperty,
890 std::unique_ptr<Fields> fields =
BuildFields(properties);
893 fields->push_back(
new Field(geometryProperty));
904 std::unique_ptr<Expression> spatialOp =
BuildSpatialOp(geomPropertyName, lgeom, r);
910 std::unique_ptr<Select> select(
new Select(fields.release(), from, filter));
916 const std::vector<std::string>& properties,
927 std::unique_ptr<Fields> fields =
BuildFields(properties);
931 for(std::size_t i = 0; i < oidsProperties.size(); ++i)
933 const std::string& oidPropertyName = oidsProperties[i];
935 bool alreadyIncluded =
false;
937 for(std::size_t j = 0; j < properties.size(); ++j)
939 if(oidPropertyName == properties[j])
941 alreadyIncluded =
true;
947 fields->push_back(
new Field(oidPropertyName));
953 from->push_back(fromItem);
956 std::unique_ptr<Select> select(
new Select(fields.release(), from, filter));
983 if(name[0] >= 0x30 && name[0] <= 0x39)
985 invalidChar =
"begin with a numeric character\n";
990 invalidChar +=
"begin with a invalid character: underscore _\n";
994 int ff = (
int)name.find(
" ");
997 invalidChar +=
"invalid character: blank space\n";
1001 ff = (
int)name.find(
".");
1004 invalidChar +=
"invalid character: dot '.'\n";
1008 ff = (
int)name.find(
"*");
1011 invalidChar +=
"invalid character: mathematical symbol '*'\n";
1015 ff = (
int)name.find(
"/");
1018 invalidChar +=
"invalid character: mathematical symbol '/'\n";
1022 ff = (
int)name.find(
"(");
1025 invalidChar +=
"invalid character: parentheses '('\n";
1029 ff = (
int)name.find(
")");
1032 invalidChar +=
"invalid character: parentheses ')'\n";
1036 ff = (
int)name.find(
"-");
1039 invalidChar +=
"invalid character: mathematical symbol '-'\n";
1043 ff = (
int)name.find(
"+");
1046 invalidChar +=
"invalid character: mathematical symbol '+'\n";
1050 ff = (
int)name.find(
"%");
1053 invalidChar +=
"invalid character: mathematical symbol '%'\n";
1057 ff = (
int)name.find(
">");
1060 invalidChar +=
"invalid character: mathematical symbol '>'\n";
1064 ff = (
int)name.find(
"<");
1067 invalidChar +=
"invalid character: mathematical symbol '<'\n";
1071 ff = (
int)name.find(
"&");
1074 invalidChar +=
"invalid character: mathematical symbol '&'\n";
1078 ff = (
int)name.find(
"$");
1081 invalidChar +=
"invalid symbol: '$'\n";
1085 ff = (
int)name.find(
";");
1088 invalidChar +=
"invalid symbol: ';'\n";
1092 ff = (
int)name.find(
"=");
1095 invalidChar +=
"invalid symbol: '='\n";
1099 ff = (
int)name.find(
"!");
1102 invalidChar +=
"invalid symbol: '!'\n";
1106 ff = (
int)name.find(
"?");
1109 invalidChar +=
"invalid symbol: '?'\n";
1113 ff = (
int)name.find(
"#");
1116 invalidChar +=
"invalid symbol: '#'\n";
1120 ff = (
int)name.find(
"¨");
1123 invalidChar +=
"invalid symbol: '¨'\n";
1127 ff = (
int)name.find(
",");
1130 invalidChar +=
"invalid symbol: ','\n";
1134 ff = (
int)name.find(
"/");
1137 invalidChar +=
"invalid symbol: '/'\n";
1141 ff = (
int)name.find(
"@");
1144 invalidChar +=
"invalid symbol: '@'\n";
1148 ff = (
int)name.find(
"{");
1151 invalidChar +=
"invalid symbol: '{'\n";
1155 ff = (
int)name.find(
"}");
1158 invalidChar +=
"invalid symbol: '}'\n";
1162 std::vector<std::string> vecInvalidChars;
1163 vecInvalidChars.push_back(
"ª");
1164 vecInvalidChars.push_back(
"º");
1165 vecInvalidChars.push_back(
"¹");
1166 vecInvalidChars.push_back(
"²");
1167 vecInvalidChars.push_back(
"³");
1169 for(
unsigned int i = 0; i < vecInvalidChars.size(); ++i)
1171 std::string invalidItem = vecInvalidChars[i];
1173 ff = (
int)name.find(invalidItem);
1176 invalidChar +=
"invalid symbol: '" + invalidItem +
"'\n";
1181 for(
unsigned int i = 0; i < name.size(); ++i)
1183 char value = name[i];
1186 invalidChar +=
"invalid symbol\n";
1192 if(u==
"OR" || u==
"AND" || u==
"NOT" || u==
"LIKE" ||
1193 u==
"SELECT" || u==
"FROM" || u==
"UPDATE" || u==
"DELETE" ||u==
"BY" || u==
"GROUP" || u==
"ORDER" ||
1194 u==
"DROP" || u==
"INTO" || u==
"VALUE" || u==
"IN" || u==
"ASC" || u==
"DESC"|| u==
"COUNT" || u==
"JOIN" ||
1195 u==
"LEFT" || u==
"RIGHT" || u==
"INNER" || u==
"UNION" || u==
"IS" || u==
"NULL" || u==
"WHERE" ||
1196 u==
"BETWEEN" || u==
"DISTINCT" || u==
"TRY" || u==
"IT" || u==
"INSERT" || u==
"ALIASES" || u==
"CREATE" ||
1197 u==
"ALTER" || u==
"TABLE" || u==
"INDEX" || u==
"ALL" || u==
"HAVING" || u==
"EXEC" || u==
"SET" ||
1198 u ==
"AVG" || u ==
"MAX" || u ==
"MIN" || u ==
"SUM" || u ==
"FILTER" || u ==
"OFFSET" || u ==
"LENGHT" )
1200 invalidChar +=
"invalid name: using reserved word " + u +
"\n";
1206 if( (n==
"zone") || (n==
"comp") || (n==
"no") || (n==
"local") ||
1207 (n==
"level") || (n==
"long"))
1209 invalidChar +=
"invalid name: using reserved word " + n +
"\n";
1224 if(props.size() > 1)
1227 while(++pksize < props.size())
1229 if(props[pksize-1]->getDatasetName() != props[pksize]->getDatasetName())
1251 for (std::size_t i = 0; i < columns.size(); ++i)
1253 converter->remove(columns[i]);
1263 double size = (double)values.size();
1267 double d = 0, v = 0;
1268 std::vector<double>::const_iterator it;
1272 it = values.begin();
1275 while(it != values.end())
1281 else if(sumary ==
"MAX")
1283 it = values.begin();
1286 while(it != values.end())
1292 else if(sumary ==
"SUM")
1295 for(it = values.begin(); it != values.end(); ++it)
1298 else if(sumary ==
"AVERAGE")
1301 for(it = values.begin(); it != values.end(); ++it)
1305 else if(sumary ==
"STDDEV")
1311 for(it = values.begin(); it != values.end(); ++it)
1318 v = (v - m) / (size - 1);
1322 else if(sumary ==
"VARIANCE")
1328 for(it = values.begin(); it != values.end(); ++it)
1335 v = (v - m) / (size - 1);
1338 else if(sumary ==
"MEDIAN")
1344 std::stable_sort(values.begin(), values.end());
1345 size_t meio = (size_t)size / 2;
1348 if((
size_t)size%2 == 0)
1349 v = (v + values[meio-1]) / 2.;
1352 else if(sumary ==
"MODE")
1361 double size = (double)values.size();
1366 std::vector<std::string>::const_iterator it;
1370 it = values.begin();
1373 while(it != values.end())
1379 else if(sumary ==
"MAX")
1381 it = values.begin();
1384 while(it != values.end())
1396 double v = pow(10., (
int)precision);
1397 double ret = boost::math::round(value * v);
1408 return (
double)ds->
getChar(idx);
1438 return boost::lexical_cast<
double>(ds->
getNumeric(idx));
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager.
Property * getProperty(std::size_t i) const
It returns the i-th property.
virtual unsigned char getUChar(std::size_t i) const =0
Method for retrieving an unsigned character attribute value (1 byte long).
TEDATAACCESSEXPORT te::rst::RasterProperty * GetFirstRasterProperty(const DataSetType *dt)
void push_back(Curve *ring)
It adds the curve to the curve polygon.
TEDATAACCESSEXPORT te::gm::Envelope * GetExtent(const std::string &datasetName, const std::string &propertyName, const std::string &datasourceId)
TEDATAACCESSEXPORT void LoadProperties(te::da::DataSetType *dataset, const std::string &datasourceId)
virtual double getDouble(std::size_t i) const =0
Method for retrieving a double attribute value.
const std::vector< std::vector< std::size_t > > & getConvertedPropertyIndexes() const
An abstract class that models a source of data in a query.
The Field class can be used to model an expression that takes part of the output items of a SELECT...
TEDATAACCESSEXPORT void GetEmptyOIDSet(const DataSetType *type, ObjectIdSet *&set)
Returns an empty ObjectIdSet, with the definitions of fields that compose it.
void setSRID(int srid)
It sets the spatial reference system identifier associated to this property.
TEDATAACCESSEXPORT ObjectId * GenerateOID(DataSet *dataset, const std::vector< std::string > &names)
Spatial intersects operator.
A class that models the name of a dataset used in a From clause.
boost::shared_ptr< DataSource > DataSourcePtr
std::string Convert2LCase(const std::string &value)
It converts a string to lower case.
TEDATAACCESSEXPORT void AssociateDataSetTypeConverterSRID(DataSetTypeConverter *converter, const int &inputSRID, const int &outputSRID=TE_UNKNOWN_SRS)
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
TEDATAACCESSEXPORT bool HasLinkedTable(te::da::DataSetType *type)
It checks if the datasettype has a linked table.
A class that models the name of any property of an object.
Base exception class for plugin module.
A class that models the description of a dataset.
TEDATAACCESSEXPORT std::string GetDataSetCategoryName(int category)
virtual std::string getNumeric(std::size_t i) const =0
Method for retrieving a numeric attribute value.
std::size_t getNumberOfUniqueKeys() const
It returns the number of unique keys defined for the dataset type.
virtual float getFloat(std::size_t i) const =0
Method for retrieving a float attribute value.
TEDATAACCESSEXPORT std::unique_ptr< Select > BuildSelect(const std::string &dsname)
virtual void createDataSet(DataSetType *dt, const std::map< std::string, std::string > &options)
It creates the dataset schema definition in the target data source.
DataSetType * getResult() const
TEDATAACCESSEXPORT std::size_t GetPropertyPos(const DataSet *dataset, const std::string &name)
const boost::ptr_vector< te::dt::AbstractData > & getValue() const
It gets the properties values used to uniquely identify a data set element.
virtual void add(const std::string &datasetName, DataSet *d, const std::map< std::string, std::string > &options, std::size_t limit=0)
It adds data items to the dataset in the data source.
PrimaryKey * getPrimaryKey() const
It returns the primary key associated to the dataset type.
std::string Convert2UCase(const std::string &value)
It converts a string to upper case.
SpatialRelation
Spatial relations between geometric objects.
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
TEDATAACCESSEXPORT std::string GetSQLValueNames(const DataSetType *dt)
static te::dt::Date ds(2010, 01, 01)
TEDATAACCESSEXPORT double GetValueAsDouble(const te::da::DataSet *ds, const size_t pos)
It gets the value as double.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
#define TE_TR(message)
It marks a string in order to get translated.
Spatial crosses operator.
TEDATAACCESSEXPORT void GetOIDDatasetProps(const DataSetType *type, std::pair< std::string, int > &dsProps)
te::dt::Property * clone() const
It returns a clone of the object.
It models a property definition.
TEDATAACCESSEXPORT int GetPropertyIndex(te::da::DataSet *dataSet, const std::string propName)
This is an abstract class that models a query expression.
DataSetType * getConvertee()
This method returns the pointer to the DataSetType that is handled by the converter.
const std::vector< te::dt::Property * > & getProperties() const
It returns the properties that take part of the primary key.
void DataSetAdapter()
DataSet Adapter example.
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.
An converter for DataSetType.
const std::vector< AttributeConverter > & getConverters() const
A class that represents the supported data types of a specific data source.
virtual bool moveNext()=0
It moves the internal pointer to the next item of the collection.
TEDATAACCESSEXPORT std::size_t GetFirstSpatialPropertyPos(const te::da::DataSet *dataset)
It returns the first dataset spatial property or NULL if none is found.
const std::vector< Property * > & getProperties() const
It returns the list of properties describing the CompositeProperty.
virtual boost::int16_t getInt16(std::size_t i) const =0
Method for retrieving a 16-bit integer attribute value (2 bytes long).
static DataSourceManager & getInstance()
It returns a reference to the singleton instance.
virtual int getPropertyDataType(std::size_t i) const =0
It returns the underlying data type of the property at position pos.
Spatial overlaps operator.
An Envelope defines a 2D rectangular region.
void ObjectId()
ObjectId example.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
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...
Spatial touches operator.
This class represents an unique id for a data set element.
virtual boost::int32_t getInt32(std::size_t i) const =0
Method for retrieving a 32-bit integer attribute value (4 bytes long).
static te::dt::DateTime d(2010, 8, 9, 15, 58, 39)
static te::dt::TimeDuration dt(20, 30, 50, 11)
boost::ptr_vector< Field > Fields
Fields is just a boost::ptr_vector of Field pointers.
TEDATAACCESSEXPORT DataSet * GetDataSet(const std::string &name, const std::string &datasourceId)
TEDATAACCESSEXPORT bool HasDataSet(const std::string &datasourceId)
A class that can be used to model a filter expression that can be applied to a query.
TEDATAACCESSEXPORT double GetSummarizedValue(std::vector< double > &values, const std::string &summary)
It gets the summarized value.
It describes a unique key (uk) constraint.
std::size_t size() const
It returns the number of properties of the CompositeProperty.
TEDATAACCESSEXPORT ObjectIdSet * GenerateOIDSet(DataSet *dataset, const DataSetType *type)
TEDATAACCESSEXPORT void GetDataSetNames(std::vector< std::string > &datasetNames, const std::string &datasourceId)
TEDATAACCESSEXPORT std::vector< int > GetPropertyDataTypes(const te::da::DataSet *dataset)
Utility functions for the data access module.
TEDATAACCESSEXPORT std::unique_ptr< Expression > BuildSpatialOp(Expression *e1, Expression *e2, te::gm::SpatialRelation r)
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
A Select models a query to be used when retrieving data from a DataSource.
TEDATAACCESSEXPORT double Round(const double &value, const size_t &precision)
It gets the round value.
void add(const std::string &newPropertyName, int newPropertyType, const std::vector< std::size_t > &adaptedPropertyPos, AttributeConverter conv)
boost::ptr_vector< FromItem > From
It models the FROM clause for a query.
Spatial contains operator.
int getType() const
It returns the property data type.
void add(Constraint *c)
It adds a new constraint.
A dataset is the unit of information manipulated by the data access module of TerraLib.
virtual char getChar(std::size_t i) const =0
Method for retrieving a signed character attribute value (1 byte long).
const std::vector< te::dt::Property * > & getProperties() const
It returns the properties that form the unique key.
Property * findFirstPropertyOfType(const int t) const
returns the first property of the given data type. Caller doesn't take ownership of the returned poin...
TEDATAACCESSEXPORT void GetOIDPropertyPos(const DataSetType *type, std::vector< std::size_t > &ppos)
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.
It describes a primary key (pk) constraint.
void remove(const std::string &propertyName)
This method removes a property of DataSetTypeConverter.
void setDataTypeCapabilities(const DataTypeCapabilities &capabilities)
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...
A class that models a literal for Envelope values.
TEDATAACCESSEXPORT std::string getBasePkey(te::da::ObjectId *oid, std::pair< std::string, int > &dsProps)
const std::vector< std::string > & getPropertyNames() const
It returns the property names used to generated the oids.
std::size_t getPropertyPosition(const std::string &name) const
It returns the property position based on its name.
TEDATAACCESSEXPORT void GetOIDPropertyNames(const DataSetType *type, std::vector< std::string > &pnames)
virtual bool isNull(std::size_t i) const =0
It checks if the attribute value is NULL.
TEDATAACCESSEXPORT DataSetType * GetDataSetType(const std::string &name, const std::string &datasourceId)
Spatial Disjoint operator.
void add(const std::string &propertyName, te::dt::Property *p, const std::string &attributeConverterName="GenericAttributeConverter")
It adds a conversions to the given property of the input data set type.
virtual boost::int64_t getInt64(std::size_t i) const =0
Method for retrieving a 64-bit integer attribute value (8 bytes long).
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
virtual std::size_t getNumProperties() const =0
It returns the number of properties that composes an item of the dataset.
virtual std::string getPropertyName(std::size_t i) const =0
It returns the property name at position pos.
TEDATAACCESSEXPORT std::unique_ptr< Fields > BuildFields(const std::vector< std::string > &properties)
const std::string & getDatasetName() const
It returns the name of the propery's dataset.
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
TEDATAACCESSEXPORT DataSetAdapter * CreateAdapter(DataSet *ds, DataSetTypeConverter *converter, bool isOwner=false)
terralib_conf cmake set(SWIG_MAIN_FILE"${CMAKE_CURRENT_SOURCE_DIR}/../../../src/terralib/binding/swig/TerraLibLUA.i") file(GLOB TERRALIB_SWIG_SCRIPT_FILE $
TEDATAACCESSEXPORT void LoadFull(te::da::DataSetType *dataset, const std::string &datasourceId)
Expression * getExpression() const
It returns the expression that can be used to retrieve the data set that contains the all indentified...
TEDATAACCESSEXPORT te::dt::Property * GetFirstSpatialProperty(const DataSetType *dt)
UniqueKey * getUniqueKey(std::size_t i) const
It returns the i-th unique key.
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
TEDATAACCESSEXPORT void GetPropertyInfo(const DataSetType *const dt, std::vector< std::string > &pnames, std::vector< int > &ptypes)
A class that models a literal for Geometry values.
const std::string & getName() const
It returns the property name.