27 #include "../common/Translator.h" 
   28 #include "../dataaccess/query/DataSetName.h" 
   29 #include "../dataaccess/query/Field.h" 
   30 #include "../dataaccess/query/Fields.h" 
   31 #include "../dataaccess/query/From.h" 
   32 #include "../dataaccess/query/FromItem.h" 
   33 #include "../dataaccess/query/Select.h" 
   34 #include "../dataaccess/query/SpatialQueryProcessor.h" 
   35 #include "../dataaccess/query/Where.h" 
   36 #include "../dataaccess/utils/Utils.h" 
   42 #include <boost/format.hpp> 
   60                                     const std::string& title,
 
   72   assert(!m_datasetName.empty());
 
   76   return ds->getDataSetType(m_datasetName);
 
   82   assert(!m_datasetName.empty());
 
   86   return ds->getDataSet(m_datasetName, travType, accessPolicy);
 
   95   assert(!m_datasetName.empty());
 
   99   return ds->getDataSet(m_datasetName, propertyName, e, r, travType, accessPolicy);
 
  108   assert(!m_datasetName.empty());
 
  112   return ds->getDataSet(m_datasetName, propertyName, g, r, travType, accessPolicy);
 
  120   assert(!m_datasetName.empty());
 
  134   from->push_back(fromItem);
 
  137   std::auto_ptr<te::da::Select> select(
new te::da::Select(all, from, filter));
 
  140   return sqp.
getDataSet(ds, select.get(), travType);
 
  151   return ds->getDataSet(m_datasetName, oids, travType, accessPolicy);
 
  156   if(m_datasourceId.empty() || m_datasetName.empty())
 
  163     this->getSchema().get();
 
  170   if(ds.get() == 0 || !ds->isValid() || !ds->isOpened())
 
  178   if(m_rendererType.empty())
 
  179     throw Exception((boost::format(
TE_TR(
"Could not draw the data set layer %1%. The renderer type is empty!")) % getTitle()).str());
 
  183   if(renderer.get() == 0)
 
  184     throw Exception((boost::format(
TE_TR(
"Could not draw the data set layer %1%. The renderer %2% could not be created!")) % getTitle() % m_rendererType).str());
 
  186   renderer->draw(
this, canvas, bbox, srid);
 
  196   return m_datasetName;
 
  201   m_datasetName = name;
 
  206   return m_datasourceId;
 
  216   return m_rendererType;
 
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager. 
 
const std::string & getDataSetName() 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...
 
This is the base class for layers. 
 
A class that models the name of a dataset used in a From clause. 
 
boost::shared_ptr< DataSource > DataSourcePtr
 
~DataSetLayer()
Destructor. 
 
void setDataSetName(const std::string &name)
 
An abstract factory for layer renderers. 
 
void draw(Canvas *canvas, const te::gm::Envelope &bbox, int srid)
It draws the layer geographic objects in the given canvas using the informed SRS. ...
 
SpatialRelation
Spatial relations between geometric objects. 
 
A layer with reference to a dataset. 
 
#define TE_TR(message)
It marks a string in order to get translated. 
 
A basic query processor for spatial restrictions. 
 
This is an abstract class that models a query expression. 
 
void setRendererType(const std::string &t)
 
std::auto_ptr< te::da::DataSet > getData(te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) const 
It gets the dataset identified by the layer name. 
 
AccessPolicy
Supported data access policies (can be used as bitfield). 
 
TraverseType
A dataset can be traversed in two ways: 
 
static const std::string sm_type
A static data member used in the implementation of getType method. 
 
An Envelope defines a 2D rectangular region. 
 
const std::string & getDataSourceId() const 
 
This class represents a set of unique ids created in the same context. i.e. from the same data set...
 
boost::ptr_vector< Field > Fields
Fields is just a boost::ptr_vector of Field pointers. 
 
const std::string & getType() const 
It returns the layer type: DATASET_LAYER. 
 
A class that can be used to model a filter expression that can be applied to a query. 
 
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards. 
 
static AbstractRenderer * make(const std::string &factoryKey)
It creates an object with the appropriated factory. 
 
A Select models a query to be used when retrieving data from a DataSource. 
 
boost::ptr_vector< FromItem > From
It models the FROM clause for a query. 
 
A canvas is an abstraction of a drawing area. 
 
virtual std::auto_ptr< DataSet > getDataSet(const DataSourcePtr &ds, const Select &q, te::common::TraverseType travType=te::common::FORWARDONLY)
 
std::auto_ptr< LayerSchema > getSchema() const 
It returns the layer schema. 
 
DataSetLayer(AbstractLayer *parent=0)
It initializes a new layer. 
 
bool isValid() const 
It returns true if the layer can be used for instance to draw, otherwise, it returns false...
 
void setDataSourceId(const std::string &id)
 
const std::string & getRendererType() const