All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::graph::GraphMetadata Class Reference

Class used to define the graph metadata informations. More...

#include <GraphMetadata.h>

Inheritance diagram for te::graph::GraphMetadata:
te::graph::DataSourceGraphMetadata

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::DataSourcegetDataSource ()
 It returns the data source associated with this graph. More...
 
std::string getDescription ()
 It returns the the graph description. More...
 
virtual te::dt::PropertygetEdgeProperty (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::EnvelopegetEnvelope ()
 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::PropertygetVertexProperty (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)
 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 ()
 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 ()
 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...
 
bool m_memoryGraph
 Flag used to indicate if the graph is a memory graph. 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::DataSourcem_ds
 Data source attribute, has to be database information. More...
 
EdgePropertym_edgeProp
 Attribute that defines the edge properties. More...
 
te::gm::Envelopem_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...
 
VertexPropertym_vertexProp
 Attribute that defines the vertex properties. More...
 

Detailed Description

Class used to define the graph metadata informations.

See also
Enums, AbstractGraph

Definition at line 56 of file GraphMetadata.h.

Constructor & Destructor Documentation

te::graph::GraphMetadata::~GraphMetadata ( )
virtual

Default destructor.

Definition at line 49 of file GraphMetadata.cpp.

Member Function Documentation

void te::graph::GraphMetadata::addEdgeProperty ( te::dt::Property p)
virtual

Add a new property associated to the edge element.

param p New property to be associated with edge elements.

Note
It's important before using this function call the flush() function, its necessary to force the memory clear and the elements will be loaded with the right size of properties.

Reimplemented in te::graph::DataSourceGraphMetadata.

Definition at line 194 of file GraphMetadata.cpp.

Referenced by te::graph::DataSourceGraphMetadata::addEdgeProperty(), and te::graph::DataSourceGraphMetadata::loadEdgeAttr().

void te::graph::GraphMetadata::addVertexProperty ( te::dt::Property p)
virtual

Add a new property associated to the vertex element.

param p New property to be associated with vertex elements.

Note
It's important before using this function call the flush() function, its necessary to force the memory clear and the elements will be loaded with the right size of properties.

Reimplemented in te::graph::DataSourceGraphMetadata.

Definition at line 154 of file GraphMetadata.cpp.

Referenced by te::graph::DataSourceGraphMetadata::addVertexProperty(), te::sa::MinimumSpanningTree::createGraph(), and te::graph::DataSourceGraphMetadata::loadVertexAttr().

te::graph::GraphClass te::graph::GraphMetadata::getClass ( )

It returns the the graph class (defined in Enums file)

Returns
Enumerator value that defines the graph class

Definition at line 102 of file GraphMetadata.cpp.

te::da::DataSource * te::graph::GraphMetadata::getDataSource ( )

It returns the data source associated with this graph.

Returns
A pointer to a data source

Definition at line 117 of file GraphMetadata.cpp.

Referenced by te::graph::LayerRenderer::draw(), te::sa::SpatialWeightsExchanger::exportToGAL(), and te::sa::SpatialWeightsExchanger::exportToGWT().

std::string te::graph::GraphMetadata::getDescription ( )

It returns the the graph description.

Returns
String with the graph description

Definition at line 82 of file GraphMetadata.cpp.

te::dt::Property * te::graph::GraphMetadata::getEdgeProperty ( int  idx)
virtual

Get a edge property given a index.

Parameters
idxIndex of the property
Returns
A property associated to the edge element if the index is right and a null pointer in other case.

Definition at line 214 of file GraphMetadata.cpp.

Referenced by te::graph::QueryGraphBuilder::build(), te::sa::GPMWeightsAbstractStrategy::getDistanceAttributeIndex(), and te::graph::DataSourceGraphMetadata::removeEdgeProperty().

int te::graph::GraphMetadata::getEdgePropertySize ( )
virtual
std::string te::graph::GraphMetadata::getEdgeTableName ( )

It returns the edge table name that contains the vertex elements in data source.

Returns
String with the table name

Definition at line 138 of file GraphMetadata.cpp.

References te::graph::Edge_List, te::graph::Globals::sm_tableEdgeAttributeModelSufixName, te::graph::Globals::sm_tableEdgeModelSufixName, and te::graph::Vertex_List.

te::gm::Envelope * te::graph::GraphMetadata::getEnvelope ( )
virtual

Used to get the bounding box of the geometry elements associated with this graph.

Returns
The bounding box information

Definition at line 244 of file GraphMetadata.cpp.

int te::graph::GraphMetadata::getId ( )

It returns the graph id.

Returns
Integer value with the graph id

Definition at line 62 of file GraphMetadata.cpp.

std::string te::graph::GraphMetadata::getName ( )

It returns the graph name.

Returns
String with the graph name

Definition at line 72 of file GraphMetadata.cpp.

int te::graph::GraphMetadata::getSRID ( )
virtual

Used to get the SRID of the geometry elements associated with this graph.

Returns
Integer value that defines the SRID

Definition at line 234 of file GraphMetadata.cpp.

te::graph::GraphStorageMode te::graph::GraphMetadata::getStorageMode ( )

It returns the the graph storage mode (defined in Enums file)

Returns
Enumerator value that defines the graph storage mode

Definition at line 112 of file GraphMetadata.cpp.

std::string te::graph::GraphMetadata::getType ( )

It returns the graph type (defined in Enums file)

Returns
Enumerator value that defines the graph type

Definition at line 92 of file GraphMetadata.cpp.

Referenced by te::graph::BoxLoaderStrategy::loadDataByEdgeId(), te::graph::SequenceLoaderStrategy::loadDataByVertexId(), and te::graph::BoxLoaderStrategy::loadDataByVertexId().

te::dt::Property * te::graph::GraphMetadata::getVertexProperty ( int  idx)
virtual

Get a vertex property given a index.

Parameters
idxIndex of the property
Returns
A property associated to the vertex element if the index is right and a null pointer in other case.

Definition at line 174 of file GraphMetadata.cpp.

Referenced by te::graph::AddRasterAttribute::AddRasterAttribute(), te::graph::QueryGraphBuilder::build(), and te::graph::DataSourceGraphMetadata::removeVertexProperty().

int te::graph::GraphMetadata::getVertexPropertySize ( )
virtual

Used to verify the number of properties associated to vertex elements.

Returns
Integer value with the number of properties.

Definition at line 184 of file GraphMetadata.cpp.

Referenced by te::graph::AddRasterAttribute::AddRasterAttribute(), te::sa::AssociateGPMVertexAttribute(), te::sa::BoxMap(), te::sa::GStatistics(), te::sa::LISAMap(), te::sa::LisaStatisticalSignificance(), te::sa::LocalMean(), te::sa::MoranIndex(), te::sa::MoranMap(), and te::sa::ZAndWZ().

std::string te::graph::GraphMetadata::getVertexTableName ( )

It returns the vertex table name that contains the vertex elements in data source.

Returns
String with the table name

Definition at line 122 of file GraphMetadata.cpp.

References te::graph::Edge_List, te::graph::Globals::sm_tableVertexAttributeModelSufixName, te::graph::Globals::sm_tableVertexModelSufixName, and te::graph::Vertex_List.

virtual void te::graph::GraphMetadata::load ( int  id)
inlinevirtual

Function used to load the graph information given a graph id.

Parameters
idThe Graph identifier
Exceptions
ExceptionIt throws an exception if graph id equal -1

Reimplemented in te::graph::DataSourceGraphMetadata.

Definition at line 73 of file GraphMetadata.h.

Referenced by te::graph::BidirectionalGraphFactory::iOpen(), te::graph::UndirectedGraphFactory::iOpen(), te::graph::GraphFactory::iOpen(), and te::graph::DirectedGraphFactory::iOpen().

void te::graph::GraphMetadata::removeEdgeProperty ( int  idx)
virtual

Remove a property associated to the edge element.

Parameters
idxIndex of the property

Reimplemented in te::graph::DataSourceGraphMetadata.

Definition at line 204 of file GraphMetadata.cpp.

Referenced by te::graph::DataSourceGraphMetadata::removeEdgeProperty().

void te::graph::GraphMetadata::removeVertexProperty ( int  idx)
virtual

Remove a property associated to the vertex element.

Parameters
idxIndex of the property

Reimplemented in te::graph::DataSourceGraphMetadata.

Definition at line 164 of file GraphMetadata.cpp.

Referenced by te::graph::DataSourceGraphMetadata::removeVertexProperty().

virtual void te::graph::GraphMetadata::save ( )
inlinevirtual
void te::graph::GraphMetadata::setClass ( GraphClass  value)

Set the graph class (defined in Enums file)

Parameters
valueEnumerator value that defines the graph class

Definition at line 97 of file GraphMetadata.cpp.

void te::graph::GraphMetadata::setDescription ( std::string  desc)

Set the graph description.

Parameters
descString with the graph description

Definition at line 77 of file GraphMetadata.cpp.

Referenced by te::graph::AbstractGraphFactory::setMetadataInformation().

void te::graph::GraphMetadata::setEnvelope ( te::gm::Envelope extent)
virtual

Used to set the bounding box of the geometry elements associated with this graph.

Parameters
Thebounding box information

Definition at line 249 of file GraphMetadata.cpp.

void te::graph::GraphMetadata::setName ( std::string  name)

Set the graph name.

Parameters
nameString with the graph name

Definition at line 67 of file GraphMetadata.cpp.

Referenced by te::graph::AbstractGraphFactory::setMetadataInformation().

void te::graph::GraphMetadata::setSRID ( int  srid)
virtual

Used to set the SRID of the geometry elements associated with this graph.

Parameters
Integervalue that defines the SRID

Definition at line 239 of file GraphMetadata.cpp.

void te::graph::GraphMetadata::setStorageMode ( GraphStorageMode  value)

Set the graph storage mode (defined in Enums file)

Parameters
valueEnumerator value that defines the graph storage mode

Definition at line 107 of file GraphMetadata.cpp.

Referenced by te::graph::AbstractGraphFactory::setMetadataInformation().

void te::graph::GraphMetadata::setType ( std::string  graphType)

Set the graph type (defined in Enums file)

Parameters
valueEnumerator value that defines the graph type

Definition at line 87 of file GraphMetadata.cpp.

Referenced by te::graph::AbstractGraphFactory::make(), and te::graph::AbstractGraphFactory::open().

virtual void te::graph::GraphMetadata::update ( )
inlinevirtual

Function used to update the graph information on a data source.

Exceptions
ExceptionIt throws an exception if graph id equal -1

Reimplemented in te::graph::DataSourceGraphMetadata.

Definition at line 86 of file GraphMetadata.h.

Member Data Documentation

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().

te::graph::GraphClass te::graph::GraphMetadata::m_class
protected

Enum attribute used to defines the graph class.

Definition at line 306 of file GraphMetadata.h.

std::string te::graph::GraphMetadata::m_description
protected

Attribute used to describe a graph.

Definition at line 298 of file GraphMetadata.h.

te::da::DataSource* te::graph::GraphMetadata::m_ds
protected

Data source attribute, has to be database information.

Definition at line 310 of file GraphMetadata.h.

EdgeProperty* te::graph::GraphMetadata::m_edgeProp
protected

Attribute that defines the edge properties.

Definition at line 314 of file GraphMetadata.h.

te::gm::Envelope* te::graph::GraphMetadata::m_extent
protected

Attribute used to define the graph extent.

Definition at line 302 of file GraphMetadata.h.

int te::graph::GraphMetadata::m_id
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().

te::graph::GraphStorageMode te::graph::GraphMetadata::m_mode
protected

Enum attribute used to defines the storage mode.

Definition at line 308 of file GraphMetadata.h.

Referenced by te::graph::DataSourceGraphMetadata::DataSourceGraphMetadata().

std::string te::graph::GraphMetadata::m_name
protected

Attribute name.

Definition at line 296 of file GraphMetadata.h.

int te::graph::GraphMetadata::m_srid
protected

Attribute used to define the graph projection.

Definition at line 300 of file GraphMetadata.h.

std::string te::graph::GraphMetadata::m_type
protected

Enum attribute used to defines the graph type.

Definition at line 304 of file GraphMetadata.h.

VertexProperty* te::graph::GraphMetadata::m_vertexProp
protected

Attribute that defines the vertex properties.

Definition at line 312 of file GraphMetadata.h.


The documentation for this class was generated from the following files: