24 #include "../dataaccess/dataset/DataSet.h"
25 #include "../dataaccess/dataset/DataSetAdapter.h"
26 #include "../dataaccess/dataset/DataSetType.h"
27 #include "../dataaccess/dataset/DataSetTypeConverter.h"
28 #include "../dataaccess/dataset/ObjectIdSet.h"
29 #include "../dataaccess/datasource/DataSource.h"
30 #include "../dataaccess/datasource/DataSourceCapabilities.h"
31 #include "../dataaccess/utils/Utils.h"
33 #include "../datatype/Property.h"
34 #include "../datatype/StringProperty.h"
36 #include "../geometry/GeometryProperty.h"
38 #include "../statistics/core/Utils.h"
48 std::string inDsetName,
49 std::auto_ptr<te::da::DataSetType> inDsetType,
53 m_inDsetName = inDsetName;
54 m_inDsetType = inDsetType;
59 std::map<
te::dt::Property*, std::vector<te::stat::StatisticalSummary> >&statSum)
61 m_groupProps = groupProps;
87 if (!m_inDsetType.get())
90 if (!m_inDsetType->hasGeom())
93 if (m_groupProps.empty())
96 if (m_outDset.empty() || !m_outDsrc.get())
109 std::map<std::string, std::string> options;
111 m_outDsrc->createDataSet(dsTypeResult, options);
114 result->moveBeforeFirst();
115 m_outDsrc->add(dsTypeResult->getName(),result.get(), options);
118 if (m_outDsrc->getCapabilities().getDataSetTypeCapabilities().supportsPrimaryKey())
120 std::string pk_name = dsTypeResult->getName() +
"_pkey";
122 pk->
add(dsTypeResult->getProperty(0));
123 m_outDsrc->addPrimaryKey(m_outDset,pk);
void setInput(te::da::DataSourcePtr inDsrc, std::string inDsetName, std::auto_ptr< te::da::DataSetType > inDsetType, const te::da::ObjectIdSet *oidSet=0)
void add(te::dt::Property *p)
It adds a property to the list of properties of the primary key.
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
boost::shared_ptr< DataSource > DataSourcePtr
A class that models the description of a dataset.
DataSetType * getResult() const
te::gm::GeomType getGeomResultType(te::gm::GeomType geom)
It models a property definition.
bool save(std::auto_ptr< te::mem::DataSet > result, std::auto_ptr< te::da::DataSetType > outDsType)
An converter for DataSetType.
virtual bool paramsAreValid()
This class represents a set of unique ids created in the same context. i.e. from the same data set...
void setOutput(te::da::DataSourcePtr outDsrc, std::string dsname)
void setParams(std::vector< te::dt::Property * > &groupProps, std::map< te::dt::Property *, std::vector< te::stat::StatisticalSummary > > &statSum)
It describes a primary key (pk) constraint.
TEDATAACCESSEXPORT DataSetAdapter * CreateAdapter(DataSet *ds, DataSetTypeConverter *converter, bool isOwner=false)