All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::md::MetadataManager Class Reference

This singleton defines the TerraLib metadata record manager entry. More...

#include <MetadataManager.h>

Inheritance diagram for te::md::MetadataManager:
te::common::Singleton< MetadataManager >

Public Member Functions

MetadataManager Accessor Method

Method used to access the data stored on this manager.

void insert (MetadataAnnotation *a)
 Inserts a new metadata annotation to the manager. More...
 
void erase (MetadataAnnotation *a)
 Removes the annotation from the manager and frees its resources. More...
 
const MetadataAnnotationfind (const std::string &aid) const
 Searches for an annotation, given its identification. More...
 
const std::map< std::string,
MetadataAnnotation * > & 
getAnnotations () const
 Gives access to the set of metadata annotations. More...
 
bool isEmpty () const
 Check wheter the manager is empty. More...
 
void clear ()
 Removes all the annotation from the manager. More...
 
const std::map< std::string,
MetadataAnnotation * >
::const_iterator 
getBeginIterator () const
 Returns a begin iterator to the annotations managed. More...
 
const std::map< std::string,
MetadataAnnotation * >
::const_iterator 
getEndIterator () const
 Returns an end iterator pointing to the annotations managed. More...
 

Static Public Member Functions

static MetadataManagergetInstance ()
 It returns a reference to the singleton instance. More...
 

Private Attributes

std::map< std::string,
MetadataAnnotation * > 
m_metadata
 

Friends

class te::common::Singleton< MetadataManager >
 

Initializer Methods

Methods related to instantiation and destruction.

 ~MetadataManager ()
 Destructor. More...
 
 MetadataManager ()
 It initializes the Singleton. More...
 

Detailed Description

This singleton defines the TerraLib metadata record manager entry.

Definition at line 49 of file MetadataManager.h.

Constructor & Destructor Documentation

te::md::MetadataManager::~MetadataManager ( )

Destructor.

Definition at line 37 of file MetadataManager.cpp.

te::md::MetadataManager::MetadataManager ( )
protected

It initializes the Singleton.

Definition at line 35 of file MetadataManager.cpp.

Member Function Documentation

void te::md::MetadataManager::clear ( )

Removes all the annotation from the manager.

Definition at line 95 of file MetadataManager.cpp.

void te::md::MetadataManager::erase ( MetadataAnnotation a)

Removes the annotation from the manager and frees its resources.

Parameters
aPointer to the annnotation to be removed. This pointer will be freed and invalidated.
Exceptions
te::md::ExceptionIf the annotation doesn't exist.

Definition at line 55 of file MetadataManager.cpp.

References te::md::MetadataAnnotation::getAnnotationtId(), and TE_TR.

const te::md::MetadataAnnotation * te::md::MetadataManager::find ( const std::string &  aid) const

Searches for an annotation, given its identification.

Parameters
aidThe name annotation identification.
Returns
A pointer to the annotation if found or NULL otherwise. Class maintains the ownership of returned pointer.

Definition at line 69 of file MetadataManager.cpp.

const std::map< std::string, te::md::MetadataAnnotation * > & te::md::MetadataManager::getAnnotations ( ) const

Gives access to the set of metadata annotations.

Returns
A const reference to the set of annotation indexed by it's id.

Definition at line 82 of file MetadataManager.cpp.

const std::map< std::string, te::md::MetadataAnnotation * >::const_iterator te::md::MetadataManager::getBeginIterator ( ) const

Returns a begin iterator to the annotations managed.

Definition at line 101 of file MetadataManager.cpp.

const std::map< std::string, te::md::MetadataAnnotation * >::const_iterator te::md::MetadataManager::getEndIterator ( ) const

Returns an end iterator pointing to the annotations managed.

Definition at line 107 of file MetadataManager.cpp.

static MetadataManager & te::common::Singleton< MetadataManager >::getInstance ( )
staticinherited

It returns a reference to the singleton instance.

Returns
A reference to the singleton instance.
void te::md::MetadataManager::insert ( MetadataAnnotation a)

Inserts a new metadata annotation to the manager.

Parameters
aPointer to the new metadata annotation. Class takes pointer ownership. Do not pass null.
Exceptions
te::md::ExceptionIf the annotation is already managed.

Definition at line 42 of file MetadataManager.cpp.

References te::md::MetadataAnnotation::getAnnotationtId(), and TE_TR.

bool te::md::MetadataManager::isEmpty ( ) const

Check wheter the manager is empty.

Returns
True if there is no annotation in the manager and false otherwise.

Definition at line 89 of file MetadataManager.cpp.

Friends And Related Function Documentation

friend class te::common::Singleton< MetadataManager >
friend

Definition at line 51 of file MetadataManager.h.

Member Data Documentation

std::map<std::string,MetadataAnnotation*> te::md::MetadataManager::m_metadata
private

Definition at line 133 of file MetadataManager.h.


The documentation for this class was generated from the following files: