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(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.
static void setMetadataInformation(const std::map< std::string, std::string > &gInfo, te::graph::GraphMetadata *metadata)
te::graph::AbstractGraph * build()
Builder Function used to create the class object.
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.
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::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.
static const std::string sm_factoryGraphTypeUndirectedGraph
Undirected Graph Factory Name.
#define TE_TR(message)
It marks a string in order to get translated.
static void initialize()
It initializes the factory: the singleton instance will be registered in the abstract factory ...
const std::string & getType() const
Returns the type (name) of this factory.
This is the concrete factory for the undirected Graph type.
static void finalize()
It finalizes the factory: the singleton instance will be destroyed and will be unregistered from the ...
This class is used to set the main functions of a cache policy.
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).
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 concrete factory for the undirected Graph type.
This is the abstract factory for Graphs.
UndirectedGraphFactory()
Constructor.
static UndirectedGraphFactory * sm_factory
Static instance used to register the factory.
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 UndirectedGraph Graph. By definition a undirected graph has no directio...
This is a implementation of a UndirectedGraph Graph. By definition a undirected graph has no directio...
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...
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.