public interface AttributeTable
Tracking added or removed columns can be performed by adding an
AttributeListener to this table.
AttributeColumn,
AttributeRow| Modifier and Type | Method and Description |
|---|---|
AttributeColumn |
addColumn(String id,
AttributeType type)
Creates and add a new column to this table.
|
AttributeColumn |
addColumn(String id,
AttributeType type,
AttributeOrigin origin)
Creates and add a new column to this table.
|
AttributeColumn |
addColumn(String id,
String title,
AttributeType type,
AttributeOrigin origin,
Object defaultValue)
Creates and add a new column to this table.
|
AttributeColumn |
addColumn(String id,
String title,
AttributeType type,
AttributeValueDelegateProvider attributeValueDelegateProvider,
Object defaultValue)
Creates and add a new column to this table.
|
AttributeColumn |
addPropertiesColumn(PropertiesColumn propertiesColumn)
Creates and add a new properties column to this table.
|
int |
countColumns()
Returns the number of column in this table.
|
AttributeColumn |
getColumn(int index)
Gets the column at the
index of null if the
index is not valid. |
AttributeColumn |
getColumn(String id)
Gets the column with the given identifier or
null if it is
not found. |
AttributeColumn |
getColumn(String title,
AttributeType type)
Gets the column which match the given parameters or
null
if it is not found. |
AttributeColumn[] |
getColumns()
Returns the current columns.
|
String |
getName()
Returns the name of this table.
|
boolean |
hasColumn(String title)
Return
true if this table has a column with the given
title or id. |
void |
mergeTable(AttributeTable table)
Merge this table with the given
table given. |
void |
removeColumn(AttributeColumn column)
If exists, remove the column and all rows values.
|
AttributeColumn |
replaceColumn(AttributeColumn source,
String id,
String title,
AttributeType type,
AttributeOrigin origin,
Object defaultValue)
If exists, replace
source by the new column created from params. |
String getName()
AttributeColumn[] getColumns()
int countColumns()
AttributeColumn addColumn(String id, AttributeType type)
Creates and add a new column to this table. The default origin is set at DATA.
The title of the column is the identifier.
id - the identifier of the columntype - the type of the columnAttributeColumn addColumn(String id, AttributeType type, AttributeOrigin origin)
Creates and add a new column to this table.
The title of the column is the identifier.
id - the identifier of the columntype - the type of the columnorigin - the origin of the columnAttributeColumn addColumn(String id, String title, AttributeType type, AttributeOrigin origin, Object defaultValue)
Creates and add a new column to this table.
The title can't be null, empty or already existing in the table
id - the identifier of the columntitle - the title of the columntype - the type of the columnorigin - the origin of the column.defaultValue - the default value of the column.AttributeColumn addColumn(String id, String title, AttributeType type, AttributeValueDelegateProvider attributeValueDelegateProvider, Object defaultValue)
Creates and add a new column to this table.
The title can't be null, empty or already existing in the table
Attribute origin will be set to AttributeOrigin.DELEGATE.
*id - the identifier of the columntitle - the title of the columntype - the type of the columnattributeValueDelegateProvider - the attribute value delegate provider of the columndefaultValue - the default value of the columnAttributeColumn addPropertiesColumn(PropertiesColumn propertiesColumn)
propertiesColumn - the properties columnvoid removeColumn(AttributeColumn column)
column - the column that is to be removedAttributeColumn replaceColumn(AttributeColumn source, String id, String title, AttributeType type, AttributeOrigin origin, Object defaultValue)
source by the new column created from params.source - the column that is to be removedid - the identifier of the columntitle - the title of the columntype - the type of the columndefaultValue - the default value of the columnnull if source can't be foundAttributeColumn getColumn(int index)
index of null if the
index is not valid.index - a valid column index rangenull if not foundAttributeColumn getColumn(String id)
null if it is
not found.id - the column id or titlenull if not foundAttributeColumn getColumn(String title, AttributeType type)
null
if it is not found.title - the column id or titletype - the column typenull if not foundboolean hasColumn(String title)
true if this table has a column with the given
title or id.title - the column title that is to be searchedtrue if found, or false
otherwisevoid mergeTable(AttributeTable table)
table given. New columns from
table are added to this table.
Columns are compared according to their id and type.
Columns found in model are appended only if they no column
exist with the same id and type.
table - the table that is to be merged with this tableCopyright © 2007-2012 Gephi Consortium. All Rights Reserved.