|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AttributeTable
Table hosts columns and permits all manipulation on them. Columns can be appened with different level of details. The table maintains a map with column identifier and title (header) in order they can be retrieved efficiently.
Tracking added or removed columns can be performed by adding an
AttributeListener
to this table.
AttributeColumn
,
AttributeRow
Method Summary | |
---|---|
AttributeColumn |
addColumn(java.lang.String id,
AttributeType type)
Creates and add a new column to this table. |
AttributeColumn |
addColumn(java.lang.String id,
AttributeType type,
AttributeOrigin origin)
Creates and add a new column to this table. |
AttributeColumn |
addColumn(java.lang.String id,
java.lang.String title,
AttributeType type,
AttributeOrigin origin,
java.lang.Object defaultValue)
Creates and add a new column to this table. |
AttributeColumn |
addColumn(java.lang.String id,
java.lang.String title,
AttributeType type,
AttributeValueDelegateProvider attributeValueDelegateProvider,
java.lang.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(java.lang.String id)
Gets the column with the given identifier or null if it is
not found. |
AttributeColumn |
getColumn(java.lang.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. |
java.lang.String |
getName()
Returns the name of this table. |
boolean |
hasColumn(java.lang.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,
java.lang.String id,
java.lang.String title,
AttributeType type,
AttributeOrigin origin,
java.lang.Object defaultValue)
If exists, replace source by the new column created from params. |
Method Detail |
---|
java.lang.String getName()
AttributeColumn[] getColumns()
int countColumns()
AttributeColumn addColumn(java.lang.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 column
AttributeColumn addColumn(java.lang.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 column
AttributeColumn addColumn(java.lang.String id, java.lang.String title, AttributeType type, AttributeOrigin origin, java.lang.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(java.lang.String id, java.lang.String title, AttributeType type, AttributeValueDelegateProvider attributeValueDelegateProvider, java.lang.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 column
AttributeColumn addPropertiesColumn(PropertiesColumn propertiesColumn)
propertiesColumn
- the properties column
void removeColumn(AttributeColumn column)
column
- the column that is to be removedAttributeColumn replaceColumn(AttributeColumn source, java.lang.String id, java.lang.String title, AttributeType type, AttributeOrigin origin, java.lang.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 column
null
if source
can't be foundAttributeColumn getColumn(int index)
index
of null
if the
index is not valid.
index
- a valid column index range
null
if not foundAttributeColumn getColumn(java.lang.String id)
null
if it is
not found.
id
- the column id
or title
null
if not foundAttributeColumn getColumn(java.lang.String title, AttributeType type)
null
if it is not found.
title
- the column id
or title
type
- the column type
null
if not foundboolean hasColumn(java.lang.String title)
true
if this table has a column with the given
title
or id
.
title
- the column title
that is to be searched
true
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 table
|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |