Gephi Toolkit Javadoc

org.gephi.datalab.impl
Class AttributeColumnsControllerImpl

java.lang.Object
  extended by org.gephi.datalab.impl.AttributeColumnsControllerImpl
All Implemented Interfaces:
AttributeColumnsController

public class AttributeColumnsControllerImpl
extends java.lang.Object
implements AttributeColumnsController

Implementation of the AttributeColumnsController interface declared in the Data Laboratory API.

Author:
Eduardo Ramos
See Also:
AttributeColumnsController

Constructor Summary
AttributeColumnsControllerImpl()
           
 
Method Summary
 AttributeColumn addAttributeColumn(AttributeTable table, java.lang.String title, AttributeType type)
          Adds a new column to the specified table with the given title and type of column.
 java.util.Map<java.lang.Object,java.lang.Integer> calculateColumnValuesFrequencies(AttributeTable table, AttributeColumn column)
          Calculates the absolute frequency of appearance of each value of the given column and returns a Map containing each different value mapped to its frequency of appearance.
 boolean canChangeColumnData(AttributeColumn column)
          Indicates if the Data Laboratory API behaviour allows to change a value of the given column of a table.
 boolean canClearColumnData(AttributeColumn column)
          Indicates if the Data Laboratory API behaviour allows to set as null a value of the given column of a table.
 boolean canDeleteColumn(AttributeColumn column)
          Indicates if the Data Laboratory API behaviour allows to delete the given column of a table.
 void clearColumnData(AttributeTable table, AttributeColumn column)
          Clears all rows data for a given column of a table (nodes table or edges table)
 void clearEdgeData(Edge edge, AttributeColumn[] columnsToClear)
          Clears all edge attributes except computed attributes and id.
 void clearEdgesData(Edge[] edges, AttributeColumn[] columnsToClear)
          Clears all the edges attributes except computed attributes and id, checking first that the edges are in the graph.
 void clearNodeData(Node node, AttributeColumn[] columnsToClear)
          Clears all node attributes except computed attributes and id, checking first that the node is in the graph.
 void clearNodesData(Node[] nodes, AttributeColumn[] columnsToClear)
          Clears all the nodes attributes except computed attributes and id.
 void clearRowData(Attributes row, AttributeColumn[] columnsToClear)
          Clears row attributes except computed attributes and id if node/edge row.
 void copyColumnDataToOtherColumn(AttributeTable table, AttributeColumn sourceColumn, AttributeColumn targetColumn)
          Copies all row values of a column to another column.
 void copyEdgeDataToOtherEdges(Edge edge, Edge[] otherEdges, AttributeColumn[] columnsToCopy)
          Copies attributes data of the given edge to the other rows except computed attributes and id.
 void copyNodeDataToOtherNodes(Node node, Node[] otherNodes, AttributeColumn[] columnsToCopy)
          Copies attributes data of the given node to the other rows except computed attributes and id.
 void copyRowDataToOtherRows(Attributes row, Attributes[] otherRows, AttributeColumn[] columnsToCopy)
          Copies attributes data of the given row to the other rows except computed attributes and id if node/edge.
 AttributeColumn createBooleanMatchesColumn(AttributeTable table, AttributeColumn column, java.lang.String newColumnTitle, java.util.regex.Pattern pattern)
          Creates a new BOOLEAN column from the given column and regular expression filling it with boolean values that indicate if each of the old column values match the regular expression.
 AttributeColumn createFoundGroupsListColumn(AttributeTable table, AttributeColumn column, java.lang.String newColumnTitle, java.util.regex.Pattern pattern)
          Creates a new LIST_STRING column from the given column and regular expression with values that are the list of matching groups for the given regular expression for each row.
 void deleteAttributeColumn(AttributeTable table, AttributeColumn column)
          Deletes the specified column from a table if the table has the column and data laboratory behaviour allows to delete it (see canDeleteColumn method).
 java.util.List<java.util.List<Node>> detectNodeDuplicatesByColumn(AttributeColumn column, boolean caseSensitive)
          Finds and returns nodes duplicates based on the values of a given column of nodes table
 AttributeColumn duplicateColumn(AttributeTable table, AttributeColumn column, java.lang.String title, AttributeType type)
          Duplicates a given column of a table and copies al row values.
 void fillColumnWithValue(AttributeTable table, AttributeColumn column, java.lang.String value)
          Fills the data values of a given column of a table with a value as a String, parsing it for the AttributeType of the column.
 void fillEdgesColumnWithValue(Edge[] edges, AttributeColumn column, java.lang.String value)
          Fills the data values of a given column of the indicated edges with a value as a String, parsing it for the AttributeType of the column.
 void fillNodesColumnWithValue(Node[] nodes, AttributeColumn column, java.lang.String value)
          Fills the data values of a given column of the indicated nodes with a value as a String, parsing it for the AttributeType of the column.
 java.lang.Number[] getColumnNumbers(AttributeTable table, AttributeColumn column)
          Prepares an array with all not null numbers of all the rows of a given column.
 java.math.BigDecimal[] getNumberOrNumberListColumnStatistics(AttributeTable table, AttributeColumn column)
          Calculates all statistics at once from a number/number list column using MathUtils class.
 java.lang.Number[] getRowNumbers(Attributes row, AttributeColumn[] columns)
          Prepares an array with all not null numbers of a row using only the given columns.
 java.lang.Number[] getRowsColumnNumbers(Attributes[] rows, AttributeColumn column)
          Prepares an array only with all not null numbers the indicated rows of a given column.
 Attributes[] getTableAttributeRows(AttributeTable table)
          Returns all rows of a given table (node or edges table).
 int getTableRowsCount(AttributeTable table)
          Counts the number of rows of a table (nodes or edges table) and returns the result.
 void importCSVToEdgesTable(java.io.File file, java.lang.Character separator, java.nio.charset.Charset charset, java.lang.String[] columnNames, AttributeType[] columnTypes, boolean createNewNodes)
          Method for importing csv data to edges table.
 void importCSVToNodesTable(java.io.File file, java.lang.Character separator, java.nio.charset.Charset charset, java.lang.String[] columnNames, AttributeType[] columnTypes, boolean assignNewNodeIds)
          Method for importing CSV file data to nodes table.
 boolean isEdgeTable(AttributeTable table)
          Checks if the given table is edges table.
 boolean isNodeTable(AttributeTable table)
          Checks if the given table is nodes table.
 void mergeRowsValues(AttributeTable table, AttributeRowsMergeStrategy[] mergeStrategies, Attributes[] rows, Attributes selectedRow, Attributes resultRow)
          Merges the given rows values to the given result row using one merge strategy for each column of the table.
 void negateBooleanColumn(AttributeTable table, AttributeColumn column)
          Negates not null values of a given BOOLEAN or LIST_BOOLEANcolumn.
 boolean setAttributeValue(java.lang.Object value, Attributes row, AttributeColumn column)
          Sets a value to the given row,column pair (cell).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeColumnsControllerImpl

public AttributeColumnsControllerImpl()
Method Detail

setAttributeValue

public boolean setAttributeValue(java.lang.Object value,
                                 Attributes row,
                                 AttributeColumn column)
Description copied from interface: AttributeColumnsController

Sets a value to the given row,column pair (cell). If the class of the value is not the column type class, it will try to parse the toString representation of the value.

Takes care to avoid parsing exceptions of the target column type.

Also, this will not set a null value to a column that can't have null values (see canClearColumnData method) if the given object is null or the parsing fails.

Specified by:
setAttributeValue in interface AttributeColumnsController
Parameters:
value - Value to set, can be null
row - Row
column - Column
Returns:
True if the value was set, false otherwise

addAttributeColumn

public AttributeColumn addAttributeColumn(AttributeTable table,
                                          java.lang.String title,
                                          AttributeType type)
Description copied from interface: AttributeColumnsController

Adds a new column to the specified table with the given title and type of column.

The title for the new column can't be repeated in the table, null or an empty string.

.

The id of the column will be set to the same as the title, but if the first TimeInterval column of the table is created it will be given the default dynamic time interval id to be able to use dynamic filters.

The AttributeOrigin of the column will be set to DATA.

Default column value will be set to null.

Specified by:
addAttributeColumn in interface AttributeColumnsController
Parameters:
table - Table to add the column
title - Title for the new column, can't be repeated in the table, null or empty string
type - Type for the new column
Returns:
The created column or null if the column could not be created

deleteAttributeColumn

public void deleteAttributeColumn(AttributeTable table,
                                  AttributeColumn column)
Description copied from interface: AttributeColumnsController

Deletes the specified column from a table if the table has the column and data laboratory behaviour allows to delete it (see canDeleteColumn method).

Specified by:
deleteAttributeColumn in interface AttributeColumnsController
Parameters:
table - Table to delete the column
column - Column to delete

duplicateColumn

public AttributeColumn duplicateColumn(AttributeTable table,
                                       AttributeColumn column,
                                       java.lang.String title,
                                       AttributeType type)
Description copied from interface: AttributeColumnsController

Duplicates a given column of a table and copies al row values.

If the AttributeType for the new column is different from the old column type, it will try to parse each value. If it is not possible, the value will be set to null.

The title for the new column can't be repeated in the table, null or an empty string.

.

The id of the column will be set to the title.

The AttributeOrigin of the column will be set to DATA.

Default column value will be set to null.

Specified by:
duplicateColumn in interface AttributeColumnsController
Parameters:
table - Table of the column to duplicate
column - Column to duplicate
title - Title for the new column
type - AttributeType for the new column
Returns:
The created column or null if the column could not be created

copyColumnDataToOtherColumn

public void copyColumnDataToOtherColumn(AttributeTable table,
                                        AttributeColumn sourceColumn,
                                        AttributeColumn targetColumn)
Description copied from interface: AttributeColumnsController

Copies all row values of a column to another column.

If the AttributeType for the target is different from the source column type, it will try to parse each value. If it is not possible, the value will be set to null.

Source and target columns must be different.

Specified by:
copyColumnDataToOtherColumn in interface AttributeColumnsController
Parameters:
table - Table of the columns
sourceColumn - Source column
targetColumn - Target column

fillColumnWithValue

public void fillColumnWithValue(AttributeTable table,
                                AttributeColumn column,
                                java.lang.String value)
Description copied from interface: AttributeColumnsController

Fills the data values of a given column of a table with a value as a String, parsing it for the AttributeType of the column. If it is not possible to parse, the value will be set to null.

Specified by:
fillColumnWithValue in interface AttributeColumnsController
Parameters:
table - Table of the column
column - Column to fill
value - String representation of the value for each row of the column

fillNodesColumnWithValue

public void fillNodesColumnWithValue(Node[] nodes,
                                     AttributeColumn column,
                                     java.lang.String value)
Description copied from interface: AttributeColumnsController

Fills the data values of a given column of the indicated nodes with a value as a String, parsing it for the AttributeType of the column. If it is not possible to parse, the value will be set to null.

Specified by:
fillNodesColumnWithValue in interface AttributeColumnsController
Parameters:
nodes - Nodes to fill
column - Column to fill
value - String representation of the value for the column for each node

fillEdgesColumnWithValue

public void fillEdgesColumnWithValue(Edge[] edges,
                                     AttributeColumn column,
                                     java.lang.String value)
Description copied from interface: AttributeColumnsController

Fills the data values of a given column of the indicated edges with a value as a String, parsing it for the AttributeType of the column. If it is not possible to parse, the value will be set to null.

Specified by:
fillEdgesColumnWithValue in interface AttributeColumnsController
Parameters:
edges - Edges to fill
column - Column to fill
value - String representation of the value for the column for each edge

clearColumnData

public void clearColumnData(AttributeTable table,
                            AttributeColumn column)
Description copied from interface: AttributeColumnsController

Clears all rows data for a given column of a table (nodes table or edges table)

Specified by:
clearColumnData in interface AttributeColumnsController
Parameters:
table - Table to clear column data
column - Column to clear data

calculateColumnValuesFrequencies

public java.util.Map<java.lang.Object,java.lang.Integer> calculateColumnValuesFrequencies(AttributeTable table,
                                                                                          AttributeColumn column)
Description copied from interface: AttributeColumnsController

Calculates the absolute frequency of appearance of each value of the given column and returns a Map containing each different value mapped to its frequency of appearance.

Specified by:
calculateColumnValuesFrequencies in interface AttributeColumnsController
Parameters:
table - Table of the column
column - Column to calculate values frequencies
Returns:
Map containing each different value mapped to its frequency of appearance

createBooleanMatchesColumn

public AttributeColumn createBooleanMatchesColumn(AttributeTable table,
                                                  AttributeColumn column,
                                                  java.lang.String newColumnTitle,
                                                  java.util.regex.Pattern pattern)
Description copied from interface: AttributeColumnsController

Creates a new BOOLEAN column from the given column and regular expression filling it with boolean values that indicate if each of the old column values match the regular expression.

Title for the new column can't be repeated in the table, null or empty.

Specified by:
createBooleanMatchesColumn in interface AttributeColumnsController
Parameters:
table - Table of the column to match
column - Column to match
newColumnTitle - Title for the new boolean column
pattern - Regular expression to match
Returns:
New created column or null if title is not correct

negateBooleanColumn

public void negateBooleanColumn(AttributeTable table,
                                AttributeColumn column)
Description copied from interface: AttributeColumnsController

Negates not null values of a given BOOLEAN or LIST_BOOLEANcolumn.

Throws IllegalArgumentException if the column does not have BOOLEAN or LIST_BOOLEAN AttributeType.

Specified by:
negateBooleanColumn in interface AttributeColumnsController
Parameters:
table - Table of the column to negate
column - Boolean column to negate

createFoundGroupsListColumn

public AttributeColumn createFoundGroupsListColumn(AttributeTable table,
                                                   AttributeColumn column,
                                                   java.lang.String newColumnTitle,
                                                   java.util.regex.Pattern pattern)
Description copied from interface: AttributeColumnsController

Creates a new LIST_STRING column from the given column and regular expression with values that are the list of matching groups for the given regular expression for each row.

The title for the new column can't be repeated in the table, null or an empty string.

.

Specified by:
createFoundGroupsListColumn in interface AttributeColumnsController
Parameters:
table - Table of the column to match
column - Column to match
newColumnTitle - Title for the new boolean column
pattern - Regular expression to match
Returns:
New created column or null if title is not correct

clearNodeData

public void clearNodeData(Node node,
                          AttributeColumn[] columnsToClear)
Description copied from interface: AttributeColumnsController

Clears all node attributes except computed attributes and id, checking first that the node is in the graph.

Columns to clear can be specified, but id and computed columns will not be cleared.

Specified by:
clearNodeData in interface AttributeColumnsController
Parameters:
node - Node to clear data
columnsToClear - Columns of the node to clear. All columns will be cleared if it is null

clearNodesData

public void clearNodesData(Node[] nodes,
                           AttributeColumn[] columnsToClear)
Description copied from interface: AttributeColumnsController

Clears all the nodes attributes except computed attributes and id.

Columns to clear can be specified, but id and computed columns will not be cleared.

Specified by:
clearNodesData in interface AttributeColumnsController
Parameters:
nodes - Array of nodes to clear data
columnsToClear - Columns of the nodes to clear. All columns will be cleared if it is null

clearEdgeData

public void clearEdgeData(Edge edge,
                          AttributeColumn[] columnsToClear)
Description copied from interface: AttributeColumnsController

Clears all edge attributes except computed attributes and id.

Columns to clear can be specified, but id and computed columns will not be cleared.

Specified by:
clearEdgeData in interface AttributeColumnsController
Parameters:
edge - Edge to clear data
columnsToClear - Columns of the edge to clear. All columns will be cleared if it is null

clearEdgesData

public void clearEdgesData(Edge[] edges,
                           AttributeColumn[] columnsToClear)
Description copied from interface: AttributeColumnsController

Clears all the edges attributes except computed attributes and id, checking first that the edges are in the graph.

Columns to clear can be specified, but id and computed columns will not be cleared.

Specified by:
clearEdgesData in interface AttributeColumnsController
Parameters:
edges - Array of edges to clear data
columnsToClear - Columns of the edges to clear. All columns will be cleared if it is null

clearRowData

public void clearRowData(Attributes row,
                         AttributeColumn[] columnsToClear)
Description copied from interface: AttributeColumnsController

Clears row attributes except computed attributes and id if node/edge row.

Columns to clear can be specified, but id of node/edge and computed columns will not be cleared.

Specified by:
clearRowData in interface AttributeColumnsController
Parameters:
row - Array of rows to clear data
columnsToClear - Columns of the row to clear. All columns will be cleared if it is null

copyNodeDataToOtherNodes

public void copyNodeDataToOtherNodes(Node node,
                                     Node[] otherNodes,
                                     AttributeColumn[] columnsToCopy)
Description copied from interface: AttributeColumnsController

Copies attributes data of the given node to the other rows except computed attributes and id.

Columns to copy can be specified, but id node and computed columns will not be copied.

Specified by:
copyNodeDataToOtherNodes in interface AttributeColumnsController
Parameters:
node - Node to copy data from
otherNodes - Nodes to copy data to
columnsToCopy - Columns of the node to copy. All columns will be copied if it is null

copyEdgeDataToOtherEdges

public void copyEdgeDataToOtherEdges(Edge edge,
                                     Edge[] otherEdges,
                                     AttributeColumn[] columnsToCopy)
Description copied from interface: AttributeColumnsController

Copies attributes data of the given edge to the other rows except computed attributes and id.

Columns to copy can be specified, but id edge and computed columns will not be copied.

Specified by:
copyEdgeDataToOtherEdges in interface AttributeColumnsController
Parameters:
edge - Edge to copy data from
otherEdges - Edges to copy data to
columnsToCopy - Columns of the edge to copy. All columns will be copied if it is null

copyRowDataToOtherRows

public void copyRowDataToOtherRows(Attributes row,
                                   Attributes[] otherRows,
                                   AttributeColumn[] columnsToCopy)
Description copied from interface: AttributeColumnsController

Copies attributes data of the given row to the other rows except computed attributes and id if node/edge.

Columns to copy can be specified, but id of node/edge and computed columns will not be copied.

Specified by:
copyRowDataToOtherRows in interface AttributeColumnsController
Parameters:
row - Row to copy data from
otherRows - Rows to copy data to
columnsToCopy - Columns of the row to copy. All columns will be copied if it is null

getTableAttributeRows

public Attributes[] getTableAttributeRows(AttributeTable table)
Description copied from interface: AttributeColumnsController

Returns all rows of a given table (node or edges table).

Used for iterating through all attribute rows of a table

Specified by:
getTableAttributeRows in interface AttributeColumnsController
Parameters:
table - Table to get attribute rows
Returns:
Array of attribute rows of the table

getTableRowsCount

public int getTableRowsCount(AttributeTable table)
Description copied from interface: AttributeColumnsController

Counts the number of rows of a table (nodes or edges table) and returns the result.

Uses GraphElementsController getNodesCount and getEdgesCount to calculate the result.

Specified by:
getTableRowsCount in interface AttributeColumnsController
Returns:
the number of rows in table

isNodeTable

public boolean isNodeTable(AttributeTable table)
Description copied from interface: AttributeColumnsController

Checks if the given table is nodes table.

Specified by:
isNodeTable in interface AttributeColumnsController
Returns:
True if the table is nodes table, false otherwise

isEdgeTable

public boolean isEdgeTable(AttributeTable table)
Description copied from interface: AttributeColumnsController

Checks if the given table is edges table.

Specified by:
isEdgeTable in interface AttributeColumnsController
Returns:
True if the table is edges table, false otherwise

canDeleteColumn

public boolean canDeleteColumn(AttributeColumn column)
Description copied from interface: AttributeColumnsController

Indicates if the Data Laboratory API behaviour allows to delete the given column of a table.

The behaviour is: Any column that does not have a AttributeOrigin of type PROPERTY can be deleted.

Specified by:
canDeleteColumn in interface AttributeColumnsController
Parameters:
column - Column to check if it can be deleted
Returns:
True if it can be deleted, false otherwise

canChangeColumnData

public boolean canChangeColumnData(AttributeColumn column)
Description copied from interface: AttributeColumnsController

Indicates if the Data Laboratory API behaviour allows to change a value of the given column of a table.

The behaviour is: Only values of columns with AttributeOrigin of type DATA or a node/edge label and weight column can be changed. (but weight can't be null. see canClearColumnData method).

Also, columns with a DYNAMIC or TIME_INTERVAL AttributeType are not allowed to be changed since they are only used for dynamic attributes purposes.

Specified by:
canChangeColumnData in interface AttributeColumnsController
Parameters:
column - Column to theck its values can be changed
Returns:
True if the column values can be changed, false otherwise

canClearColumnData

public boolean canClearColumnData(AttributeColumn column)
Description copied from interface: AttributeColumnsController

Indicates if the Data Laboratory API behaviour allows to set as null a value of the given column of a table.

The behaviour is: Only values of columns with AttributeOrigin of type DATA or a node/edge label column can be set to null. Edge weight can't be null

Also, columns with a DYNAMIC or TIME_INTERVAL AttributeType are not allowed to be cleared since they are only used for dynamic attributes purposes.

Specified by:
canClearColumnData in interface AttributeColumnsController
Parameters:
column - Column to theck its values can be changed
Returns:
True if the column values can be changed, false otherwise

getNumberOrNumberListColumnStatistics

public java.math.BigDecimal[] getNumberOrNumberListColumnStatistics(AttributeTable table,
                                                                    AttributeColumn column)
Description copied from interface: AttributeColumnsController

Calculates all statistics at once from a number/number list column using MathUtils class.

Returns an array of length=8 of BigDecimal numbers with the results in the following order:

  1. average
  2. first quartile (Q1)
  3. median
  4. third quartile (Q3)
  5. interquartile range (IQR)
  6. sum
  7. minimumValue
  8. maximumValue

The column can only be a number/number list column.

Otherwise, a IllegalArgumentException will be thrown.

Specified by:
getNumberOrNumberListColumnStatistics in interface AttributeColumnsController
Parameters:
table - Table of the column
column - Column to get statistics
Returns:
Array with statistics

getColumnNumbers

public java.lang.Number[] getColumnNumbers(AttributeTable table,
                                           AttributeColumn column)
Description copied from interface: AttributeColumnsController

Prepares an array with all not null numbers of all the rows of a given column.

The column can only be a number/number list column.

Otherwise, a IllegalArgumentException will be thrown.

Specified by:
getColumnNumbers in interface AttributeColumnsController
Parameters:
table - Table of the column to get numbers
column - Column to get numbers
Returns:
Array with all numbers.

getRowsColumnNumbers

public java.lang.Number[] getRowsColumnNumbers(Attributes[] rows,
                                               AttributeColumn column)
Description copied from interface: AttributeColumnsController

Prepares an array only with all not null numbers the indicated rows of a given column.

The column can only be a number/number list column.

Otherwise, a IllegalArgumentException will be thrown.

Specified by:
getRowsColumnNumbers in interface AttributeColumnsController
Parameters:
rows - Rows to get numbers
column - Column to get numbers
Returns:
Array with all numbers.

getRowNumbers

public java.lang.Number[] getRowNumbers(Attributes row,
                                        AttributeColumn[] columns)
Description copied from interface: AttributeColumnsController

Prepares an array with all not null numbers of a row using only the given columns.

The columns can only be number/dynamic number/number list columns (in any combination).

All numbers intervals of a dynamic number column will be used.

Otherwise, a IllegalArgumentException will be thrown.

Specified by:
getRowNumbers in interface AttributeColumnsController
Parameters:
row - Row to get numbers
columns - Columns of the row to use
Returns:
Array with all numbers

importCSVToNodesTable

public void importCSVToNodesTable(java.io.File file,
                                  java.lang.Character separator,
                                  java.nio.charset.Charset charset,
                                  java.lang.String[] columnNames,
                                  AttributeType[] columnTypes,
                                  boolean assignNewNodeIds)
Description copied from interface: AttributeColumnsController

Method for importing CSV file data to nodes table.

Only special case is treating columns is id columns: first column found named 'id' (case insensitive) will be used as node id, others will be ignored.

No special column must be provided.

If a column name is not already in nodes table, it will be created with the corresponding columnType index.

If a node id already exists, depending on assignNewNodeIds, a new id will be assigned to it or instead, the already existing node attributes will be updated with the CSV data

Specified by:
importCSVToNodesTable in interface AttributeColumnsController
Parameters:
file - CSV file
separator - Separator of values of the CSV file
charset - Charset of the CSV file
columnNames - Names of the columns in the CSV file to use
columnTypes - Types of the columns in the CSV file to use when creating columns
assignNewNodeIds - Indicates if nodes should be assigned new ids when the ids are already in nodes table or not provided.

importCSVToEdgesTable

public void importCSVToEdgesTable(java.io.File file,
                                  java.lang.Character separator,
                                  java.nio.charset.Charset charset,
                                  java.lang.String[] columnNames,
                                  AttributeType[] columnTypes,
                                  boolean createNewNodes)
Description copied from interface: AttributeColumnsController

Method for importing csv data to edges table.

Column named 'Source' and 'Target' (case insensitive) should be provided. Any row that does not provide a source and target nodes ids will be ignored.

If no 'Type' (case insensitive) column is provided, all edges will be directed.

If an edge already exists and cannot be created, it will be ignored but the weight of the existing edge will be increased with each repetition.

Special cases are id, source, target and type columns:

Specified by:
importCSVToEdgesTable in interface AttributeColumnsController
Parameters:
file - CSV file
separator - Separator of values of the CSV file
charset - Charset of the CSV file
columnNames - Names of the columns in the CSV file to use
columnTypes - Types of the columns in the CSV file to use when creating columns
createNewNodes - Indicates if missing nodes should be created when an edge declares a source or target id not already existing

mergeRowsValues

public void mergeRowsValues(AttributeTable table,
                            AttributeRowsMergeStrategy[] mergeStrategies,
                            Attributes[] rows,
                            Attributes selectedRow,
                            Attributes resultRow)
Description copied from interface: AttributeColumnsController

Merges the given rows values to the given result row using one merge strategy for each column of the table.

The number of columns must be equal to the number of merge strategies provided

No parameters can be null except selectedRow (first row will be used in case selectedRow is null)

If any strategy is null, the value of the selectedRow will be used

Specified by:
mergeRowsValues in interface AttributeColumnsController
Parameters:
table - Table of the rows
mergeStrategies - Strategies for each column of the table
rows - Rows to merge (at least 1)
selectedRow - Main selected row or null (first row will be used in case selectedRow is null)
resultRow - Already existing row to put the values on

detectNodeDuplicatesByColumn

public java.util.List<java.util.List<Node>> detectNodeDuplicatesByColumn(AttributeColumn column,
                                                                         boolean caseSensitive)
Description copied from interface: AttributeColumnsController

Finds and returns nodes duplicates based on the values of a given column of nodes table

A node is a duplicate of other if they have the same value (String representation of the values is used) in the given column.

This is useful to be used to automatically merge duplicated nodes

Specified by:
detectNodeDuplicatesByColumn in interface AttributeColumnsController
Parameters:
column - Column to use values to detect duplicates
caseSensitive - Case insensitivity when comparing the column values
Returns:
List of node duplicates groups (at least 2 nodes in each group)

Gephi Toolkit Javadoc