Class used to define the graph metadata informations. More...
#include <GraphMetadata.h>
Public Member Functions | |
virtual void | addEdgeProperty (te::dt::Property *p) |
Add a new property associated to the edge element. More... | |
virtual void | addVertexProperty (te::dt::Property *p) |
Add a new property associated to the vertex element. More... | |
GraphClass | getClass () |
It returns the the graph class (defined in Enums file) More... | |
te::da::DataSource * | getDataSource () |
It returns the data source associated with this graph. More... | |
std::string | getDescription () |
It returns the the graph description. More... | |
virtual te::dt::Property * | getEdgeProperty (int idx) |
Get a edge property given a index. More... | |
virtual int | getEdgePropertySize () |
Used to verify the number of properties associated to edge elements. More... | |
std::string | getEdgeTableName () |
It returns the edge table name that contains the vertex elements in data source. More... | |
virtual te::gm::Envelope * | getEnvelope () |
Used to get the bounding box of the geometry elements associated with this graph. More... | |
int | getId () |
It returns the graph id. More... | |
std::string | getName () |
It returns the graph name. More... | |
virtual int | getSRID () |
Used to get the SRID of the geometry elements associated with this graph. More... | |
GraphStorageMode | getStorageMode () |
It returns the the graph storage mode (defined in Enums file) More... | |
std::string | getType () |
It returns the graph type (defined in Enums file) More... | |
virtual te::dt::Property * | getVertexProperty (int idx) |
Get a vertex property given a index. More... | |
virtual int | getVertexPropertySize () |
Used to verify the number of properties associated to vertex elements. More... | |
std::string | getVertexTableName () |
It returns the vertex table name that contains the vertex elements in data source. More... | |
GraphMetadata (te::da::DataSource *ds) | |
Default constructor. More... | |
virtual void | load (int id)=0 |
Function used to load the graph information given a graph id. More... | |
virtual void | removeEdgeProperty (int idx) |
Remove a property associated to the edge element. More... | |
virtual void | removeVertexProperty (int idx) |
Remove a property associated to the vertex element. More... | |
virtual void | save ()=0 |
Function used to save the graph information. More... | |
void | setClass (GraphClass value) |
Set the graph class (defined in Enums file) More... | |
void | setDescription (std::string desc) |
Set the graph description. More... | |
virtual void | setEnvelope (te::gm::Envelope &extent) |
Used to set the bounding box of the geometry elements associated with this graph. More... | |
void | setName (std::string name) |
Set the graph name. More... | |
virtual void | setSRID (int srid) |
Used to set the SRID of the geometry elements associated with this graph. More... | |
void | setStorageMode (GraphStorageMode value) |
Set the graph storage mode (defined in Enums file) More... | |
void | setType (std::string graphType) |
Set the graph type (defined in Enums file) More... | |
virtual void | update ()=0 |
Function used to update the graph information on a data source. More... | |
virtual | ~GraphMetadata () |
Default destructor. More... | |
Public Attributes | |
double | m_boxPercentSize |
Attribute used to box percent size used in loader strategy. More... | |
size_t | m_maxCacheSize |
Attribute used to set the max cache size. More... | |
size_t | m_maxVecCacheSize |
Attribute used to set the max vector cache size. More... | |
Protected Attributes | |
te::graph::GraphClass | m_class |
Enum attribute used to defines the graph class. More... | |
std::string | m_description |
Attribute used to describe a graph. More... | |
te::da::DataSource * | m_ds |
Data source attribute, has to be database information. More... | |
EdgeProperty * | m_edgeProp |
Attribute that defines the edge properties. More... | |
te::gm::Envelope * | m_extent |
Attribute used to define the graph extent. More... | |
int | m_id |
Attribute graph unique identifier. More... | |
te::graph::GraphStorageMode | m_mode |
Enum attribute used to defines the storage mode. More... | |
std::string | m_name |
Attribute name. More... | |
int | m_srid |
Attribute used to define the graph projection. More... | |
std::string | m_type |
Enum attribute used to defines the graph type. More... | |
VertexProperty * | m_vertexProp |
Attribute that defines the vertex properties. More... | |
Class used to define the graph metadata informations.
Definition at line 56 of file GraphMetadata.h.
te::graph::GraphMetadata::GraphMetadata | ( | te::da::DataSource * | ds | ) |
Default constructor.
Definition at line 34 of file GraphMetadata.cpp.
References m_boxPercentSize, m_maxCacheSize, m_maxVecCacheSize, te::graph::Globals::sm_boxLoaderStrategyDefaultSize, te::graph::Globals::sm_graphCacheDefaultMaxSize, and te::graph::Globals::sm_graphVecCacheDefaultMaxSize.
|
virtual |
Default destructor.
Definition at line 48 of file GraphMetadata.cpp.
|
virtual |
Add a new property associated to the edge element.
param p New property to be associated with edge elements.
Reimplemented in te::graph::DatabaseGraphMetadata.
Definition at line 192 of file GraphMetadata.cpp.
Referenced by te::graph::DatabaseGraphMetadata::addEdgeProperty(), and te::graph::DatabaseGraphMetadata::loadEdgeAttr().
|
virtual |
Add a new property associated to the vertex element.
param p New property to be associated with vertex elements.
Reimplemented in te::graph::DatabaseGraphMetadata.
Definition at line 152 of file GraphMetadata.cpp.
Referenced by te::graph::DatabaseGraphMetadata::addVertexProperty(), and te::graph::DatabaseGraphMetadata::loadVertexAttr().
te::graph::GraphClass te::graph::GraphMetadata::getClass | ( | ) |
It returns the the graph class (defined in Enums file)
Definition at line 100 of file GraphMetadata.cpp.
te::da::DataSource * te::graph::GraphMetadata::getDataSource | ( | ) |
It returns the data source associated with this graph.
Definition at line 115 of file GraphMetadata.cpp.
std::string te::graph::GraphMetadata::getDescription | ( | ) |
It returns the the graph description.
Definition at line 80 of file GraphMetadata.cpp.
|
virtual |
Get a edge property given a index.
idx | Index of the property |
Definition at line 212 of file GraphMetadata.cpp.
Referenced by te::graph::QueryGraphBuilder::build(), and te::graph::DatabaseGraphMetadata::removeEdgeProperty().
|
virtual |
Used to verify the number of properties associated to edge elements.
Definition at line 222 of file GraphMetadata.cpp.
std::string te::graph::GraphMetadata::getEdgeTableName | ( | ) |
It returns the edge table name that contains the vertex elements in data source.
Definition at line 136 of file GraphMetadata.cpp.
References te::graph::Edge_List, te::graph::Globals::sm_tableEdgeAttributeModelSufixName, te::graph::Globals::sm_tableEdgeModelSufixName, and te::graph::Vertex_List.
|
virtual |
Used to get the bounding box of the geometry elements associated with this graph.
Definition at line 242 of file GraphMetadata.cpp.
int te::graph::GraphMetadata::getId | ( | ) |
It returns the graph id.
Definition at line 60 of file GraphMetadata.cpp.
std::string te::graph::GraphMetadata::getName | ( | ) |
It returns the graph name.
Definition at line 70 of file GraphMetadata.cpp.
|
virtual |
Used to get the SRID of the geometry elements associated with this graph.
Definition at line 232 of file GraphMetadata.cpp.
te::graph::GraphStorageMode te::graph::GraphMetadata::getStorageMode | ( | ) |
It returns the the graph storage mode (defined in Enums file)
Definition at line 110 of file GraphMetadata.cpp.
std::string te::graph::GraphMetadata::getType | ( | ) |
It returns the graph type (defined in Enums file)
Definition at line 90 of file GraphMetadata.cpp.
Referenced by te::graph::BoxLoaderStrategy::loadDataByEdgeId(), te::graph::SequenceLoaderStrategy::loadDataByVertexId(), and te::graph::BoxLoaderStrategy::loadDataByVertexId().
|
virtual |
Get a vertex property given a index.
idx | Index of the property |
Definition at line 172 of file GraphMetadata.cpp.
Referenced by te::graph::AddRasterAttribute::AddRasterAttribute(), te::graph::QueryGraphBuilder::build(), and te::graph::DatabaseGraphMetadata::removeVertexProperty().
|
virtual |
Used to verify the number of properties associated to vertex elements.
Definition at line 182 of file GraphMetadata.cpp.
Referenced by te::graph::AddRasterAttribute::AddRasterAttribute().
std::string te::graph::GraphMetadata::getVertexTableName | ( | ) |
It returns the vertex table name that contains the vertex elements in data source.
Definition at line 120 of file GraphMetadata.cpp.
References te::graph::Edge_List, te::graph::Globals::sm_tableVertexAttributeModelSufixName, te::graph::Globals::sm_tableVertexModelSufixName, and te::graph::Vertex_List.
|
pure virtual |
Function used to load the graph information given a graph id.
id | The Graph identifier |
Exception | It throws an exception if graph id equal -1 |
Implemented in te::graph::DatabaseGraphMetadata.
|
virtual |
Remove a property associated to the edge element.
idx | Index of the property |
Reimplemented in te::graph::DatabaseGraphMetadata.
Definition at line 202 of file GraphMetadata.cpp.
Referenced by te::graph::DatabaseGraphMetadata::removeEdgeProperty().
|
virtual |
Remove a property associated to the vertex element.
idx | Index of the property |
Reimplemented in te::graph::DatabaseGraphMetadata.
Definition at line 162 of file GraphMetadata.cpp.
Referenced by te::graph::DatabaseGraphMetadata::removeVertexProperty().
|
pure virtual |
Function used to save the graph information.
Implemented in te::graph::DatabaseGraphMetadata.
void te::graph::GraphMetadata::setClass | ( | GraphClass | value | ) |
Set the graph class (defined in Enums file)
value | Enumerator value that defines the graph class |
Definition at line 95 of file GraphMetadata.cpp.
void te::graph::GraphMetadata::setDescription | ( | std::string | desc | ) |
Set the graph description.
desc | String with the graph description |
Definition at line 75 of file GraphMetadata.cpp.
Referenced by te::graph::BidirectionalGraphFactory::create(), te::graph::DirectedGraphFactory::create(), te::graph::GraphFactory::create(), and te::graph::UndirectedGraphFactory::create().
|
virtual |
Used to set the bounding box of the geometry elements associated with this graph.
The | bounding box information |
Definition at line 247 of file GraphMetadata.cpp.
void te::graph::GraphMetadata::setName | ( | std::string | name | ) |
Set the graph name.
name | String with the graph name |
Definition at line 65 of file GraphMetadata.cpp.
Referenced by te::graph::BidirectionalGraphFactory::create(), te::graph::DirectedGraphFactory::create(), te::graph::GraphFactory::create(), and te::graph::UndirectedGraphFactory::create().
|
virtual |
Used to set the SRID of the geometry elements associated with this graph.
Integer | value that defines the SRID |
Definition at line 237 of file GraphMetadata.cpp.
void te::graph::GraphMetadata::setStorageMode | ( | GraphStorageMode | value | ) |
Set the graph storage mode (defined in Enums file)
value | Enumerator value that defines the graph storage mode |
Definition at line 105 of file GraphMetadata.cpp.
Referenced by te::graph::BidirectionalGraphFactory::create(), te::graph::DirectedGraphFactory::create(), te::graph::GraphFactory::create(), and te::graph::UndirectedGraphFactory::create().
void te::graph::GraphMetadata::setType | ( | std::string | graphType | ) |
Set the graph type (defined in Enums file)
value | Enumerator value that defines the graph type |
Definition at line 85 of file GraphMetadata.cpp.
Referenced by te::graph::AbstractGraphFactory::make(), and te::graph::AbstractGraphFactory::open().
|
pure virtual |
Function used to update the graph information on a data source.
Exception | It throws an exception if graph id equal -1 |
Implemented in te::graph::DatabaseGraphMetadata.
double te::graph::GraphMetadata::m_boxPercentSize |
Attribute used to box percent size used in loader strategy.
Definition at line 321 of file GraphMetadata.h.
Referenced by GraphMetadata().
|
protected |
Enum attribute used to defines the graph class.
Definition at line 306 of file GraphMetadata.h.
|
protected |
Attribute used to describe a graph.
Definition at line 298 of file GraphMetadata.h.
|
protected |
Data source attribute, has to be database information.
Definition at line 310 of file GraphMetadata.h.
|
protected |
Attribute that defines the edge properties.
Definition at line 314 of file GraphMetadata.h.
|
protected |
Attribute used to define the graph extent.
Definition at line 302 of file GraphMetadata.h.
|
protected |
Attribute graph unique identifier.
Definition at line 294 of file GraphMetadata.h.
size_t te::graph::GraphMetadata::m_maxCacheSize |
Attribute used to set the max cache size.
Definition at line 319 of file GraphMetadata.h.
Referenced by GraphMetadata().
size_t te::graph::GraphMetadata::m_maxVecCacheSize |
Attribute used to set the max vector cache size.
Definition at line 320 of file GraphMetadata.h.
Referenced by GraphMetadata().
|
protected |
Enum attribute used to defines the storage mode.
Definition at line 308 of file GraphMetadata.h.
Referenced by te::graph::DatabaseGraphMetadata::DatabaseGraphMetadata().
|
protected |
Attribute name.
Definition at line 296 of file GraphMetadata.h.
|
protected |
Attribute used to define the graph projection.
Definition at line 300 of file GraphMetadata.h.
|
protected |
Enum attribute used to defines the graph type.
Definition at line 304 of file GraphMetadata.h.
|
protected |
Attribute that defines the vertex properties.
Definition at line 312 of file GraphMetadata.h.