26#ifndef __TERRALIB_DATAACCESS_INTERNAL_DATASETTYPE_H 
   27#define __TERRALIB_DATAACCESS_INTERNAL_DATASETTYPE_H 
   30#include "../../datatype/CompositeProperty.h" 
   37#include <boost/shared_ptr.hpp> 
   44    class CheckConstraint;
 
   46    class DataSourceCatalog;
 
   76        using CompositeProperty::add;
 
   77        using CompositeProperty::getPropertyPosition;
 
  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);
 
  343        void add(
const std::vector<CheckConstraint*>& ccs);
 
  415        void add(
const std::vector<Index*>& idxs);
 
A class that describes a check constraint.
 
A class that models the description of a dataset.
 
PrimaryKey * getPrimaryKey() const
It returns the primary key associated to the dataset type.
 
std::size_t getNumberOfForeignKeys() const
It returns the number of foreign keys defined for the dataset type.
 
std::vector< CheckConstraint * > m_checkConstraints
A vector of check constraints.
 
void add(Constraint *c)
It adds a new constraint.
 
void removeForeignKeys(Property *p)
It removes all foreign keys that p takes part and all foreign keys that references p.
 
void setCategory(int c)
It sets the dataset category.
 
DataSourceCatalog * getCatalog() const
It returns the catalog that owns the DataSetType.
 
UniqueKey * getUniqueKey(std::size_t i) const
It returns the i-th unique key.
 
void add(const std::vector< CheckConstraint * > &ccs)
It adds the check constraints.
 
void remove(Constraint *c)
It removes the constraint.
 
void remove(Property *p)
It removes the Property.
 
Index * getIndex(const std::string &name) const
It returns an index with the given name or NULL if none is found.
 
PrimaryKey * m_pk
The DataSetType primary key.
 
void add(ForeignKey *fk)
It adds a new foreign key.
 
std::vector< ForeignKey * > m_foreignKeys
A vector of foreign key constraints.
 
bool hasRaster() const
It returns true if the DataSetType has at least one raster property; otherwise, it returns false.
 
std::string m_title
A brief description of the DataSetType.
 
int getCategory() const
It returns the dataset category.
 
Property * clone() const
It returns a clone of the object.
 
void remove(UniqueKey *uk)
It removes the unique key.
 
DataSetType(const DataSetType &rhs)
Copy constructor.
 
std::vector< UniqueKey * > m_uniqueKeys
A vector of unique key constraints.
 
std::size_t getNumberOfIndexes() const
It returns the number of indexes defined for the dataset type.
 
void removeIndexes(Property *p)
It removes all indexes related to the given Property.
 
std::size_t getNumberOfUniqueKeys() const
It returns the number of unique keys defined for the dataset type.
 
void add(const std::vector< UniqueKey * > &uks)
It adds the unique key constraints.
 
UniqueKey * getUniqueKey(const std::string &name) const
It returns a unique key with the given name or NULL if none is found.
 
ForeignKey * getForeignKey(std::size_t i) const
It returns the i-th foreign key associated to the dataset type.
 
Index * getIndex(std::size_t i) const
It returns the i-th index associated to the dataset type.
 
void clearCheckConstraints()
It removes all check constraints.
 
CheckConstraint * getCheckConstraint(std::size_t i) const
It returns the i-th check-constraint associated to the dataset type.
 
void remove(ForeignKey *fk)
It removes the foreign key.
 
DataSetType & operator=(const DataSetType &rhs)
Assignment operator not allowed.
 
CheckConstraint * getCheckConstraint(const std::string &name) const
It returns a check-constraint with the given name or NULL if none is found.
 
ForeignKey * getForeignKey(const std::string &name) const
It returns a foreign key with the given name or NULL if none is found.
 
void setTitle(const std::string &title)
It sets a human descriptive title for the DataSetType.
 
DataSetType(const std::string &name, unsigned int id=0)
It creates a new DataSetType not associated to any DataSetType or Catalog.
 
bool hasGeom() const
It returns true if the DataSetType has at least one geometry property; otherwise, it returns false.
 
void replace(Property *p, Property *pp)
It replaces the property p by pp and adjust all pointers inclusive in the catalog.
 
int m_category
A category.
 
void remove(Index *idx)
It removes the index.
 
void setCatalog(DataSourceCatalog *catalog)
It sets the DataSetType associated catalog.
 
void add(Index *idx)
It adds a new index.
 
DataSourceCatalog * m_catalog
The associated catalog.
 
void removeUniqueKeys(Property *p)
It removes all unique keys related to the given Property.
 
void remove(CheckConstraint *cc)
It removes the check constraint.
 
void add(const std::vector< Index * > &idxs)
It adds all the indexes.
 
void clearIndexes()
It removes all indexes from the dataset type.
 
const std::string & getTitle() const
A human descriptive title for the DataSetType.
 
void clearUniqueKeys()
It removes all unique keys from the dataset type.
 
std::size_t getNumberOfCheckConstraints() const
It returns the number of check-constraints defined over the dataset type.
 
void clear()
It clears the DataSetType definition.
 
std::vector< Index * > m_idxs
A vector of indexes.
 
void setPrimaryKey(PrimaryKey *pk)
It sets the primary key constraint.
 
It represents the system catalog of a DataSource.
 
It models a foreign key constraint for a DataSetType.
 
It describes an index associated to a DataSetType.
 
It describes a primary key (pk) constraint.
 
It describes a unique key (uk) constraint.
 
A base class for a compound property (non-atomic properties).
 
bool hasPropertyOfType(const int t) const
Tells if there is a property of the given data type.
 
boost::shared_ptr< DataSetType > DataSetTypePtr
 
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.