te::graph::DataSourceGraphMetadata Class Reference

Class used to define the graph metadata informations over a SGBD source. More...

#include <DataSourceGraphMetadata.h>

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

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...
 
 DataSourceGraphMetadata (te::da::DataSource *ds)
 Default constructor. 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...
 
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...
 
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...
 
void update ()
 Function used to update the graph information on a data source. More...
 
 ~DataSourceGraphMetadata ()
 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 Member Functions

void addGraphAttrTableNewEntry ()
 Add a new graph attributes metadata information into the SGBD. More...
 
void addGraphTableNewEntry ()
 Add a new graph metadata information into the SGBD. More...
 
void createEdgeAttrTable ()
 Used when vertex_model is selected and edge objects has attributes associated. More...
 
void createGraphAttributesTable ()
 Function used to create the graph metadata attributes tables in a SGBD. More...
 
void createGraphMetadataTable ()
 Function used to create the graph metadata tables in a SGBD. More...
 
void createGraphTableEdgeModel ()
 Function used to create the edge model scheme of tables. More...
 
void createGraphTableVertexModel ()
 Function used to create the vertex model scheme of tables. More...
 
void createTable (std::string tableName, te::da::DataSetType *dt)
 Function used to create a table inside the SGBD. More...
 
void createVertexAttrTable ()
 Used when edge_model is selected and vertex objects has attributes associated. More...
 
bool isValidGraphName (std::string graphName)
 Verify if a graph name is valid. More...
 
void loadEdgeAttr (std::string tableName, std::string columnName)
 Load the edge attributes. More...
 
void loadGraphAttrInfo (int id)
 Function used to load the graph attributes information given a graph id. More...
 
void loadGraphInfo (int id)
 Function used to load the graph information given a graph id. More...
 
void loadVertexAttr (std::string tableName, std::string columnName)
 Load the vertex attributes. More...
 
void removeProperty (std::string tableName, std::string propertyName)
 Remove a property of a table in SGBD. More...
 
void saveGraphAttrTableNewEntry (int graphId, std::string tableName, std::string attrName, std::string linkColumn, te::graph::GraphAttrType type)
 Save each metadata attributes of vertex and eges into SGBD. More...
 
void saveProperty (std::string tableName, te::dt::Property *p)
 Save a property into a table in SGBD. More...
 
void updateGraphId ()
 

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 over a SGBD source.

See also
GraphMetadata, Enums

Definition at line 62 of file DataSourceGraphMetadata.h.

Constructor & Destructor Documentation

te::graph::DataSourceGraphMetadata::DataSourceGraphMetadata ( te::da::DataSource ds)

Default constructor.

te::graph::DataSourceGraphMetadata::~DataSourceGraphMetadata ( )

Default destructor.

Member Function Documentation

virtual void te::graph::DataSourceGraphMetadata::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 from te::graph::GraphMetadata.

void te::graph::DataSourceGraphMetadata::addGraphAttrTableNewEntry ( )
protected

Add a new graph attributes metadata information into the SGBD.

Note
Call the function saveGraphAttrTableNewEntry.
Exceptions
ExceptionIt throws an exception if execution fails
void te::graph::DataSourceGraphMetadata::addGraphTableNewEntry ( )
protected

Add a new graph metadata information into the SGBD.

Exceptions
ExceptionIt throws an exception if execution fails
virtual void te::graph::DataSourceGraphMetadata::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 from te::graph::GraphMetadata.

void te::graph::DataSourceGraphMetadata::createEdgeAttrTable ( )
protected

Used when vertex_model is selected and edge objects has attributes associated.

Exceptions
ExceptionIt throws an exception if execution fails
void te::graph::DataSourceGraphMetadata::createGraphAttributesTable ( )
protected

Function used to create the graph metadata attributes tables in a SGBD.

Exceptions
ExceptionIt throws an exception if execution fails
void te::graph::DataSourceGraphMetadata::createGraphMetadataTable ( )
protected

Function used to create the graph metadata tables in a SGBD.

Exceptions
ExceptionIt throws an exception if execution fails
void te::graph::DataSourceGraphMetadata::createGraphTableEdgeModel ( )
protected

Function used to create the edge model scheme of tables.

Exceptions
ExceptionIt throws an exception if execution fails
void te::graph::DataSourceGraphMetadata::createGraphTableVertexModel ( )
protected

Function used to create the vertex model scheme of tables.

Note
NOT IN USE
Exceptions
ExceptionIt throws an exception if execution fails
void te::graph::DataSourceGraphMetadata::createTable ( std::string  tableName,
te::da::DataSetType dt 
)
protected

Function used to create a table inside the SGBD.

Parameters
tableNameString with the table name
dtStruct that defines each column of the table
Exceptions
ExceptionIt throws an exception if execution fails
void te::graph::DataSourceGraphMetadata::createVertexAttrTable ( )
protected

Used when edge_model is selected and vertex objects has attributes associated.

Exceptions
ExceptionIt throws an exception if execution fails
GraphClass te::graph::GraphMetadata::getClass ( )
inherited

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

Returns
Enumerator value that defines the graph class
te::da::DataSource* te::graph::GraphMetadata::getDataSource ( )
inherited

It returns the data source associated with this graph.

Returns
A pointer to a data source
std::string te::graph::GraphMetadata::getDescription ( )
inherited

It returns the the graph description.

Returns
String with the graph description
virtual te::dt::Property* te::graph::GraphMetadata::getEdgeProperty ( int  idx)
virtualinherited

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

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

Returns
Integer value with the number of properties.
std::string te::graph::GraphMetadata::getEdgeTableName ( )
inherited

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

Returns
String with the table name
virtual te::gm::Envelope* te::graph::GraphMetadata::getEnvelope ( )
virtualinherited

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

Returns
The bounding box information
int te::graph::GraphMetadata::getId ( )
inherited

It returns the graph id.

Returns
Integer value with the graph id
std::string te::graph::GraphMetadata::getName ( )
inherited

It returns the graph name.

Returns
String with the graph name
virtual int te::graph::GraphMetadata::getSRID ( )
virtualinherited

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

Returns
Integer value that defines the SRID
GraphStorageMode te::graph::GraphMetadata::getStorageMode ( )
inherited

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

Returns
Enumerator value that defines the graph storage mode
std::string te::graph::GraphMetadata::getType ( )
inherited

It returns the graph type (defined in Enums file)

Returns
Enumerator value that defines the graph type
virtual te::dt::Property* te::graph::GraphMetadata::getVertexProperty ( int  idx)
virtualinherited

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

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

Returns
Integer value with the number of properties.
std::string te::graph::GraphMetadata::getVertexTableName ( )
inherited

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

Returns
String with the table name
bool te::graph::DataSourceGraphMetadata::isValidGraphName ( std::string  graphName)
protected

Verify if a graph name is valid.

void te::graph::DataSourceGraphMetadata::load ( int  id)
virtual

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 from te::graph::GraphMetadata.

void te::graph::DataSourceGraphMetadata::loadEdgeAttr ( std::string  tableName,
std::string  columnName 
)
protected

Load the edge attributes.

Parameters
tableNameThe table name that contains the edge attributes
columnNameThe column name that contins the attribute information
void te::graph::DataSourceGraphMetadata::loadGraphAttrInfo ( int  id)
protected

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

Parameters
idThe graph id
void te::graph::DataSourceGraphMetadata::loadGraphInfo ( int  id)
protected

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

Parameters
idThe graph id
void te::graph::DataSourceGraphMetadata::loadVertexAttr ( std::string  tableName,
std::string  columnName 
)
protected

Load the vertex attributes.

Parameters
tableNameThe table name that contains the vertex attributes
columnNameThe column name that contins the attribute information
virtual void te::graph::DataSourceGraphMetadata::removeEdgeProperty ( int  idx)
virtual

Remove a property associated to the edge element.

Parameters
idxIndex of the property

Reimplemented from te::graph::GraphMetadata.

void te::graph::DataSourceGraphMetadata::removeProperty ( std::string  tableName,
std::string  propertyName 
)
protected

Remove a property of a table in SGBD.

Parameters
tableNameThe table name that contains this property
propertyNameThe property name to be removed
Exceptions
ExceptionIt throws an exception if execution fails
virtual void te::graph::DataSourceGraphMetadata::removeVertexProperty ( int  idx)
virtual

Remove a property associated to the vertex element.

Parameters
idxIndex of the property

Reimplemented from te::graph::GraphMetadata.

void te::graph::DataSourceGraphMetadata::save ( )
virtual

Function used to save the graph information.

Reimplemented from te::graph::GraphMetadata.

void te::graph::DataSourceGraphMetadata::saveGraphAttrTableNewEntry ( int  graphId,
std::string  tableName,
std::string  attrName,
std::string  linkColumn,
te::graph::GraphAttrType  type 
)
protected

Save each metadata attributes of vertex and eges into SGBD.

Parameters
graphIdThe graph id associated with this attribute
tableNameThe table name that contains this attribute
attrNameThe attribute name
linkColumnThe link column name used to associate this attribute to the element (vertex or edge)
typeThe attribute type ( is vertex or edge attribute)
Exceptions
ExceptionIt throws an exception if execution fails
void te::graph::DataSourceGraphMetadata::saveProperty ( std::string  tableName,
te::dt::Property p 
)
protected

Save a property into a table in SGBD.

Parameters
tableNameThe table name that will contains this property
pThe property to be saved
Exceptions
ExceptionIt throws an exception if execution fails
void te::graph::GraphMetadata::setClass ( GraphClass  value)
inherited

Set the graph class (defined in Enums file)

Parameters
valueEnumerator value that defines the graph class
void te::graph::GraphMetadata::setDescription ( std::string  desc)
inherited

Set the graph description.

Parameters
descString with the graph description
virtual void te::graph::GraphMetadata::setEnvelope ( te::gm::Envelope extent)
virtualinherited

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

Parameters
Thebounding box information
void te::graph::GraphMetadata::setName ( std::string  name)
inherited

Set the graph name.

Parameters
nameString with the graph name
virtual void te::graph::GraphMetadata::setSRID ( int  srid)
virtualinherited

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

Parameters
Integervalue that defines the SRID
void te::graph::GraphMetadata::setStorageMode ( GraphStorageMode  value)
inherited

Set the graph storage mode (defined in Enums file)

Parameters
valueEnumerator value that defines the graph storage mode
void te::graph::GraphMetadata::setType ( std::string  graphType)
inherited

Set the graph type (defined in Enums file)

Parameters
valueEnumerator value that defines the graph type
void te::graph::DataSourceGraphMetadata::update ( )
virtual

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

Exceptions
ExceptionIt throws an exception if graph id equal -1

Reimplemented from te::graph::GraphMetadata.

void te::graph::DataSourceGraphMetadata::updateGraphId ( )
protected

Member Data Documentation

double te::graph::GraphMetadata::m_boxPercentSize
inherited

Attribute used to box percent size used in loader strategy.

Definition at line 321 of file GraphMetadata.h.

te::graph::GraphClass te::graph::GraphMetadata::m_class
protectedinherited

Enum attribute used to defines the graph class.

Definition at line 306 of file GraphMetadata.h.

std::string te::graph::GraphMetadata::m_description
protectedinherited

Attribute used to describe a graph.

Definition at line 298 of file GraphMetadata.h.

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

Data source attribute, has to be database information.

Definition at line 310 of file GraphMetadata.h.

EdgeProperty* te::graph::GraphMetadata::m_edgeProp
protectedinherited

Attribute that defines the edge properties.

Definition at line 314 of file GraphMetadata.h.

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

Attribute used to define the graph extent.

Definition at line 302 of file GraphMetadata.h.

int te::graph::GraphMetadata::m_id
protectedinherited

Attribute graph unique identifier.

Definition at line 294 of file GraphMetadata.h.

size_t te::graph::GraphMetadata::m_maxCacheSize
inherited

Attribute used to set the max cache size.

Definition at line 319 of file GraphMetadata.h.

size_t te::graph::GraphMetadata::m_maxVecCacheSize
inherited

Attribute used to set the max vector cache size.

Definition at line 320 of file GraphMetadata.h.

bool te::graph::GraphMetadata::m_memoryGraph
inherited

Flag used to indicate if the graph is a memory graph.

Definition at line 323 of file GraphMetadata.h.

te::graph::GraphStorageMode te::graph::GraphMetadata::m_mode
protectedinherited

Enum attribute used to defines the storage mode.

Definition at line 308 of file GraphMetadata.h.

std::string te::graph::GraphMetadata::m_name
protectedinherited

Attribute name.

Definition at line 296 of file GraphMetadata.h.

int te::graph::GraphMetadata::m_srid
protectedinherited

Attribute used to define the graph projection.

Definition at line 300 of file GraphMetadata.h.

std::string te::graph::GraphMetadata::m_type
protectedinherited

Enum attribute used to defines the graph type.

Definition at line 304 of file GraphMetadata.h.

VertexProperty* te::graph::GraphMetadata::m_vertexProp
protectedinherited

Attribute that defines the vertex properties.

Definition at line 312 of file GraphMetadata.h.


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