Cytoscape 3.0.1 API

org.cytoscape.model
Interface CyColumn


public interface CyColumn

This class describes a column in a CyTable.


Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.

Method Summary
 Object getDefaultValue()
          Returns the default value for the column, possibly null.
 Class<?> getListElementType()
          Returns the data type of the list elements if the column type is List.class otherwise null.
 String getName()
          Returns the name of the column.
 CyTable getTable()
          Returns the table for this column.
 Class<?> getType()
          Returns the data type of the column.
<T> List<T>
getValues(Class<? extends T> type)
          Returns all the values, some of which may be null, for this given column.
 VirtualColumnInfo getVirtualColumnInfo()
          Returns information about the virtual column definition of this column.
 boolean isImmutable()
          Returns true if the column is immutable i.e.
 boolean isPrimaryKey()
          Returns true if the column is the primary key, otherwise false.
 void setName(String newName)
          Change the name of this column.
 

Method Detail

getName

String getName()
Returns the name of the column.

Returns:
the name of the column.

setName

void setName(String newName)
Change the name of this column. If another column with a matching name already exists, IllegalArgumentException will be thrown. The check for matching column names is case insensitive.

Parameters:
newName - the new column name
Throws:
IllegalArgumentException - if the column is immutable

getType

Class<?> getType()
Returns the data type of the column.

Returns:
the data type of the column.

getListElementType

Class<?> getListElementType()
Returns the data type of the list elements if the column type is List.class otherwise null.

Returns:
the data type of the list elements if the column type is List.class otherwise null

isPrimaryKey

boolean isPrimaryKey()
Returns true if the column is the primary key, otherwise false.

Returns:
true if the column is the primary key, otherwise false.

isImmutable

boolean isImmutable()
Returns true if the column is immutable i.e. cannot be deleted or renamed, otherwise false.

Returns:
true if the column is immutable i.e. cannot be deleted or renamed, otherwise false. Please note that this does not affect the ability to add or modify values in this column!

getTable

CyTable getTable()
Returns the table for this column.

Returns:
the table that this column is a part of

getValues

<T> List<T> getValues(Class<? extends T> type)
Returns all the values, some of which may be null, for this given column. When type is List.class, call getListElementType() get the type of the list elements.

Type Parameters:
T - the generic type of the column.
Parameters:
type - the datatype of this column. (You can use getType() to obtain it.)
Returns:
the values in this column in some arbitrary but consistent order. When type is List.class, a List is returned.

getVirtualColumnInfo

VirtualColumnInfo getVirtualColumnInfo()
Returns information about the virtual column definition of this column. This method will return an instance even if the column is not virtual.

Returns:
an instance of VirtualColumnInfo.

getDefaultValue

Object getDefaultValue()
Returns the default value for the column, possibly null.

Returns:
The default value for the column, possibly null.

Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.