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

This class is used to define a set of properties of a Edge. More...

#include <EdgeProperty.h>

Inheritance diagram for te::graph::EdgeProperty:
te::dt::CompositeProperty te::dt::Property

Public Member Functions

void add (Property *p)
 It adds a new property to the CompositeProperty. More...
 
void add (const std::vector< Property * > &ps)
 It adds a list of property types to the CompositeProperty. More...
 
void add (const boost::ptr_vector< te::dt::Property > &ps)
 
virtual void clear ()
 It clears the CompositeProperty definition. More...
 
virtual Propertyclone () const
 It returns a clone of the object. More...
 
void copy (const std::vector< Property * > &ps)
 It copies the properties from the vector. More...
 
 EdgeProperty ()
 Default constructor. More...
 
PropertyfindFirstPropertyOfType (const int t) const
 returns the first property of the given data type. Caller doesn't take ownership of the returned pointer. More...
 
const std::string & getCompositeName () const
 It returns the name of the composite type. More...
 
const std::string & getDatasetName () const
 It returns the name of the propery's dataset. More...
 
unsigned int getId () const
 It returns the property identifier. More...
 
const std::string & getName () const
 It returns the property name. More...
 
PropertygetParent () const
 It returns the parent of this property, or NULL, if it doesn't have one. More...
 
const std::vector< Property * > & getProperties () const
 It returns the list of properties describing the CompositeProperty. More...
 
std::vector< Property * > & getProperties ()
 It returns the list of properties describing the CompositeProperty. More...
 
PropertygetProperty (std::size_t i) const
 It returns the i-th property. More...
 
PropertygetProperty (const std::string &name) const
 It returns the property with the given name or NULL if none is found. More...
 
PropertygetPropertyById (unsigned int id) const
 It searches for a property with the given ID. More...
 
std::size_t getPropertyPosition (const std::string &name) const
 It returns the property position based on its name. More...
 
std::size_t getPropertyPosition (const Property *p) const
 It returns the property position . More...
 
int getType () const
 It returns the property data type. More...
 
bool has (Property *p) const
 It checks if the Property "p" is associated to this property or any other parent. More...
 
bool hasPropertyOfType (const int t) const
 Tells if there is a property of the given data type. More...
 
virtual void remove (Property *p)
 It removes the property from the composite. More...
 
void setCompositeName (const std::string &cname)
 It sets the composite type name. More...
 
void setDatasetName (const std::string &dsName)
 It sets the property name. More...
 
void setId (unsigned int id)
 It sets the property identifier. More...
 
void setName (const std::string &name)
 It sets the property name. More...
 
void setParent (Property *p)
 It associate this property to the informed parent. More...
 
std::size_t size () const
 It returns the number of properties of the CompositeProperty. More...
 
 ~EdgeProperty ()
 Default destructor. More...
 

Protected Attributes

std::string m_cname
 The composite type name. More...
 
std::string m_datasetName
 The property's dataset name. More...
 
unsigned int m_id
 An identification number that can be used internally. More...
 
std::string m_name
 The property name. More...
 
Propertym_parent
 The parent property type: it must be a CompositeProperty. More...
 
std::vector< Property * > m_properties
 The list of property types that make the CompositeProperty. More...
 
int m_type
 The property data type. More...
 

Detailed Description

This class is used to define a set of properties of a Edge.

Definition at line 51 of file EdgeProperty.h.

Constructor & Destructor Documentation

te::graph::EdgeProperty::EdgeProperty ( )

Default constructor.

Definition at line 3 of file EdgeProperty.cpp.

te::graph::EdgeProperty::~EdgeProperty ( )

Default destructor.

Definition at line 8 of file EdgeProperty.cpp.

Member Function Documentation

void te::dt::CompositeProperty::add ( Property p)
inherited

It adds a new property to the CompositeProperty.

Parameters
pThe property to be inserted.
Precondition
The Property p must be valid.
The Property p must not be associated to another property.
Postcondition
The property p will be associated to CompositeProperty.
The CompositeProperty takes the ownership of the property.

Definition at line 70 of file CompositeProperty.cpp.

References te::dt::Property::getParent(), and te::dt::Property::setParent().

void te::dt::CompositeProperty::add ( const std::vector< Property * > &  ps)
inherited

It adds a list of property types to the CompositeProperty.

Parameters
psThe list of properties to be added.
Precondition
The properties must be valid.
The properties must not be associated to another property.
Note
The CompositeProperty takes the ownership of the properties.

Definition at line 77 of file CompositeProperty.cpp.

void te::dt::CompositeProperty::add ( const boost::ptr_vector< te::dt::Property > &  ps)
inherited
void te::dt::CompositeProperty::clear ( )
virtualinherited

It clears the CompositeProperty definition.

Reimplemented in te::da::DataSetType.

Definition at line 180 of file CompositeProperty.cpp.

References te::common::FreeContents().

te::dt::Property * te::dt::CompositeProperty::clone ( ) const
virtualinherited

It returns a clone of the object.

The new property will NOT have associations to other elements.

Returns
A clone of the object.

Implements te::dt::Property.

Reimplemented in te::da::DataSetType.

Definition at line 202 of file CompositeProperty.cpp.

void te::dt::CompositeProperty::copy ( const std::vector< Property * > &  ps)
inherited

It copies the properties from the vector.

Parameters
psThe list of properties to be copied.
Note
The CompositeProperty will not take the ownership of the properties, it will clone each one. So, it is the caller responsability to release them.

Definition at line 164 of file CompositeProperty.cpp.

References te::dt::Property::clone(), and te::dt::Property::setParent().

Referenced by te::dt::CompositeProperty::CompositeProperty().

Property * te::dt::CompositeProperty::findFirstPropertyOfType ( const int  t) const
inlineinherited
const std::string& te::dt::CompositeProperty::getCompositeName ( ) const
inlineinherited

It returns the name of the composite type.

Returns
The name of the composite type.
Note
This name may be different from the property name (returned by getName method)!

Definition at line 96 of file CompositeProperty.h.

const std::string& te::dt::Property::getDatasetName ( ) const
inlineinherited

It returns the name of the propery's dataset.

Returns
The the propery's dataset name.

Definition at line 144 of file Property.h.

Referenced by te::da::GetOIDDatasetProps().

unsigned int te::dt::Property::getId ( ) const
inlineinherited

It returns the property identifier.

Returns
A number used to identify the property.
Warning
The identifier value may be used by data source implementations. So, don't rely on its value!

Definition at line 109 of file Property.h.

Referenced by te::da::DataSetTypeConverter::DataSetTypeConverter(), te::pgis::Transactor::getConstraints(), te::pgis::Transactor::getIndexes(), te::pgis::Transactor::getPropertyId(), and te::serialize::xml::Save().

const std::string& te::dt::Property::getName ( ) const
inlineinherited

It returns the property name.

Returns
The property name.
Note
For DataSetTypes the name can have namespace prefix or schema name prefix, it will depend on the data source implementation.

Definition at line 127 of file Property.h.

Referenced by te::graph::AddDeepAttribute::AddDeepAttribute(), te::graph::DataSourceGraphMetadata::addEdgeProperty(), te::ado::Transactor::addForeignKey(), te::pgis::Transactor::addForeignKey(), te::sa::AddGraphEdgeAttribute(), te::sa::AddGraphVertexAttribute(), te::ado::Transactor::addPrimaryKey(), te::mem::DataSource::addProperty(), te::ogr::Transactor::addProperty(), te::sqlite::DataSourceTransactor::addProperty(), te::ado::Transactor::addProperty(), terralib4::Transactor::addProperty(), te::pgis::Transactor::addProperty(), te::graph::AddRasterAttribute::AddRasterAttribute(), te::da::DataSourceCatalog::addRef(), te::pgis::Transactor::addSequence(), te::ado::Transactor::addUniqueKey(), te::graph::DataSourceGraphMetadata::addVertexProperty(), te::vp::PolygonToLineOp::buildOutDataSetType(), te::vp::LineToPolygonOp::buildOutDataSetType(), te::sa::KernelMapOperation::buildTree(), te::sa::KernelRatioOperation::buildTree(), te::da::DataSourceCatalog::checkFKsDependency(), te::da::DataSourceCatalog::checkSequenceDependency(), te::qt::plugins::terralib4::TL4ConverterWizard::commit(), te::qt::widgets::ConstraintWidget::ConstraintWidget(), te::ogr::Convert2OGR(), te::sqlite::Convert2SQLCreate(), te::da::Create(), te::da::CreateAdapter(), te::mem::DataSource::createDataSet(), te::gdal::Transactor::createDataSet(), te::ogr::Transactor::createDataSet(), te::sqlite::DataSourceTransactor::createDataSet(), te::ado::Transactor::createDataSet(), te::pgis::Transactor::createDataSet(), te::vp::IntersectionMemory::createDataSetType(), te::sa::GeneralizedProximityMatrix::createDataSetType(), DataSetAdapterLayerReader(), DataSetAdapterLayerWriter(), te::qt::widgets::DataSetOptionsWizardPage::datasetPressed(), te::da::DataSetType::DataSetType(), te::da::DataSetTypeConverter::DataSetTypeConverter(), te::qt::widgets::DataSetDisplay::draw(), te::map::QueryLayerRenderer::draw(), te::map::AbstractLayerRenderer::draw(), te::map::DrawGeometries(), te::map::DrawRaster(), te::da::DataSourceCatalog::dropDependentSequenceEntry(), te::da::DataSourceCatalog::dropDependentSequences(), te::ado::Transactor::dropProperty(), te::qt::widgets::DataExchangerWizard::exchange(), te::qt::widgets::DirectExchangerDialog::exchangeToDatabase(), te::qt::widgets::Selection::executeSelection(), te::qt::widgets::DataSetCategoryItem::fetchMore(), te::qt::widgets::DataSetGroupItem::fetchMore(), te::qt::widgets::DataSetAdapterWidget::fillDataSetTable(), generateLayer(), te::ado::Transactor::getCheckConstraints(), te::pgis::Transactor::getConstraints(), terralib4::Transactor::getDataSetType(), te::sa::GPMWeightsAbstractStrategy::getDistanceAttributeIndex(), te::da::GetEmptyOIDSet(), te::sqlite::DataSourceCatalogLoader::getGeometryInfo(), te::pgis::Transactor::getGeometryInfo(), te::sa::GeneralizedProximityMatrix::getGPMPropertyMap(), te::sa::GetGraphEdgeAttrIndex(), te::sa::GetGraphVertexAttrIndex(), te::sqlite::DataSourceCatalogLoader::getIndex(), te::sqlite::DataSourceCatalogLoader::getIndexes(), te::ado::Transactor::getIndexes(), te::pgis::Transactor::getIndexes(), te::qt::widgets::Info::getInfo(), te::qt::widgets::ClassifierWizardPage::getInputParams(), te::qt::widgets::ClippingWizardPage::getLayerClipping(), te::attributefill::VectorToVectorMemory::getOutputDataSetType(), te::sqlite::DataSourceCatalogLoader::getPrimaryKey(), te::ado::Transactor::getPrimaryKey(), te::ado::Transactor::getProperties(), te::pgis::Transactor::getPropertyId(), te::da::GetPropertyInfo(), te::attributefill::VectorToVectorMemory::getPropertyName(), te::stmem::Transactor::getPropertyNames(), te::da::GetPropertyPos(), te::pgis::Transactor::getRasterInfo(), te::map::QueryLayer::getSchema(), te::sqlite::DataSourceCatalogLoader::getSpatialIndexes(), te::da::GetSQLValueNames(), te::sqlite::DataSourceCatalogLoader::getUniqueKey(), te::sqlite::DataSourceCatalogLoader::getUniqueKeys(), te::ado::Transactor::getUniqueKeys(), te::da::DataSourceCatalog::indexFKs(), te::da::DataSourceCatalog::indexSequenceDependency(), te::qt::widgets::IndexWidget::IndexWidget(), te::edit::FeatureAttributesDialog::initialize(), te::ado::Transactor::insertIntoGeometryColumns(), te::qt::widgets::ChartLayerWidget::listAttributes(), te::qt::widgets::GroupingWidget::listAttributes(), te::da::LoadFull(), te::da::LoadProperties(), te::qt::widgets::GroupingWidget::onImportPushButtonClicked(), te::qt::widgets::DatapPropertiesWidget::onInputDataToolButtonTriggered(), te::qt::widgets::SHP2PostGISDialog::onOkPushButtonClicked(), te::sa::SpatialStatisticsDialog::onOkPushButtonClicked(), te::qt::widgets::DataPropertiesDialog::onOkPushButtonClicked(), te::qt::widgets::ROIManagerWidget::onPointPicked(), te::attributefill::RasterToVectorDialog::onRasterComboBoxChanged(), te::qt::widgets::DataSet2Layer::operator()(), te::da::DataSourceCatalog::remove(), te::graph::DataSourceGraphMetadata::removeEdgeProperty(), te::da::DataSourceCatalog::removeRef(), te::graph::DataSourceGraphMetadata::removeVertexProperty(), te::da::DataSourceCatalog::rename(), te::qt::widgets::DataSetTableView::retypeColumn(), te::vp::PolygonToLineMemory::run(), te::vp::LineToPolygonMemory::run(), te::vp::AggregationQuery::run(), te::vp::IntersectionQuery::run(), te::vp::BufferQuery::run(), te::vp::AggregationMemory::run(), te::attributefill::VectorToRaster::run(), te::attributefill::RasterToVector::run(), te::addressgeocoding::AddressGeocodingOp::run(), te::attributefill::VectorToVectorMemory::run(), te::serialize::xml::Save(), te::qt::widgets::DataSetOptionsWizardPage::set(), te::qt::widgets::PropertyConverterDialog::set(), te::attributefill::VectorToVectorDialog::setFunctionsByLayer(), and terralib4::TableDataSet::TableDataSet().

std::vector<Property*>& te::dt::CompositeProperty::getProperties ( )
inlineinherited

It returns the list of properties describing the CompositeProperty.

Returns
The list of Propertys describing the CompositeProperty.

Definition at line 160 of file CompositeProperty.h.

Property* te::dt::CompositeProperty::getProperty ( std::size_t  i) const
inlineinherited

It returns the i-th property.

Parameters
iThe property position in the property array.
Returns
A pointer to the i-th property. Don't delete it, as it belongs to the CompositeProperty.
Precondition
i must be in the valid range [0, size()).

Definition at line 171 of file CompositeProperty.h.

Referenced by te::qt::plugins::terralib4::TL4ConverterWizard::commit(), te::qt::widgets::ConstraintWidget::ConstraintWidget(), te::da::CreateAdapter(), te::gdal::Transactor::createDataSet(), te::ogr::Transactor::createDataSet(), te::sqlite::DataSourceTransactor::createDataSet(), te::ado::Transactor::createDataSet(), te::pgis::Transactor::createDataSet(), te::stmem::DataSet::DataSet(), te::mem::DataSet::DataSet(), te::da::DataSetTypeConverter::DataSetTypeConverter(), te::qt::widgets::DataSetAdapterWidget::fillDataSetTable(), te::da::GetEmptyOIDSet(), te::da::GetFirstSpatialProperty(), te::sqlite::DataSourceCatalogLoader::getIndex(), te::ado::Transactor::getIndexes(), te::pgis::GetLoadDataRow(), te::sqlite::DataSourceCatalogLoader::getPrimaryKey(), te::ado::Transactor::getPrimaryKey(), te::stmem::Transactor::getProperties(), te::stmem::Transactor::getProperty(), te::da::GetPropertyInfo(), te::stmem::Transactor::getPropertyNames(), te::da::GetPropertyPos(), te::sqlite::DataSourceCatalogLoader::getSpatialIndexes(), te::da::GetSQLValueNames(), te::pgis::GetSQLValues(), te::vp::IntersectionOp::getTabularProps(), te::sqlite::DataSourceCatalogLoader::getUniqueKey(), te::ado::Transactor::getUniqueKeys(), te::qt::widgets::IndexWidget::IndexWidget(), te::stmem::Transactor::propertyExists(), te::serialize::xml::Save(), te::qt::widgets::PropertyConverterDialog::set(), and terralib4::TableDataSet::TableDataSet().

te::dt::Property * te::dt::CompositeProperty::getProperty ( const std::string &  name) const
inherited

It returns the property with the given name or NULL if none is found.

Parameters
nameThe name of the property we are looking for.
Returns
A pointer to a property or NULL if none is found. Don't delete it, as it belongs to the CompositeProperty.

Definition at line 120 of file CompositeProperty.cpp.

te::dt::Property * te::dt::CompositeProperty::getPropertyById ( unsigned int  id) const
inherited

It searches for a property with the given ID.

Parameters
idThe property ID.
Returns
A pointer to the first property with the given ID if found or NULL otherwise. Don't delete it, as it belongs to the CompositeProperty.

Definition at line 153 of file CompositeProperty.cpp.

Referenced by te::pgis::Transactor::getConstraints(), and te::pgis::Transactor::getIndexes().

std::size_t te::dt::CompositeProperty::getPropertyPosition ( const std::string &  name) const
inherited
std::size_t te::dt::CompositeProperty::getPropertyPosition ( const Property p) const
inherited

It returns the property position .

Parameters
pThe property.
Returns
A property position in the property array.

Definition at line 142 of file CompositeProperty.cpp.

int te::dt::Property::getType ( ) const
inlineinherited

It returns the property data type.

Returns
The property data type.

Definition at line 161 of file Property.h.

Referenced by te::ado::Transactor::addForeignKey(), te::ado::Transactor::addPrimaryKey(), te::mem::DataSource::addProperty(), te::ogr::Transactor::addProperty(), te::sqlite::DataSourceTransactor::addProperty(), te::ado::Transactor::addProperty(), terralib4::Transactor::addProperty(), te::pgis::Transactor::addProperty(), te::ado::Transactor::addUniqueKey(), te::ogr::Transactor::changePropertyDefinition(), te::graph::LayerRenderer::checkEdgeGeometryProperty(), te::da::DataSourceCatalog::checkSequenceDependency(), te::graph::LayerRenderer::checkVertexGeometryProperty(), te::qt::plugins::terralib4::TL4ConverterWizard::commit(), te::ogr::Convert2OGR(), te::da::CreateAdapter(), te::sqlite::DataSourceTransactor::createDataSet(), te::graph::DataSourceGraphMetadata::createGraphTableEdgeModel(), te::graph::DataSourceGraphMetadata::createVertexAttrTable(), te::da::DataSetTypeConverter::DataSetTypeConverter(), te::da::DataSourceCatalog::dropDependentSequenceEntry(), te::da::DataSourceCatalog::dropDependentSequences(), te::ado::Transactor::dropProperty(), te::qt::widgets::DataSetCategoryItem::fetchMore(), te::qt::widgets::DataSetGroupItem::fetchMore(), te::qt::widgets::DataSetAdapterWidget::fillDataSetTable(), te::dt::CompositeProperty::findFirstPropertyOfType(), te::sqlite::DataSourceCatalogLoader::getDataSetType(), te::da::GetEmptyOIDSet(), te::qt::widgets::WhereClauseWidget::getExpression(), te::da::GetFirstSpatialProperty(), te::vp::MultipartToSinglepart::getOutDst(), te::attributefill::VectorToVectorMemory::getOutputDataSetType(), te::pgis::Transactor::getProperties(), te::pgis::Transactor::getProperty(), te::pgis::Transactor::getPropertyId(), te::da::GetPropertyInfo(), te::sqlite::DataSourceCatalogLoader::getSpatialIndexes(), te::sqlite::GetSQLType(), te::pgis::GetSQLValue(), te::vp::IntersectionOp::getTabularProps(), te::da::DataSourceCatalog::indexSequenceDependency(), te::qt::widgets::ChartLayerWidget::listAttributes(), te::qt::widgets::GroupingWidget::listAttributes(), te::da::DataSetTypeConverter::needConverter(), te::qt::widgets::GroupingWidget::onImportPushButtonClicked(), te::sa::SpatialStatisticsDialog::onOkPushButtonClicked(), te::qt::widgets::DataSetTableView::retypeColumn(), te::attributefill::VectorToVectorMemory::run(), te::graph::DataSourceGraphMetadata::saveProperty(), te::vp::GeometricOpMemory::SetAggregByAttribute(), te::pgis::SetColumnDef(), and te::attributefill::VectorToVectorDialog::setFunctionsByLayer().

bool te::dt::CompositeProperty::has ( Property p) const
virtualinherited

It checks if the Property "p" is associated to this property or any other parent.

Parameters
pThe Property we are checking.
Returns
True if the given Property "p" is associated to to this Property, otherwise, returns false.

Implements te::dt::Property.

Definition at line 186 of file CompositeProperty.cpp.

bool te::dt::CompositeProperty::hasPropertyOfType ( const int  t) const
inlineinherited

Tells if there is a property of the given data type.

Definition at line 273 of file CompositeProperty.h.

References te::dt::CompositeProperty::findFirstPropertyOfType().

Referenced by te::da::DataSetType::hasRaster().

void te::dt::CompositeProperty::remove ( Property p)
virtualinherited

It removes the property from the composite.

Parameters
pThe property to be removed from the composite.
Postcondition
The property pointer will be invalidated.

Definition at line 105 of file CompositeProperty.cpp.

void te::dt::CompositeProperty::setCompositeName ( const std::string &  cname)
inlineinherited

It sets the composite type name.

Parameters
nameThe composite type name.

Definition at line 103 of file CompositeProperty.h.

void te::dt::Property::setDatasetName ( const std::string &  dsName)
inlineinherited

It sets the property name.

Parameters
nameThe new property name.
Warning
Take care when calling this method for a DataSetType associated to a DataSourceCatalog. Prefer using the rename method on the DataSourceCatalog API instead of using this method.

Definition at line 154 of file Property.h.

void te::dt::Property::setName ( const std::string &  name)
inlineinherited

Member Data Documentation

std::string te::dt::CompositeProperty::m_cname
protectedinherited

The composite type name.

Definition at line 269 of file CompositeProperty.h.

Referenced by te::dt::CompositeProperty::operator=().

std::string te::dt::Property::m_datasetName
protectedinherited

The property's dataset name.

Definition at line 208 of file Property.h.

Referenced by te::dt::Property::operator=().

unsigned int te::dt::Property::m_id
protectedinherited

An identification number that can be used internally.

Definition at line 205 of file Property.h.

Referenced by te::dt::Property::operator=().

std::string te::dt::Property::m_name
protectedinherited

The property name.

Definition at line 207 of file Property.h.

Referenced by te::dt::Property::operator=().

Property* te::dt::Property::m_parent
protectedinherited

The parent property type: it must be a CompositeProperty.

Definition at line 204 of file Property.h.

std::vector<Property*> te::dt::CompositeProperty::m_properties
protectedinherited
int te::dt::Property::m_type
protectedinherited

The property data type.

Definition at line 206 of file Property.h.

Referenced by te::dt::Property::operator=().


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