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(gInfo);
87 catch(
const std::exception& e)
89 std::string errorMessage =
TE_TR(
"Error opening graph metadata: ");
90 errorMessage += e.what();
118 catch(
const std::exception& e)
120 std::string errorMessage =
TE_TR(
"Error saving graph metadata: ");
121 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)
static void initialize()
It initializes the factory: the singleton instance will be registered in the abstract factory ...
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.
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.
void getCreationalParameters(std::vector< std::pair< std::string, std::string > > ¶ms) const
It returns the list of parameters accepted as graph info.
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...
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...
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...
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.
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.
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).
This is a implementation of a Directed Graph. By convention a directed graph provides access to out-e...