Class used to define the graph metadata informations over a SGBD source. More...
#include <DataSourceGraphMetadata.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... | |
| DataSourceGraphMetadata (te::da::DataSource *ds) | |
| Default constructor. 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... | |
| 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::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 over a SGBD source.
Definition at line 62 of file DataSourceGraphMetadata.h.
| te::graph::DataSourceGraphMetadata::DataSourceGraphMetadata | ( | te::da::DataSource * | ds | ) |
Default constructor.
Definition at line 50 of file DataSourceGraphMetadata.cpp.
References te::graph::Edge_List, te::graph::GraphMetadata::m_mode, and ~DataSourceGraphMetadata().
|
default |
Default destructor.
Referenced by DataSourceGraphMetadata().
|
virtual |
Add a new property associated to the edge element.
param p New property to be associated with edge elements.
Reimplemented from te::graph::GraphMetadata.
Definition at line 157 of file DataSourceGraphMetadata.cpp.
References te::graph::GraphMetadata::addEdgeProperty(), te::graph::Edge_Attr, te::graph::GraphMetadata::getEdgeTableName(), te::graph::GraphMetadata::getId(), te::dt::Property::getName(), te::graph::GraphMetadata::getStorageMode(), saveGraphAttrTableNewEntry(), saveProperty(), te::graph::Globals::sm_tableEdgeModelAttrId, TE_TR, and te::graph::Vertex_List.
|
protected |
Add a new graph attributes metadata information into the SGBD.
| Exception | It throws an exception if execution fails |
Definition at line 481 of file DataSourceGraphMetadata.cpp.
References createGraphAttributesTable(), te::graph::Edge_Attr, te::graph::GraphMetadata::getEdgeProperty(), te::graph::GraphMetadata::getEdgePropertySize(), te::graph::GraphMetadata::getEdgeTableName(), te::graph::GraphMetadata::getId(), te::graph::GraphMetadata::getName(), te::graph::GraphMetadata::getVertexProperty(), te::graph::GraphMetadata::getVertexPropertySize(), te::graph::GraphMetadata::getVertexTableName(), saveGraphAttrTableNewEntry(), te::graph::Globals::sm_tableEdgeModelAttrId, te::graph::Globals::sm_tableVertexModelAttrId, and te::graph::Vertex_Attr.
Referenced by save().
|
protected |
Add a new graph metadata information into the SGBD.
| Exception | It throws an exception if execution fails |
Definition at line 438 of file DataSourceGraphMetadata.cpp.
References te::da::DataSource::add(), createGraphMetadataTable(), te::graph::Edge_List, te::da::DataSource::getDataSetType(), te::graph::GraphMetadata::getDescription(), te::graph::GraphMetadata::getEdgeTableName(), te::graph::GraphMetadata::getName(), te::graph::GraphMetadata::getStorageMode(), te::graph::GraphMetadata::getVertexTableName(), te::graph::GraphMetadata::m_ds, te::mem::DataSetItem::setInt32(), te::mem::DataSetItem::setString(), te::graph::Globals::sm_tableGraphName, updateGraphId(), and te::graph::Vertex_List.
Referenced by save().
|
virtual |
Add a new property associated to the vertex element.
param p New property to be associated with vertex elements.
Reimplemented from te::graph::GraphMetadata.
Definition at line 123 of file DataSourceGraphMetadata.cpp.
References te::graph::GraphMetadata::addVertexProperty(), createVertexAttrTable(), te::graph::GraphMetadata::getId(), te::dt::Property::getName(), te::graph::GraphMetadata::getVertexPropertySize(), te::graph::GraphMetadata::getVertexTableName(), saveGraphAttrTableNewEntry(), saveProperty(), te::graph::Globals::sm_tableVertexModelAttrId, and te::graph::Vertex_Attr.
|
protected |
Used when vertex_model is selected and edge objects has attributes associated.
| Exception | It throws an exception if execution fails |
Definition at line 414 of file DataSourceGraphMetadata.cpp.
References TE_TR.
Referenced by save().
|
protected |
Function used to create the graph metadata attributes tables in a SGBD.
| Exception | It throws an exception if execution fails |
Definition at line 235 of file DataSourceGraphMetadata.cpp.
References te::da::PrimaryKey::add(), te::da::Index::add(), te::da::DataSetType::add(), te::da::B_TREE_TYPE, createTable(), dt, te::dt::INT32_TYPE, te::dt::SimpleProperty::setAutoNumber(), te::dt::StringProperty::setSize(), te::graph::Globals::sm_tableAttributeAttrColumn, te::graph::Globals::sm_tableAttributeAttrGraphId, te::graph::Globals::sm_tableAttributeAttrId, te::graph::Globals::sm_tableAttributeAttrLink, te::graph::Globals::sm_tableAttributeAttrTable, te::graph::Globals::sm_tableAttributeAttrType, te::graph::Globals::sm_tableAttributeName, and te::dt::VAR_STRING.
Referenced by addGraphAttrTableNewEntry().
|
protected |
Function used to create the graph metadata tables in a SGBD.
| Exception | It throws an exception if execution fails |
Definition at line 191 of file DataSourceGraphMetadata.cpp.
References te::da::PrimaryKey::add(), te::da::Index::add(), te::da::DataSetType::add(), te::da::B_TREE_TYPE, createTable(), dt, te::dt::INT32_TYPE, te::dt::SimpleProperty::setAutoNumber(), te::dt::StringProperty::setSize(), te::graph::Globals::sm_tableGraphAttrDesc, te::graph::Globals::sm_tableGraphAttrId, te::graph::Globals::sm_tableGraphAttrName, te::graph::Globals::sm_tableGraphAttrTableName, te::graph::Globals::sm_tableGraphAttrType, te::graph::Globals::sm_tableGraphName, and te::dt::VAR_STRING.
Referenced by addGraphTableNewEntry().
|
protected |
Function used to create the edge model scheme of tables.
| Exception | It throws an exception if execution fails |
Definition at line 288 of file DataSourceGraphMetadata.cpp.
References te::da::PrimaryKey::add(), te::da::Index::add(), te::da::DataSetType::add(), te::da::B_TREE_TYPE, te::dt::Property::clone(), createTable(), dt, te::dt::GEOMETRY_TYPE, te::graph::GraphMetadata::getEdgeProperty(), te::graph::GraphMetadata::getEdgePropertySize(), te::graph::GraphMetadata::getName(), te::dt::Property::getType(), te::dt::INT32_TYPE, p, te::da::R_TREE_TYPE, te::dt::SimpleProperty::setAutoNumber(), te::dt::Property::setParent(), te::graph::Globals::sm_tableEdgeModelAttrId, te::graph::Globals::sm_tableEdgeModelAttrVFrom, te::graph::Globals::sm_tableEdgeModelAttrVTo, and te::graph::Globals::sm_tableEdgeModelSufixName.
Referenced by save().
|
protected |
Function used to create the vertex model scheme of tables.
| Exception | It throws an exception if execution fails |
Definition at line 283 of file DataSourceGraphMetadata.cpp.
References TE_TR.
Referenced by save().
|
protected |
Function used to create a table inside the SGBD.
| tableName | String with the table name |
| dt | Struct that defines each column of the table |
| Exception | It throws an exception if execution fails |
Definition at line 419 of file DataSourceGraphMetadata.cpp.
References te::da::DataSource::createDataSet(), te::da::DataSource::dataSetExists(), dt, and te::graph::GraphMetadata::m_ds.
Referenced by createGraphAttributesTable(), createGraphMetadataTable(), createGraphTableEdgeModel(), and createVertexAttrTable().
|
protected |
Used when edge_model is selected and vertex objects has attributes associated.
| Exception | It throws an exception if execution fails |
Definition at line 361 of file DataSourceGraphMetadata.cpp.
References te::da::PrimaryKey::add(), te::da::Index::add(), te::da::DataSetType::add(), te::da::B_TREE_TYPE, te::dt::Property::clone(), createTable(), dt, te::dt::GEOMETRY_TYPE, te::graph::GraphMetadata::getName(), te::dt::Property::getType(), te::graph::GraphMetadata::getVertexProperty(), te::graph::GraphMetadata::getVertexPropertySize(), te::dt::INT32_TYPE, p, te::da::R_TREE_TYPE, te::dt::SimpleProperty::setAutoNumber(), te::dt::Property::setParent(), te::graph::Globals::sm_tableVertexAttributeModelSufixName, and te::graph::Globals::sm_tableVertexModelAttrId.
Referenced by addVertexProperty(), and save().
|
inherited |
It returns the the graph class (defined in Enums file)
Definition at line 104 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_class.
|
inherited |
It returns the data source associated with this graph.
Definition at line 119 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_ds.
Referenced by te::graph::LayerRenderer::draw(), te::sa::SpatialWeightsExchanger::exportToGAL(), te::sa::SpatialWeightsExchanger::exportToGWT(), te::graph::SequenceIterator::getFirstEdge(), te::graph::QueryIterator::getFirstEdge(), te::graph::BoxIterator::getFirstEdge(), te::graph::SequenceIterator::getFirstVertex(), te::graph::QueryIterator::getFirstVertex(), te::graph::BoxIterator::getFirstVertex(), te::graph::SequenceLoaderStrategy::loadDataByEdgeId(), te::graph::BoxLoaderStrategy::loadDataByEdgeId(), te::graph::SequenceLoaderStrategy::loadDataByVertexId(), te::graph::BoxLoaderStrategy::loadDataByVertexId(), te::graph::AbstractGraphLoaderStrategy::loadEdge(), te::graph::AbstractGraphLoaderStrategy::loadVertexAttrs(), te::graph::AbstractGraphLoaderStrategy::removeEdge(), te::graph::AbstractGraphLoaderStrategy::removeVertex(), te::graph::AbstractGraphLoaderStrategy::saveData(), te::graph::AbstractGraphLoaderStrategy::saveGraphEdgeList(), and te::graph::AbstractGraphLoaderStrategy::saveVertexAttributes().
|
inherited |
It returns the the graph description.
Definition at line 84 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_description.
Referenced by addGraphTableNewEntry().
|
virtualinherited |
Get a edge property given a index.
| idx | Index of the property |
Definition at line 216 of file GraphMetadata.cpp.
References te::dt::CompositeProperty::getProperty(), and te::graph::GraphMetadata::m_edgeProp.
Referenced by addGraphAttrTableNewEntry(), te::graph::QueryGraphBuilder::build(), createGraphTableEdgeModel(), te::sa::GPMWeightsAbstractStrategy::getDistanceAttributeIndex(), te::graph::Graph::getEdgeProperty(), removeEdgeProperty(), and te::graph::GraphMetadata::removeEdgeProperty().
|
virtualinherited |
Used to verify the number of properties associated to edge elements.
Definition at line 226 of file GraphMetadata.cpp.
References te::dt::CompositeProperty::getProperties(), and te::graph::GraphMetadata::m_edgeProp.
Referenced by addGraphAttrTableNewEntry(), te::sa::GPMWeightsNoWeightsStrategy::calculate(), te::sa::GPMWeightsSquaredInverseDistanceStrategy::calculate(), te::sa::GPMWeightsInverseDistanceStrategy::calculate(), createGraphTableEdgeModel(), CreateWeightAttribute(), te::sa::SkaterOperation::createWeightAttribute(), te::sa::GPMWeightsAbstractStrategy::getDistanceAttributeIndex(), te::graph::Graph::getEdgePropertySize(), te::sa::MinimumSpanningTree::kruskal(), save(), and te::graph::AbstractGraphLoaderStrategy::saveGraphEdgeList().
|
inherited |
It returns the edge table name that contains the vertex elements in data source.
Definition at line 140 of file GraphMetadata.cpp.
References te::graph::Edge_List, te::graph::GraphMetadata::getName(), te::graph::GraphMetadata::getStorageMode(), te::graph::Globals::sm_tableEdgeAttributeModelSufixName, te::graph::Globals::sm_tableEdgeModelSufixName, and te::graph::Vertex_List.
Referenced by addEdgeProperty(), addGraphAttrTableNewEntry(), addGraphTableNewEntry(), te::graph::SequenceIterator::getFirstEdge(), te::graph::QueryIterator::getFirstEdge(), te::graph::BoxIterator::getFirstEdge(), te::graph::SequenceIterator::getFirstVertex(), te::graph::SequenceLoaderStrategy::loadDataByEdgeId(), te::graph::BoxLoaderStrategy::loadDataByEdgeId(), te::graph::SequenceLoaderStrategy::loadDataByVertexId(), te::graph::BoxLoaderStrategy::loadDataByVertexId(), te::graph::AbstractGraphLoaderStrategy::loadEdge(), removeEdgeProperty(), and te::graph::AbstractGraphLoaderStrategy::saveGraphEdgeList().
|
virtualinherited |
Used to get the bounding box of the geometry elements associated with this graph.
Definition at line 246 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_extent.
Referenced by te::graph::BoxLoaderStrategy::calculateBox(), and te::graph::Layer::setGraph().
|
inherited |
It returns the graph id.
Definition at line 64 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_id.
Referenced by addEdgeProperty(), addGraphAttrTableNewEntry(), and addVertexProperty().
|
inherited |
It returns the graph name.
Definition at line 74 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_name.
Referenced by DisplayWindow::addGraph(), addGraphAttrTableNewEntry(), addGraphTableNewEntry(), createGraphTableEdgeModel(), createVertexAttrTable(), te::graph::GraphMetadata::getEdgeTableName(), te::graph::GraphMetadata::getVertexTableName(), save(), and updateGraphId().
|
virtualinherited |
Used to get the SRID of the geometry elements associated with this graph.
Definition at line 236 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_srid.
Referenced by te::graph::BoxIterator::getFirstEdge(), te::graph::BoxIterator::getFirstVertex(), and te::graph::Layer::setGraph().
|
inherited |
It returns the the graph storage mode (defined in Enums file)
Definition at line 114 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_mode.
Referenced by addEdgeProperty(), addGraphTableNewEntry(), te::graph::GraphMetadata::getEdgeTableName(), te::graph::GraphMetadata::getVertexTableName(), te::graph::SequenceLoaderStrategy::loadDataByEdgeId(), te::graph::BoxLoaderStrategy::loadDataByEdgeId(), te::graph::SequenceLoaderStrategy::loadDataByVertexId(), te::graph::BoxLoaderStrategy::loadDataByVertexId(), save(), and te::graph::AbstractGraphLoaderStrategy::saveData().
|
inherited |
It returns the graph type (defined in Enums file)
Definition at line 94 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_type.
Referenced by te::graph::BoxLoaderStrategy::loadDataByEdgeId(), te::graph::SequenceLoaderStrategy::loadDataByVertexId(), and te::graph::BoxLoaderStrategy::loadDataByVertexId().
|
virtualinherited |
Get a vertex property given a index.
| idx | Index of the property |
Definition at line 176 of file GraphMetadata.cpp.
References te::dt::CompositeProperty::getProperty(), and te::graph::GraphMetadata::m_vertexProp.
Referenced by addGraphAttrTableNewEntry(), te::graph::AddRasterAttribute::AddRasterAttribute(), te::graph::QueryGraphBuilder::build(), te::sa::MinimumSpanningTree::createGraph(), createVertexAttrTable(), te::graph::BoxIterator::getFirstEdge(), te::graph::BoxIterator::getFirstVertex(), te::graph::Graph::getVertexProperty(), te::graph::BoxLoaderStrategy::loadDataByEdgeId(), te::graph::BoxLoaderStrategy::loadDataByVertexId(), removeVertexProperty(), and te::graph::GraphMetadata::removeVertexProperty().
|
virtualinherited |
Used to verify the number of properties associated to vertex elements.
Definition at line 186 of file GraphMetadata.cpp.
References te::dt::CompositeProperty::getProperties(), and te::graph::GraphMetadata::m_vertexProp.
Referenced by addGraphAttrTableNewEntry(), te::graph::AddRasterAttribute::AddRasterAttribute(), addVertexProperty(), te::sa::AssociateGPMVertexAttribute(), te::sa::BoxMap(), te::sa::MinimumSpanningTree::createGraph(), createVertexAttrTable(), te::graph::BoxIterator::getFirstEdge(), te::graph::BoxIterator::getFirstVertex(), te::graph::Graph::getVertexPropertySize(), te::sa::GStatistics(), te::sa::LISAMap(), te::sa::LisaStatisticalSignificance(), te::graph::BoxLoaderStrategy::loadDataByEdgeId(), te::graph::BoxLoaderStrategy::loadDataByVertexId(), te::sa::LocalMean(), te::sa::MoranIndex(), te::sa::MoranMap(), save(), te::graph::AbstractGraphLoaderStrategy::saveGraphEdgeList(), te::graph::AbstractGraphLoaderStrategy::saveVertexAttributes(), and te::sa::ZAndWZ().
|
inherited |
It returns the vertex table name that contains the vertex elements in data source.
Definition at line 124 of file GraphMetadata.cpp.
References te::graph::Edge_List, te::graph::GraphMetadata::getName(), te::graph::GraphMetadata::getStorageMode(), te::graph::Globals::sm_tableVertexAttributeModelSufixName, te::graph::Globals::sm_tableVertexModelSufixName, and te::graph::Vertex_List.
Referenced by addGraphAttrTableNewEntry(), addGraphTableNewEntry(), addVertexProperty(), te::graph::QueryIterator::getFirstEdge(), te::graph::BoxIterator::getFirstEdge(), te::graph::SequenceIterator::getFirstVertex(), te::graph::QueryIterator::getFirstVertex(), te::graph::BoxIterator::getFirstVertex(), te::graph::BoxLoaderStrategy::loadDataByEdgeId(), te::graph::SequenceLoaderStrategy::loadDataByVertexId(), te::graph::BoxLoaderStrategy::loadDataByVertexId(), te::graph::AbstractGraphLoaderStrategy::loadVertexAttrs(), removeVertexProperty(), and te::graph::AbstractGraphLoaderStrategy::saveVertexAttributes().
|
protected |
Verify if a graph name is valid.
Definition at line 432 of file DataSourceGraphMetadata.cpp.
Referenced by save().
|
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 |
Reimplemented from te::graph::GraphMetadata.
Definition at line 57 of file DataSourceGraphMetadata.cpp.
References loadGraphAttrInfo(), loadGraphInfo(), te::graph::GraphMetadata::m_ds, and TE_TR.
|
protected |
Load the edge attributes.
| tableName | The table name that contains the edge attributes |
| columnName | The column name that contins the attribute information |
Definition at line 652 of file DataSourceGraphMetadata.cpp.
References te::graph::GraphMetadata::addEdgeProperty(), te::da::DataSource::getProperty(), te::graph::GraphMetadata::m_ds, and p.
Referenced by loadGraphAttrInfo().
|
protected |
Function used to load the graph attributes information given a graph id.
| id | The graph id |
Definition at line 602 of file DataSourceGraphMetadata.cpp.
References loadEdgeAttr(), loadVertexAttr(), te::graph::GraphMetadata::m_ds, te::da::DataSource::query(), te::graph::Globals::sm_tableAttributeAttrColumn, te::graph::Globals::sm_tableAttributeAttrGraphId, te::graph::Globals::sm_tableAttributeAttrTable, te::graph::Globals::sm_tableAttributeAttrType, and te::graph::Globals::sm_tableAttributeName.
Referenced by load().
|
protected |
Function used to load the graph information given a graph id.
| id | The graph id |
Definition at line 562 of file DataSourceGraphMetadata.cpp.
References te::graph::Edge_List, te::graph::GraphMetadata::m_description, te::graph::GraphMetadata::m_ds, te::graph::GraphMetadata::m_id, te::graph::GraphMetadata::m_mode, te::graph::GraphMetadata::m_name, te::da::DataSource::query(), te::graph::Globals::sm_tableGraphAttrDesc, te::graph::Globals::sm_tableGraphAttrId, te::graph::Globals::sm_tableGraphAttrName, te::graph::Globals::sm_tableGraphAttrType, te::graph::Globals::sm_tableGraphName, and te::graph::Vertex_List.
Referenced by load().
|
protected |
Load the vertex attributes.
| tableName | The table name that contains the vertex attributes |
| columnName | The column name that contins the attribute information |
Definition at line 642 of file DataSourceGraphMetadata.cpp.
References te::graph::GraphMetadata::addVertexProperty(), te::da::DataSource::getProperty(), te::graph::GraphMetadata::m_ds, and p.
Referenced by loadGraphAttrInfo().
|
virtual |
Remove a property associated to the edge element.
| idx | Index of the property |
Reimplemented from te::graph::GraphMetadata.
Definition at line 176 of file DataSourceGraphMetadata.cpp.
References te::graph::GraphMetadata::getEdgeProperty(), te::graph::GraphMetadata::getEdgeTableName(), te::dt::Property::getName(), p, te::graph::GraphMetadata::removeEdgeProperty(), and removeProperty().
|
protected |
Remove a property of a table in SGBD.
| tableName | The table name that contains this property |
| propertyName | The property name to be removed |
| Exception | It throws an exception if execution fails |
Definition at line 557 of file DataSourceGraphMetadata.cpp.
References te::da::DataSource::dropProperty(), and te::graph::GraphMetadata::m_ds.
Referenced by removeEdgeProperty(), and removeVertexProperty().
|
virtual |
Remove a property associated to the vertex element.
| idx | Index of the property |
Reimplemented from te::graph::GraphMetadata.
Definition at line 142 of file DataSourceGraphMetadata.cpp.
References te::dt::Property::getName(), te::graph::GraphMetadata::getVertexProperty(), te::graph::GraphMetadata::getVertexTableName(), p, removeProperty(), and te::graph::GraphMetadata::removeVertexProperty().
|
virtual |
Function used to save the graph information.
Reimplemented from te::graph::GraphMetadata.
Definition at line 71 of file DataSourceGraphMetadata.cpp.
References addGraphAttrTableNewEntry(), addGraphTableNewEntry(), createEdgeAttrTable(), createGraphTableEdgeModel(), createGraphTableVertexModel(), createVertexAttrTable(), te::graph::Edge_List, te::graph::GraphMetadata::getEdgePropertySize(), te::graph::GraphMetadata::getName(), te::graph::GraphMetadata::getStorageMode(), te::graph::GraphMetadata::getVertexPropertySize(), isValidGraphName(), te::graph::GraphMetadata::m_ds, TE_TR, and te::graph::Vertex_List.
|
protected |
Save each metadata attributes of vertex and eges into SGBD.
| graphId | The graph id associated with this attribute |
| tableName | The table name that contains this attribute |
| attrName | The attribute name |
| linkColumn | The link column name used to associate this attribute to the element (vertex or edge) |
| type | The attribute type ( is vertex or edge attribute) |
| Exception | It throws an exception if execution fails |
Definition at line 508 of file DataSourceGraphMetadata.cpp.
References te::da::DataSource::add(), te::common::Convert2LCase(), te::da::DataSource::getDataSetType(), te::graph::GraphMetadata::m_ds, te::mem::DataSetItem::setInt32(), te::mem::DataSetItem::setString(), and te::graph::Globals::sm_tableAttributeName.
Referenced by addEdgeProperty(), addGraphAttrTableNewEntry(), and addVertexProperty().
|
protected |
Save a property into a table in SGBD.
| tableName | The table name that will contains this property |
| p | The property to be saved |
| Exception | It throws an exception if execution fails |
Definition at line 533 of file DataSourceGraphMetadata.cpp.
References te::da::Index::add(), te::da::DataSource::addIndex(), te::da::DataSource::addProperty(), te::dt::GEOMETRY_TYPE, te::da::DataSource::getDataSetType(), te::dt::Property::getType(), te::graph::GraphMetadata::m_ds, and te::da::R_TREE_TYPE.
Referenced by addEdgeProperty(), and addVertexProperty().
|
inherited |
Set the graph class (defined in Enums file)
| value | Enumerator value that defines the graph class |
Definition at line 99 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_class.
|
inherited |
Set the graph description.
| desc | String with the graph description |
Definition at line 79 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_description.
Referenced by te::graph::AbstractGraphFactory::setMetadataInformation().
|
virtualinherited |
Used to set the bounding box of the geometry elements associated with this graph.
| The | bounding box information |
Definition at line 251 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_extent.
|
inherited |
Set the graph name.
| name | String with the graph name |
Definition at line 69 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_name.
Referenced by te::graph::AbstractGraphFactory::setMetadataInformation().
|
virtualinherited |
Used to set the SRID of the geometry elements associated with this graph.
| Integer | value that defines the SRID |
Definition at line 241 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_srid.
Referenced by CreateMSTGraph().
|
inherited |
Set the graph storage mode (defined in Enums file)
| value | Enumerator value that defines the graph storage mode |
Definition at line 109 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_mode.
Referenced by te::graph::AbstractGraphFactory::setMetadataInformation().
|
inherited |
Set the graph type (defined in Enums file)
| value | Enumerator value that defines the graph type |
Definition at line 89 of file GraphMetadata.cpp.
References te::graph::GraphMetadata::m_type.
Referenced by te::graph::AbstractGraphFactory::make(), and te::graph::AbstractGraphFactory::open().
|
virtual |
Function used to update the graph information on a data source.
| Exception | It throws an exception if graph id equal -1 |
Reimplemented from te::graph::GraphMetadata.
Definition at line 115 of file DataSourceGraphMetadata.cpp.
References te::graph::GraphMetadata::m_ds, and TE_TR.
|
protected |
Definition at line 662 of file DataSourceGraphMetadata.cpp.
References te::graph::GraphMetadata::getName(), te::graph::GraphMetadata::m_ds, te::graph::GraphMetadata::m_id, te::da::DataSource::query(), te::graph::Globals::sm_tableGraphAttrId, te::graph::Globals::sm_tableGraphAttrName, and te::graph::Globals::sm_tableGraphName.
Referenced by addGraphTableNewEntry().
|
inherited |
Attribute used to box percent size used in loader strategy.
Definition at line 321 of file GraphMetadata.h.
Referenced by te::graph::BoxLoaderStrategy::calculateBox(), and te::graph::GraphMetadata::GraphMetadata().
|
protectedinherited |
Enum attribute used to defines the graph class.
Definition at line 306 of file GraphMetadata.h.
Referenced by te::graph::GraphMetadata::getClass(), and te::graph::GraphMetadata::setClass().
|
protectedinherited |
Attribute used to describe a graph.
Definition at line 298 of file GraphMetadata.h.
Referenced by te::graph::GraphMetadata::getDescription(), loadGraphInfo(), and te::graph::GraphMetadata::setDescription().
|
protectedinherited |
Data source attribute, has to be database information.
Definition at line 310 of file GraphMetadata.h.
Referenced by addGraphTableNewEntry(), createTable(), te::graph::GraphMetadata::getDataSource(), load(), loadEdgeAttr(), loadGraphAttrInfo(), loadGraphInfo(), loadVertexAttr(), removeProperty(), save(), saveGraphAttrTableNewEntry(), saveProperty(), update(), updateGraphId(), and te::graph::GraphMetadata::~GraphMetadata().
|
protectedinherited |
Attribute that defines the edge properties.
Definition at line 314 of file GraphMetadata.h.
Referenced by te::graph::GraphMetadata::addEdgeProperty(), te::graph::GraphMetadata::getEdgeProperty(), te::graph::GraphMetadata::getEdgePropertySize(), te::graph::GraphMetadata::removeEdgeProperty(), and te::graph::GraphMetadata::~GraphMetadata().
|
protectedinherited |
Attribute used to define the graph extent.
Definition at line 302 of file GraphMetadata.h.
Referenced by te::graph::GraphMetadata::getEnvelope(), te::graph::GraphMetadata::setEnvelope(), and te::graph::GraphMetadata::~GraphMetadata().
|
protectedinherited |
Attribute graph unique identifier.
Definition at line 294 of file GraphMetadata.h.
Referenced by te::graph::GraphMetadata::getId(), loadGraphInfo(), and updateGraphId().
|
inherited |
Attribute used to set the max cache size.
Definition at line 319 of file GraphMetadata.h.
Referenced by te::graph::Graph::add(), te::graph::GraphCache::getGraphData(), te::graph::GraphMetadata::GraphMetadata(), te::graph::SequenceLoaderStrategy::loadDataByEdgeId(), and te::graph::SequenceLoaderStrategy::loadDataByVertexId().
|
inherited |
Attribute used to set the max vector cache size.
Definition at line 320 of file GraphMetadata.h.
Referenced by te::graph::GraphCache::createGraphData(), te::graph::GraphCache::getGraphData(), and te::graph::GraphMetadata::GraphMetadata().
|
inherited |
Flag used to indicate if the graph is a memory graph.
Definition at line 323 of file GraphMetadata.h.
Referenced by te::graph::Graph::add(), te::graph::DirectedGraph::add(), te::graph::UndirectedGraph::add(), te::graph::BidirectionalGraph::add(), te::graph::GraphFactory::create(), te::graph::BidirectionalGraphFactory::create(), te::graph::UndirectedGraphFactory::create(), te::graph::DirectedGraphFactory::create(), te::graph::Graph::flush(), te::graph::Graph::getEdge(), te::graph::AbstractGraphFactory::getMetadata(), te::graph::Graph::getVertex(), te::graph::Graph::Graph(), te::graph::GraphMetadata::GraphMetadata(), te::graph::GraphFactory::iOpen(), te::graph::UndirectedGraphFactory::iOpen(), te::graph::BidirectionalGraphFactory::iOpen(), te::graph::DirectedGraphFactory::iOpen(), te::graph::Graph::removeEdge(), and te::graph::Graph::removeVertex().
|
protectedinherited |
Enum attribute used to defines the storage mode.
Definition at line 308 of file GraphMetadata.h.
Referenced by DataSourceGraphMetadata(), te::graph::GraphMetadata::getStorageMode(), loadGraphInfo(), and te::graph::GraphMetadata::setStorageMode().
|
protectedinherited |
Attribute name.
Definition at line 296 of file GraphMetadata.h.
Referenced by te::graph::GraphMetadata::getName(), loadGraphInfo(), and te::graph::GraphMetadata::setName().
|
protectedinherited |
Attribute used to define the graph projection.
Definition at line 300 of file GraphMetadata.h.
Referenced by te::graph::GraphMetadata::getSRID(), and te::graph::GraphMetadata::setSRID().
|
protectedinherited |
Enum attribute used to defines the graph type.
Definition at line 304 of file GraphMetadata.h.
Referenced by te::graph::GraphMetadata::getType(), and te::graph::GraphMetadata::setType().
|
protectedinherited |
Attribute that defines the vertex properties.
Definition at line 312 of file GraphMetadata.h.
Referenced by te::graph::GraphMetadata::addVertexProperty(), te::graph::GraphMetadata::getVertexProperty(), te::graph::GraphMetadata::getVertexPropertySize(), te::graph::GraphMetadata::removeVertexProperty(), and te::graph::GraphMetadata::~GraphMetadata().