Hi,
I am writing a plugin that requires a table to be attached to a network. It’s a table about CyTable so the unique identifier in this table are table SUIDs. After I created the table and populated the rows, I attach it to a network (app.getTableFactory() returns CyTableFactory, app.getNetworkTableManager() returns CyNetworkTableManager):
CyTable table = app.getTableFactory().createTable(“my table”, “Table_ID”, Long.class, true, false)
table.setSavePolicy(SavePolicy.SESSION_FILE);
…
// create columns and add data
…
// attach the table to a network
app.getNetworkTableManager().setTable(network, CyTable.class, “my_table”, table);
…
// some where else, retrieve the table
app.getNetworkTableManager().getTable(network, CyTable.class, “my_table”); // this works before close cy3, but returns null after session saved and then opened in cy3.
Then I close cytoscape and save the session. What I expect is that the table is still attached to the network, and I can use the CyNetworkTableManager.getTable and the namespace to retrieve the table. However, after the session file is reopened in cy3, CyNetworkTableManager.getTable(network, CyTable.class, “my_table”); returns null.
Is this the intended behavior or a bug? If it’s intended, any suggestions on how to make the network-table relationship persists?
Thank you!
Dazhi
--
You received this message because you are subscribed to the Google Groups "cytoscape-discuss" group.
To post to this group, send email to cytoscap...@googlegroups.com.
To unsubscribe from this group, send email to cytoscape-disc...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cytoscape-discuss?hl=en.
Hi, Jason,
Thanks for the reply. But I actually added the table using the CyTableManager. After I open the session, I can see the table in the Table panel on the bottom of Cy3 window. However, it’s not linked to the network.
Dazhi
Hi, Jason,
Thanks for clarify that. I actually intentionally created this table to store some meta data of tables. The relationship between network and all my other tables (for CyNode.class type) can persist in the reopened session file, just as you said. But the relationship between the network and this table (for CyTable.class type) is lost in the saved session.
Is there any suggestion on how to store some metadata about tables when saving the session?
Thanks!
Da