10 else if(dsType ==
"POSTGIS")
14 else if(dsType ==
"GDAL")
21 dataSource->
open(connStr);
38 return "unknown index";
43 std::vector<std::string> propertiesNames;
45 std::vector<te::dt::Property*> properties = pk->
getProperties();
47 for(
unsigned int i = 0; i < properties.size(); i++)
49 propertiesNames.push_back(properties[i]->getName());
52 return propertiesNames;
57 std::vector<std::string> propertiesNames;
59 std::vector<te::dt::Property*> properties = fk->
getProperties();
61 for(
unsigned int i = 0; i < properties.size(); i++)
63 propertiesNames.push_back(properties[i]->getName());
66 return propertiesNames;
71 std::vector<std::string> propertiesNames;
73 std::vector<te::dt::Property*> properties = uk->
getProperties();
75 for(
unsigned int i = 0; i < properties.size(); i++)
77 propertiesNames.push_back(properties[i]->getName());
80 return propertiesNames;
85 std::vector<std::string> propertiesNames;
87 std::vector<te::dt::Property*> properties = idx->
getProperties();
89 for(
unsigned int i = 0; i < properties.size(); i++)
91 propertiesNames.push_back(properties[i]->getName());
94 return propertiesNames;
99 std::map<std::string, te::da::DataSet*> dataSets;
116 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS
118 #elif TE_PLATFORM == TE_PLATFORMCODE_LINUX
119 info.m_type =
"s.o.";
120 #elif TE_PLATFORM == TE_PLATFORMCODE_APPLE
121 info.m_type =
"dylib";
123 #error "Platform not supported yet"
126 info.
m_name =
"OGR DataSource Driver";
129 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS
131 info.m_mainFile =
"terralib_ogr.dll";
133 info.m_mainFile =
"terralib_ogr_d.dll";
137 #if TE_PLATFORM == TE_PLATFORMCODE_LINUX
139 info.m_mainFile =
"libterralib_ogr.so";
141 info.m_mainFile =
"libterralib_ogr_d.so";
145 #if TE_PLATFORM == TE_PLATFORMCODE_APPLE
147 info.m_mainFile =
"terralib_ogr.dylib";
149 info.m_mainFile =
"terralib_ogr.dylib";
159 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS
161 #elif TE_PLATFORM == TE_PLATFORMCODE_LINUX
162 info.m_type =
"s.o.";
163 #elif TE_PLATFORM == TE_PLATFORMCODE_APPLE
164 info.m_type =
"dylib";
166 #error "Platform not supported yet"
169 info.
m_name =
"GDAL DataSource Driver";
172 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS
174 info.m_mainFile =
"terralib_gdal.dll";
176 info.m_mainFile =
"terralib_gdal_d.dll";
180 #if TE_PLATFORM == TE_PLATFORMCODE_LINUX
182 info.m_mainFile =
"libterralib_gdal.so";
184 info.m_mainFile =
"libterralib_gdal_d.so";
188 #if TE_PLATFORM == TE_PLATFORMCODE_APPLE
190 info.m_mainFile =
"terralib_gdal.dylib";
192 info.m_mainFile =
"terralib_gdal.dylib";
202 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS
204 #elif TE_PLATFORM == TE_PLATFORMCODE_LINUX
205 info.m_type =
"s.o.";
206 #elif TE_PLATFORM == TE_PLATFORMCODE_APPLE
207 info.m_type =
"dylib";
209 #error "Platform not supported yet"
212 info.
m_name =
"PostGIS DataSource Driver";
215 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS
217 info.m_mainFile =
"terralib_postgis.dll";
219 info.m_mainFile =
"terralib_postgis_d.dll";
223 #if TE_PLATFORM == TE_PLATFORMCODE_LINUX
225 info.m_mainFile =
"libterralib_postgis.so";
227 info.m_mainFile =
"libterralib_postgis_d.so";
231 #if TE_PLATFORM == TE_PLATFORMCODE_APPLE
233 info.m_mainFile =
"terralib_postgis.dylib";
235 info.m_mainFile =
"terralib_postgis.dylib";
std::string m_name
The plugin name: an internal value used to identify the plugin in the system. Must be a unique value...
virtual void open()=0
It opens the data source and makes it ready for using.
static std::vector< std::string > getFKPropertiesNames(te::da::ForeignKey *fk)
Getting Foreign Key Properties Names.
virtual std::auto_ptr< DataSourceTransactor > getTransactor()=0
It returns an object that can execute transactions in the context of a data source.
static bool loadModules(std::string &errorMessage)
Load Terralib modules.
static std::vector< std::string > getIdxPropertiesNames(te::da::Index *idx)
Getting Index Properties Names.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
const std::vector< te::dt::Property * > & getProperties() const
It returns the properties that take part of the primary key.
static PluginManager & getInstance()
It returns a reference to the singleton instance.
static std::auto_ptr< DataSource > make(const std::string &dsType)
static bool getDataSource(std::string dsType, std::string connStr, te::da::DataSource *&dataSource, std::string &errorMessage)
Method to connect with a Data Source.
It models a foreign key constraint for a DataSetType.
It describes a unique key (uk) constraint.
static std::vector< std::string > getPKPropertiesNames(te::da::PrimaryKey *pk)
Getting Primary Key Properties Names.
A DataSourceTransactor can be viewed as a connection to the data source for reading/writing things in...
static std::vector< std::string > getUKPropertiesNames(te::da::UniqueKey *uk)
Getting Unique Key Properties Names.
static te::da::DataSet * getDataSet(te::da::DataSource *dataSource, std::string dataSetName)
A dataset is the unit of information manipulated by the data access module of TerraLib.
const std::vector< te::dt::Property * > & getProperties() const
It returns the properties that form the unique key.
const std::vector< te::dt::Property * > & getProperties() const
It returns the properties that take part of the index.
It describes a primary key (pk) constraint.
std::string m_description
A brief explanation about the plugin.
virtual std::auto_ptr< DataSet > getDataSet(const std::string &name, te::common::TraverseType travType=te::common::FORWARDONLY, bool connected=false, const te::common::AccessPolicy accessPolicy=te::common::RAccess)=0
It gets the dataset identified by the given name. 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.
static std::string getIdxTypeName(int id)
The basic information about a plugin.
const std::vector< te::dt::Property * > & getProperties() const
It returns the properties that take part of the foreign key constraint.
It describes an index associated to a DataSetType.