27 #include "../core/GraphMetadata.h"
28 #include "../Exception.h"
29 #include "../Globals.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(dsInfo, gInfo);
86 catch(
const std::exception& e)
88 std::string errorMessage =
TE_TR(
"Error opening graph metadata: ");
89 errorMessage += e.what();
91 throw Exception(errorMessage);
111 setMetadataInformation(gInfo, gMetadata);
117 catch(
const std::exception& e)
119 std::string errorMessage =
TE_TR(
"Error saving graph metadata: ");
120 errorMessage += e.what();
122 throw Exception(errorMessage);
te::graph::AbstractGraph * iOpen(const std::map< std::string, 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...
void getCreationalParameters(std::vector< std::pair< std::string, std::string > > ¶ms) const
It returns the list of parameters accepted as graph info.
static GraphFactory * sm_factory
Static instance used to register the factory.
#define TE_TR(message)
It marks a string in order to get translated.
static const std::string sm_factoryGraphTypeGraph
Graph Factory Name.
This class is used to set the main functions of a cache policy.
Abstract class used to define the main functions of graph struct. All graph implementations must used...
const std::string & getType() const
Returns the type (name) of this factory.
This is the concrete factory for the commun Graph type.
static void finalize()
It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the ...
This class define the main functions necessary to save and load the graph data and metadata informati...
This is the concrete factory for the commung Graph type.
GraphFactory()
Constructor.
This is the main graph implementation, that uses a cache policy anda graph loader to get all elements...
This is the abstract factory for Graphs.
static void initialize()
It initializes the factory: the singleton instance will be registered in the abstract factory ...
te::graph::AbstractGraph * create(const std::map< std::string, std::string > &dsInfo, const std::map< std::string, std::string > &gInfo)
This method must be implemented by subclasses (graph types).
te::graph::AbstractGraph * build()
Builder Function used to create the class object.
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...