public interface CyTableManagerA singleton object for managing registered
CyTableis created through a
CyTableFactory, it exists independently from the rest of Cytoscape. However, when a
CyTableis registered through the
CyTableManagerdoes the following things for the
It fires the
TableAddedEventto inform other parts of Cytoscape that the
CyTablewas added to the
It also makes the
CyTableavailable to other parts of Cytoscape through methods like
Because registering the
CyTablenotifies Cytoscape about the
CyTable, Cytoscape will ensure that the
CyTableis saved (see
CyTable.setSavePolicy(org.cytoscape.model.SavePolicy)). If the
CyTableis not registered with the
CyTableManager, it will not be saved according to its
This interface, unfortunately, uses very confusing method names. Here is an explanation.
CyTables are explicitly mapped to
CyEdges through the
CyTables are obtained through
getLocalTables(java.lang.Class<? extends org.cytoscape.model.CyIdentifiable>).
CyTables are not explicitly mapped to network objects. Note that columns in an unassociated table can still be "mapped" to network objects when an associated table has a virtual column from an unassociated table. Unassigned tables are obtained from
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>model-api</artifactId> </dependency>
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.
- It fires the
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
addTable(CyTable table)Registers a new table with the manager and fires a TableAddedEvent event.
deleteTable(long suid)Deletes a mutable table.
getAllTables(boolean includePrivate)Returns a Set of all tables with the specified visibility.
getGlobalTables()Returns a set of all global tables.
getLocalTables(Class<? extends CyIdentifiable> type)Returns set of all local tables for the given data type.
getTable(long suid)Returns the table with the specified SUID.
reset()Releases all currently held references and resources.
getAllTablesReturns a Set of all tables with the specified visibility.
includePrivate- Whether to include private CyTables in the list (i.e. all possible CyTables) or not.
- A Set containing CyTable SUIDs either including private CyTables (i.e. meaning all possible CyTables) or just public CyTables.
void addTable(CyTable table)Registers a new table with the manager and fires a TableAddedEvent event.
table- a non-null CyTable that will be added to the manager
CyTable getTable(long suid)Returns the table with the specified SUID.
suid- The SUID identifying the CyTable.
- The CyTable identified by the suid. Will return null if a CyTable doesn't exist for the specified SUID.
void deleteTable(long suid)Deletes a mutable table.
suid- the SUID identifying the CyTable to be deleted
IllegalArgumentException- if the table that we requested to be deleted is immutable or if any of its columns are virtual columns in other tables
void reset()Releases all currently held references and resources.
getGlobalTablesReturns a set of all global tables. "Global tables" are tables that are not explicitly mapped to
- All registered global tables
Set<CyTable> getLocalTables(Class<? extends CyIdentifiable> type)Returns set of all local tables for the given data type. "Local tables" are tables that are explicitly mapped to
CyEdges. This method has nothing to do with
type- Type of the network object, i.e.,
- Set of all registered tables associated with the given data type.