|
Cytoscape 3.0.0-beta1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cytoscape.session.CySession
public final class CySession
A session is an immutable snapshot of the data contents of Cytoscape.
Sessions are only meant for saving and restoring the state of Cytoscape
and are not meant to be used interactively for anything besides
writing, reading, and restoring from session files.
Using the data returned from the various methods in a CySession object
should be sufficient to recreate all aspects of Cytoscape at the time
the session was created.
Creating an instance of CySession is done following the builder pattern.
For example, the following code creates a session that only includes
a list of networkViews and Cytoscape properties, but nothing else.
CySession session = new CySession.Builder().networkViews(viewList).cytoscapeProperties(cyProps).build();
Nested Class Summary | |
---|---|
static class |
CySession.Builder
A implementation of the builder pattern used to construct immutable instances of CySession objects. |
Method Summary | ||
---|---|---|
Map<String,List<File>> |
getAppFileListMap()
Returns a map of app names to lists of File objects that are stored as part of the session for the specified app. |
|
Set<CyNetwork> |
getNetworks()
Returns a set of all CyNetwork objects contained in this Session. |
|
Set<CyNetworkView> |
getNetworkViews()
Returns a set of all CyNetworkView objects contained in this Session. |
|
|
getObject(Long oldSUID,
Class<T> type)
When a session is restored, Cytoscape automatically generates new SUIDs. |
|
|
getObject(String oldId,
Class<T> type)
When a session is restored, Cytoscape automatically generates new SUIDs. |
|
Set<CyProperty<?>> |
getProperties()
Returns a set of CyProperty objects defined for this session. |
|
Set<CyTableMetadata> |
getTables()
Returns a set of all CyTable objects contained in this Session. |
|
Map<CyNetworkView,String> |
getViewVisualStyleMap()
Returns a map of CyNetworkViews to the names of the VisualStyle applied to that network view in this session. |
|
Set<VisualStyle> |
getVisualStyles()
Returns a set containing all VisualStyles defined for this session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Set<CyNetwork> getNetworks()
public Set<CyNetworkView> getNetworkViews()
public Set<CyTableMetadata> getTables()
public Map<CyNetworkView,String> getViewVisualStyleMap()
public Set<CyProperty<?>> getProperties()
CyProperty
objects defined for this session.
CyProperty
objects. defined for this session.public Set<VisualStyle> getVisualStyles()
VisualStyle
objectspublic Map<String,List<File>> getAppFileListMap()
public <T extends CyIdentifiable> T getObject(Long oldSUID, Class<T> type)
CyNode
, CyEdge
, CyNetwork
or CyNetworkView
) given its former SUID.
oldSUID
- The former SUID.type
- The Class of the object to be returned (CyNode
, CyEdge
, CyNetwork
or
CyNetworkView
).
CyNode
, CyEdge
, CyNetwork
or CyNetworkView
) given its former
SUID.public <T extends CyIdentifiable> T getObject(String oldId, Class<T> type)
CyNode
, CyEdge
, CyNetwork
or CyNetworkView
) given its former identifier.
oldId
- The former ID, from Cytocape versions prior than 3.0.type
- The Class of the object to be returned (CyNode
, CyEdge
, CyNetwork
or
CyNetworkView
).
CyNode
, CyEdge
, CyNetwork
or CyNetworkView
) given its former
identifier.
|
Cytoscape 3.0.0-beta1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |