26 #ifndef __TERRALIB_DATAACCESS_INTERNAL_DATASOURCECATALOG_H 
   27 #define __TERRALIB_DATAACCESS_INTERNAL_DATASOURCECATALOG_H 
   30 #include "../Config.h" 
   31 #include "../dataset/DataSetType.h" 
   39 #include <boost/multi_index_container.hpp> 
   40 #include <boost/multi_index/mem_fun.hpp> 
   41 #include <boost/multi_index/ordered_index.hpp> 
   42 #include <boost/multi_index/random_access_index.hpp> 
   43 #include <boost/noncopyable.hpp> 
   48   namespace dt { 
class Property; }
 
   90         unsigned int getId() 
const;
 
  100         void setId(
unsigned int id);
 
  135         std::size_t getNumberOfDataSets() 
const;
 
  144         bool datasetExists(
const std::string& name) 
const;
 
  172         void remove(
DataSetType* dt, 
const bool cascade = 
false);
 
  189         void rename(
DataSetType* dt, 
const std::string& newName);
 
  211         const DataSetTypePtr& getDataSetType(
const std::string& name) 
const;
 
  225         std::size_t getNumberOfSequences() 
const;
 
  281         Sequence* getSequence(std::size_t i) 
const;
 
  292         Sequence* getSequence(
const std::string& name) 
const;
 
  338         std::pair<std::multimap<DataSetType*, ForeignKey*>::const_iterator,
 
  339                   std::multimap<DataSetType*, ForeignKey*>::const_iterator>
 
  368         void checkSequenceDependency(
Sequence* s) 
const;
 
  382         void indexSequenceDependency(
Sequence* s);
 
  402         void dropDependentSequenceEntry(
Sequence* s);
 
  453         typedef boost::multi_index::multi_index_container<
 
  455                   boost::multi_index::indexed_by<
 
  456                     boost::multi_index::ordered_unique<dataset_name_cmp>,
 
  457                     boost::multi_index::random_access<>
 
  468         typedef boost::multi_index::multi_index_container<
 
  470                   boost::multi_index::indexed_by<
 
  471                     boost::multi_index::ordered_unique<sequence_name_cmp>,
 
  472                     boost::multi_index::random_access<>
 
  482         std::multimap<DataSetType*, sequence_idx_type::iterator> 
m_seqFTIdx;    
 
  529 #endif  // __TERRALIB_DATAACCESS_INTERNAL_DATASOURCECATALOG_H 
void setDataSource(DataSource *ds)
It sets the DataSource associated to the catalog. 
 
std::multimap< DataSetType *, ForeignKey * > m_dependentFkIdx
A multimap : datasettype -> fk. It tells for a DataSetType the list of fk referencing it...
 
boost::shared_ptr< DataSetType > DataSetTypePtr
 
It represents the system catalog of a DataSource. 
 
A class that models the description of a dataset. 
 
It describes a sequence (a number generator). 
 
std::size_t getNumberOfDataSets() const 
It returns the number of datasets in the catalog. 
 
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
 
It models a property definition. 
 
boost::multi_index::multi_index_container< Sequence *, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< sequence_name_cmp >, boost::multi_index::random_access<> > > sequence_idx_type
 
DataSource * getDataSource() const 
It returns the DataSource associated to the catalog. 
 
boost::multi_index::multi_index_container< DataSetTypePtr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< dataset_name_cmp >, boost::multi_index::random_access<> > > dataset_idx_type
 
boost::shared_ptr< DataSourceCatalog > DataSourceCatalogPtr
 
unsigned int getId() const 
It returns the catalog identifier. 
 
DataSource * m_ds
The DataSource associated to the Catalog. 
 
std::multimap< DataSetType *, sequence_idx_type::iterator > m_seqFTIdx
A multimap : owner-dt -> sequence-it. 
 
It models a foreign key constraint for a DataSetType. 
 
unsigned int m_id
An identification number inside the DataSource. 
 
std::size_t getNumberOfSequences() const 
It returns the number of sequences in the catalog. 
 
dataset_idx_type m_datasets
 
static DataSetTypePtr sm_nullds
 
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module. 
 
sequence_idx_type m_sequences
 
void setId(unsigned int id)
It sets the catalog identifier. 
 
std::pair< std::multimap< DataSetType *, ForeignKey * >::const_iterator, std::multimap< DataSetType *, ForeignKey * >::const_iterator > getRefFK(DataSetType *dt) const 
It returns the list of fk referencing the given DataSetType in the catalog.