27 #include "../core/GraphMetadata.h" 28 #include "../Globals.h" 29 #include "../Exception.h" 45 params.push_back(std::pair<std::string, std::string>(
"GRAPH_DATA_SOURCE_TYPE",
""));
46 params.push_back(std::pair<std::string, std::string>(
"GRAPH_ID",
""));
47 params.push_back(std::pair<std::string, std::string>(
"GRAPH_NAME",
""));
48 params.push_back(std::pair<std::string, std::string>(
"GRAPH_DESCRIPTION",
""));
49 params.push_back(std::pair<std::string, std::string>(
"GRAPH_STORAGE_MODE",
""));
50 params.push_back(std::pair<std::string, std::string>(
"GRAPH_STRATEGY_LOADER",
""));
51 params.push_back(std::pair<std::string, std::string>(
"GRAPH_CACHE_POLICY",
""));
80 int id =
getId(gInfo);
86 catch(
const std::exception& e)
88 std::string errorMessage =
TE_TR(
"Error opening graph metadata: ");
89 errorMessage += e.what();
117 catch(
const std::exception& e)
119 std::string errorMessage =
TE_TR(
"Error saving graph metadata: ");
120 errorMessage += e.what();
static te::graph::AbstractGraphLoaderStrategy * getLoaderStrategy(const std::map< std::string, std::string > &gInfo, te::graph::GraphMetadata *metadata)
This method is a auxiliar function used to get the loader strategy pointer.
void getCreationalParameters(std::vector< std::pair< std::string, std::string > > ¶ms) const
It returns the list of parameters accepted as graph info.
This is a implementation of a Bidirectional Graph. By convention a bidirectional graph provides acces...
static void setMetadataInformation(const std::map< std::string, std::string > &gInfo, te::graph::GraphMetadata *metadata)
Base exception class for plugin module.
static int getId(const std::map< std::string, std::string > &gInfo)
This method is a auxiliar function used to get the graph id.
const std::string & getType() const
Returns the type (name) of this factory.
te::graph::AbstractGraph * create(const std::string &dsInfo, const std::map< std::string, std::string > &gInfo)
This method must be implemented by subclasses (graph types).
static te::graph::GraphMetadata * getMetadata(const std::string &dsInfo, const std::map< std::string, std::string > &gInfo)
This method is a auxiliar function used to get the metadata pointer.
#define TE_TR(message)
It marks a string in order to get translated.
This class is used to set the main functions of a cache policy.
This is the concrete factory for the bidirectional Graph type.
te::graph::AbstractGraph * build()
Builder Function used to create the class object.
Abstract class used to define the main functions of graph struct. All graph implementations must used...
This class define the main functions necessary to save and load the graph data and metadata informati...
This is the abstract factory for Graphs.
static void finalize()
It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the ...
static const std::string sm_factoryGraphTypeBidirectionalGraph
Bidirectional Graph Factory Name.
static void initialize()
It initializes the factory: the singleton instance will be registered in the abstract factory ...
This is a implementation of a Bidirectional Graph. By convention a bidirectional graph provides acces...
static BidirectionalGraphFactory * sm_factory
Static instance used to register the factory.
BidirectionalGraphFactory()
Constructor.
An static class with global definitions for the TerraLib Graph Module.
This is the main graph implementation, that uses a cache policy anda graph loader to get all elements...
te::graph::AbstractGraph * iOpen(const std::string &dsInfo, const std::map< std::string, std::string > &gInfo)
This method must be re-implemented by subclasses in order to have a finner control for the graph obje...
static te::graph::AbstractCachePolicy * getCachePolicy(const std::map< std::string, std::string > &gInfo)
This method is a auxiliar function used to get the cache policy pointer.