26 #ifndef __TERRALIB_DATAACCESS_INTERNAL_DATASETTYPE_H
27 #define __TERRALIB_DATAACCESS_INTERNAL_DATASETTYPE_H
30 #include "../../datatype/CompositeProperty.h"
31 #include "../Config.h"
37 #include <boost/shared_ptr.hpp>
44 class CheckConstraint;
46 class DataSourceCatalog;
76 using CompositeProperty::add;
77 using CompositeProperty::getPropertyPosition;
94 DataSetType(
const std::string& name,
unsigned int id = 0);
130 const std::string&
getTitle()
const {
return m_title; }
137 void setTitle(
const std::string& title) { m_title = title; }
144 bool hasGeom()
const;
151 bool hasRaster()
const;
281 void add(
const std::vector<UniqueKey*>& uks);
303 UniqueKey* getUniqueKey(
const std::string& name)
const;
317 void clearUniqueKeys();
343 void add(
const std::vector<CheckConstraint*>& ccs);
377 void clearCheckConstraints();
403 void add(
Index* idx);
415 void add(
const std::vector<Index*>& idxs);
437 Index* getIndex(
const std::string& name)
const;
450 void remove(
Index* idx);
489 ForeignKey* getForeignKey(
const std::string& name)
const;
550 void remove(Property* p);
574 void replace(Property* p, Property* pp);
600 Property* clone()
const;
616 void removeUniqueKeys(Property* p);
623 void removeIndexes(Property* p);
637 void removeForeignKeys(Property* p);
668 #endif // __TERRALIB_DATAACCESS_INTERNAL_DATASETTYPE_H
DataSourceCatalog * getCatalog() const
It returns the catalog that owns the DataSetType.
void setTitle(const std::string &title)
It sets a human descriptive title for the DataSetType.
A base class for a compound property (non-atomic properties).
void setCatalog(DataSourceCatalog *catalog)
It sets the DataSetType associated catalog.
boost::shared_ptr< DataSetType > DataSetTypePtr
bool hasGeom() const
It returns true if the DataSetType has at least one geometry property; otherwise, it returns false...
It represents the system catalog of a DataSource.
PrimaryKey * m_pk
The DataSetType primary key.
A class that models the description of a dataset.
std::size_t getNumberOfUniqueKeys() const
It returns the number of unique keys defined for the dataset type.
CheckConstraint * getCheckConstraint(std::size_t i) const
It returns the i-th check-constraint associated to the dataset type.
int m_category
A category.
DataSourceCatalog * m_catalog
The associated catalog.
PrimaryKey * getPrimaryKey() const
It returns the primary key associated to the dataset type.
A class that describes a check constraint.
std::vector< ForeignKey * > m_foreignKeys
A vector of foreign key constraints.
Index * getIndex(std::size_t i) const
It returns the i-th index associated to the dataset type.
std::string m_title
A brief description of the DataSetType.
std::size_t getNumberOfForeignKeys() const
It returns the number of foreign keys defined for the dataset type.
bool hasRaster() const
It returns true if the DataSetType has at least one raster property; otherwise, it returns false...
std::size_t getNumberOfIndexes() const
It returns the number of indexes defined for the dataset type.
It models a foreign key constraint for a DataSetType.
int getCategory() const
It returns the dataset category.
It describes a unique key (uk) constraint.
bool hasPropertyOfType(const int t) const
Tells if there is a property of the given data type.
ForeignKey * getForeignKey(std::size_t i) const
It returns the i-th foreign key associated to the dataset type.
std::size_t getNumberOfCheckConstraints() const
It returns the number of check-constraints defined over the dataset type.
It describes a primary key (pk) constraint.
std::vector< CheckConstraint * > m_checkConstraints
A vector of check constraints.
std::vector< UniqueKey * > m_uniqueKeys
A vector of unique key constraints.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
std::vector< Index * > m_idxs
A vector of indexes.
void setCategory(int c)
It sets the dataset category.
It describes an index associated to a DataSetType.
UniqueKey * getUniqueKey(std::size_t i) const
It returns the i-th unique key.
const std::string & getTitle() const
A human descriptive title for the DataSetType.