Overview     Modules     Class Hierarchy     Classes     Members  
tlp::CSVToGraphEdgeIdMapping Class Reference

Try to map CSV file rows to edges according to value between a CSV column and a graph property. More...

#include <CSVGraphImport.h>

Inheritance diagram for tlp::CSVToGraphEdgeIdMapping:
Collaboration diagram for tlp::CSVToGraphEdgeIdMapping:

List of all members.

Public Member Functions

Protected Member Functions

  • unsigned int buildIndexForRow (unsigned int row, const std::string &indexKey, tlp::Graph *graph, tlp::PropertyInterface *keyProperty)
    Create a new element if no elements for the given row was found.

Detailed Description

Try to map CSV file rows to edges according to value between a CSV column and a graph property.

Be sure there is a property with the given name in the graph before using it.


Constructor & Destructor Documentation

tlp::CSVToGraphEdgeIdMapping::CSVToGraphEdgeIdMapping ( tlp::Graph *  graph,
unsigned int  columnIndex,
const std::string &  propertyName 
)
Parameters:
graphThe graph where the edges will be searched.
columnIndexThe index of the column with the ids in the CSV file.
propertyNameThe name of the property to search ids.
firstRowThe first row to search ids.
lastRowThe last row to search ids.

Member Function Documentation

unsigned int tlp::CSVToGraphEdgeIdMapping::buildIndexForRow ( unsigned int  row,
const std::string &  indexKey,
tlp::Graph *  graph,
tlp::PropertyInterface *  keyProperty 
) [protected, virtual]

Create a new element if no elements for the given row was found.

Returns:
Return the graph element id or UINT_MAX if no new element is created.

Implements tlp::AbstractCSVToGraphDataMapping.



Tulip Software by LaBRI Visualization Team    2001 - 2012