27 #include "../../../common/StringUtils.h"
28 #include "../../../geometry/Geometry.h"
29 #include "../../../geometry/GeometryProperty.h"
30 #include "../../../datatype/DateTimeProperty.h"
31 #include "../../../datatype/DateTime.h"
32 #include "../../../datatype/DateTimeInstant.h"
33 #include "../../../datatype/DateTimePeriod.h"
42 m_validTimePropInfo(),
44 m_resultTimePropInfo(),
71 m_phTimePropInfo.clear();
75 m_phTimePropInfo.push_back(prop);
80 m_phTime.reset(dynamic_cast<te::dt::DateTime*>(rhs.
m_phTime->clone()));
82 m_validTimePropInfo.clear();
86 m_validTimePropInfo.push_back(prop);
91 m_validTime.reset(dynamic_cast<te::dt::DateTimePeriod*>(rhs.
m_validTime->clone()));
93 m_resultTimePropInfo.reset();
97 m_resultTimePropInfo.reset(propAux);
100 m_resultTime.reset();
102 m_resultTime.reset(dynamic_cast<te::dt::DateTimeInstant*>(rhs.
m_resultTime->clone()));
107 m_geomPropInfo.reset();
111 m_geomPropInfo.reset(prop);
116 m_geom.reset(dynamic_cast<te::gm::Geometry*>(rhs.
m_geom.get()->clone()));
122 m_spatialExtent.reset();
124 m_spatialExtent.reset(dynamic_cast<te::gm::Geometry*>(rhs.
m_spatialExtent.get()->clone()));
126 m_temporalExtent.reset();
128 m_temporalExtent.reset(dynamic_cast<te::dt::DateTimePeriod*>(rhs.
m_temporalExtent.get()->clone()));
140 m_phTimePropInfo.clear();
141 m_phTimePropInfo.push_back(std::auto_ptr<te::dt::DateTimeProperty>(tpInfo));
147 m_phTimePropInfo.clear();
148 m_phTimePropInfo.push_back(std::auto_ptr<te::dt::DateTimeProperty>(tpInfo1));
149 m_phTimePropInfo.push_back(std::auto_ptr<te::dt::DateTimeProperty>(tpInfo2));
159 m_validTimePropInfo.clear();
160 m_validTimePropInfo.push_back(std::auto_ptr<te::dt::DateTimeProperty>(tpInfo));
166 m_validTimePropInfo.clear();
167 m_validTimePropInfo.push_back(std::auto_ptr<te::dt::DateTimeProperty>(tpInfo1));
168 m_validTimePropInfo.push_back(std::auto_ptr<te::dt::DateTimeProperty>(tpInfo2));
173 m_validTime.reset(t);
178 m_resultTimePropInfo.reset(tpInfo);
183 m_resultTime.reset(t);
188 m_observedPropIdx = props;
193 m_observedPropName = props;
198 m_geomPropInfo.reset(prop);
208 m_idPropIndex = idProp;
213 m_idPropName = idProp;
223 m_spatialExtent.reset(se);
228 m_temporalExtent.reset(te);
233 return m_phTimePropInfo.size()>0;
238 return m_phTimePropInfo.size()==2;
243 return m_phTime.get()!=0;
248 return m_validTimePropInfo.size()>0;
253 return m_validTimePropInfo.size()==2;
258 return m_validTime.get()!=0;
263 return m_resultTimePropInfo.get()!=0;
268 return m_resultTime.get()!=0;
273 return m_geomPropInfo.get()!=0;
278 return m_geom.get()!=0;
283 if(m_idPropIndex >= 0 || !m_idPropName.empty())
290 return !m_id.empty();
295 return (m_spatialExtent.get()!=0);
300 return (m_temporalExtent.get()!=0);
313 return &m_phTimePropInfo[0];
321 return &m_phTimePropInfo[1];
328 return m_phTime.get();
335 return &m_validTimePropInfo[0];
342 if(hasTwoVlTimeProp())
343 return &m_validTimePropInfo[1];
350 return m_validTime.get();
356 return m_resultTimePropInfo.get();
362 return m_resultTime.get();
365 const std::vector<int>&
368 return m_observedPropIdx;
371 const std::vector<std::string>&
374 return m_observedPropName;
380 return m_geomPropInfo.get();
391 return m_idPropIndex;
407 if(hasTemporalExtent())
408 return m_temporalExtent.get();
415 if(hasSpatialExtent())
416 return m_spatialExtent.get();
424 return m_phTimePropInfo[0].getName();
432 return m_phTimePropInfo[1].getName();
439 return m_geomPropInfo->getName();
bool hasTwoVlTimeProp() const
boost::ptr_vector< te::dt::DateTimeProperty > m_validTimePropInfo
Valid time: information about the DataSet properties that contain the valid time. ...
std::string m_dsName
The DataSet name.
bool hasTemporalExtent() const
const te::dt::DateTimePeriod * getTemporalExtent() const
It returns the temporal extent of the observations.
const te::dt::DateTimeProperty * getEndTimePropInfo() const
It returns the DataSet property information that contains the phenomenon end time.
std::string getEndTimePropName() const
It returns the name of the DataSet property that contains the phenomenon end time.
std::auto_ptr< te::gm::GeometryProperty > m_geomPropInfo
Geometry: information about the property that has the observation spatial location.
const ObservationDataSetType & operator=(const ObservationDataSetType &rhs)
Assignment operator.
void setGeometry(te::gm::Geometry *geom)
It sets the geometry associated to all observations.
std::string getBeginTimePropName() const
It returns the name of the DataSet property that contains the phenomenon beginning time...
void setTime(te::dt::DateTime *t)
It sets the phenomenon time associated to all observations.
const te::dt::DateTimeProperty * getVlEndTimePropInfo() const
It returns the DataSet property information that contains the valid end time.
void setVlTimePropInfo(te::dt::DateTimeProperty *tpInfo)
It sets the property info that contains the valid time.
std::string getObsId() const
It returns the identifier associated to all observations.
void setDataSetName(const std::string &dsName)
It sets the DataSet name that contains the observations.
std::auto_ptr< te::gm::Geometry > m_spatialExtent
Spatial extent.
void setObsPropInfo(const std::vector< int > &props)
It sets the indexes of the DataSet properties that are observed over time.
void setGeomPropInfo(te::gm::GeometryProperty *prop)
It sets the info about the property that contains the observation location.
bool hasVlTimeProp() const
const te::dt::DateTimeProperty * getBeginTimePropInfo() const
It returns the DataSet property information that contains the phenomenon beginning time...
const te::gm::Geometry * getSpatialExtent() const
It returns the spatial extent of the observations.
const te::dt::DateTime * getTime() const
It returns the phenomenon time.
std::auto_ptr< te::dt::DateTimePeriod > m_validTime
Valid time: the valid time, when the time is not inside a DataSet.
void setTimePropInfo(te::dt::DateTimeProperty *tpInfo)
It sets the property info that contains the phenomenon beginning time.
std::auto_ptr< te::dt::DateTimeInstant > m_resultTime
Result time: the result time, when the time is not inside a DataSet.
virtual ~ObservationDataSetType()
Virtual destructor.
const te::gm::Geometry * getGeometry() const
It returns the geometry associated to all observations.
int getIdPropIdx() const
It returns the index of the property that contains identifiers that groups observations.
This file contains a class called ObservationDataSetType.
std::string m_idPropName
Id: the name of DataSet property that contain the id of each group of observation.
void setId(const std::string &id)
It sets the identifier associated to all observations.
void setIdPropInfo(int idProp)
It sets the index of the DataSet property that contains identifiers that groups the observations...
int m_idPropIndex
Id: the index of DataSet property that contain the id of each group of observation.
std::vector< int > m_observedPropIdx
Observed properties: the indexes of DataSet properties that are observed.
void setRsTimePropInfo(te::dt::DateTimeProperty *tpInfo)
It sets the property info that contains the result time.
std::string getGeomPropName() const
It returns the name of the property that is a geometry property.
bool hasTwoTimeProp() const
std::auto_ptr< te::dt::DateTime > m_phTime
Phenomenon time: the phenomenon time, when the time is not inside a DataSet.
boost::ptr_vector< te::dt::DateTimeProperty > m_phTimePropInfo
Phenomenon time: information about the DataSet properties that contain the phenomenon time...
const te::dt::DateTimePeriod * getVlTime() const
It returns the valid time.
ObservationDataSetType(const std::string &dsName)
Constructor.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
std::auto_ptr< te::gm::Geometry > m_geom
Geometry: the geometry, when the spatial location of the observations are not in the DataSet...
bool hasSpatialExtent() const
std::auto_ptr< te::dt::DateTimePeriod > m_temporalExtent
Temporal extent.
std::string getIdPropName() const
It returns the name of the property that contains identifiers that groups observations.
std::string m_id
Id: the id associated to all observations.
void setSpatialExtent(te::gm::Geometry *se)
It sets the spatial extent of all observations.
std::string getDataSetName() const
It returns the DataSet name.
std::vector< std::string > m_observedPropName
Observed properties: the names of DataSet properties that are observed.
An abstract class to represent a period of date and time.
void setTemporalExtent(te::dt::DateTimePeriod *te)
It sets the temporal extent of all observations.
The type for date and time types: date, date period, date duration, time duration, time instant, time period, time instant with time zone or time period with time zone.
void setRsTime(te::dt::DateTimeInstant *t)
It sets the result time associated to all observations.
A class that contains complemental DataSetType information about a DataSet that holds observations...
bool hasRsTimeProp() const
const te::dt::DateTimeInstant * getRsTime() const
It returns the result time.
const std::vector< int > & getObsPropIdxs() const
It returns the indexes of the DataSet properties that are observed over time.
const te::dt::DateTimeProperty * getVlBeginTimePropInfo() const
It returns the DataSet property information that contains the valid beginning time.
void setVlTime(te::dt::DateTimePeriod *t)
It sets the valid time associated to all observations.
const std::vector< std::string > & getObsPropNames() const
It returns the names of the DataSet properties that are observed over time.
const te::dt::DateTimeProperty * getRsTimePropInfo() const
It returns the DataSet property information that contains the result time.
std::auto_ptr< te::dt::DateTimeProperty > m_resultTimePropInfo
Result time: information about the DataSet property that contains the result time.
An abstract class to represent an instant of date and time.
const te::gm::GeometryProperty * getGeomPropInfo() const
It returns the DataSet property information that contains the geometry.