27 #include "../core/GraphMetadata.h"
28 #include "../Exception.h"
29 #include "../Globals.h"
46 params.push_back(std::pair<std::string, std::string>(
"GRAPH_DATA_SOURCE_TYPE",
""));
47 params.push_back(std::pair<std::string, std::string>(
"GRAPH_ID",
""));
48 params.push_back(std::pair<std::string, std::string>(
"GRAPH_NAME",
""));
49 params.push_back(std::pair<std::string, std::string>(
"GRAPH_DESCRIPTION",
""));
50 params.push_back(std::pair<std::string, std::string>(
"GRAPH_STORAGE_MODE",
""));
51 params.push_back(std::pair<std::string, std::string>(
"GRAPH_STRATEGY_LOADER",
""));
52 params.push_back(std::pair<std::string, std::string>(
"GRAPH_CACHE_POLICY",
""));
81 int id = getId(dsInfo, gInfo);
87 catch(
const std::exception& e)
89 std::string errorMessage =
TE_TR(
"Error opening graph metadata: ");
90 errorMessage += e.what();
92 throw Exception(errorMessage);
112 setMetadataInformation(gInfo, gMetadata);
118 catch(
const std::exception& e)
120 std::string errorMessage =
TE_TR(
"Error saving graph metadata: ");
121 errorMessage += e.what();
123 throw Exception(errorMessage);
static void initialize()
It initializes the factory: the singleton instance will be registered in the abstract factory ...
#define TE_TR(message)
It marks a string in order to get translated.
void getCreationalParameters(std::vector< std::pair< std::string, std::string > > ¶ms) const
It returns the list of parameters accepted as graph info.
This is the concrete factory for the directed Graph type.
te::graph::AbstractGraph * build()
Builder Function used to create the class object.
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...
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).
const std::string & getType() const
Returns the type (name) of this factory.
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 const std::string sm_factoryGraphTypeDirectedGraph
Directed Graph Factory Name.
static void finalize()
It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the ...
DirectedGraphFactory()
Constructor.
This is a implementation of a Directed Graph. By convention a directed graph provides access to out-e...
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...
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...
This is the concrete factory for the directed Graph type.
static DirectedGraphFactory * sm_factory
Static instance used to register the factory.
This is a implementation of a Directed Graph. By convention a directed graph provides access to out-e...