Cytoscape 3.0.0-beta1 API

org.cytoscape.session
Class CySession.Builder

java.lang.Object
  extended by org.cytoscape.session.CySession.Builder
Enclosing class:
CySession

public static class CySession.Builder
extends Object

A implementation of the builder pattern used to construct immutable instances of CySession objects.


Cytoscape Backwards Compatibility (Static Class): This class is static and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.

Constructor Summary
CySession.Builder()
           
 
Method Summary
 CySession.Builder appFileListMap(Map<String,List<File>> p)
          Returns an instance of Builder that has at least been configured with the specified app file list map.
The app name should follow the java class namespace convention (e.g.
 CySession build()
          Returns a complete instance of CySession based upon the methods called on this instance of Builder.
 CySession.Builder networks(Set<CyNetwork> networks)
          Returns an instance of Builder that has at least been configured with the specified networks.
 CySession.Builder networkViews(Set<CyNetworkView> views)
          Returns an instance of Builder that has at least been configured with the specified network views.
 CySession.Builder objectMap(Map<Class<? extends CyIdentifiable>,Map<Object,? extends CyIdentifiable>> map)
          Returns an instance of Builder that has at least been configured with the specified old ID maps.
 CySession.Builder properties(Set<CyProperty<?>> p)
          Returns an instance of Builder that has at least been configured with the specified properties.
 CySession.Builder tables(Set<CyTableMetadata> tables2)
          Returns an instance of Builder that has at least been configured with the specified tables.
 CySession.Builder viewVisualStyleMap(Map<CyNetworkView,String> vs)
          Returns an instance of Builder that has at least been configured with the specified network view visual style name map.
 CySession.Builder visualStyles(Set<VisualStyle> styles)
          Returns an instance of Builder that has at least been configured with the specified properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CySession.Builder

public CySession.Builder()
Method Detail

build

public CySession build()
Returns a complete instance of CySession based upon the methods called on this instance of Builder.

Returns:
A fully configured instanced of CySession.

networks

public CySession.Builder networks(Set<CyNetwork> networks)
Returns an instance of Builder that has at least been configured with the specified networks.

Parameters:
views - A Set of CyNetwork objects, presumably all networks that exist in this instance of Cytoscape.
Returns:
An instance of Builder that has at least been configured with the specified networks.

networkViews

public CySession.Builder networkViews(Set<CyNetworkView> views)
Returns an instance of Builder that has at least been configured with the specified network views.

Parameters:
views - A Set of CyNetworkView objects, presumably all network views that exist in this instance of Cytoscape.
Returns:
An instance of Builder that has at least been configured with the specified network views.

tables

public CySession.Builder tables(Set<CyTableMetadata> tables2)
Returns an instance of Builder that has at least been configured with the specified tables.

Parameters:
tables2 - A Set of CyTable objects, presumably all tables that exist in this instance of Cytoscape.
Returns:
An instance of Builder that has at least been configured with the specified tables.

viewVisualStyleMap

public CySession.Builder viewVisualStyleMap(Map<CyNetworkView,String> vs)
Returns an instance of Builder that has at least been configured with the specified network view visual style name map.

Parameters:
vs - A map of CyNetworkViews to the names of the VisualStyle currently applied to that network view, for presumably all network views that exist in this instance of Cytoscape.
Returns:
An instance of Builder that has at least been configured with the specified network view visual style name map.

properties

public CySession.Builder properties(Set<CyProperty<?>> p)
Returns an instance of Builder that has at least been configured with the specified properties.

Parameters:
p - A set of session related CyProperty objects.
Returns:
An instance of Builder that has at least been configured with the specified properties.

visualStyles

public CySession.Builder visualStyles(Set<VisualStyle> styles)
Returns an instance of Builder that has at least been configured with the specified properties.

Parameters:
styles - All VisualStyles in this instance of Cytoscape.
Returns:
An instance of Builder that has at least been configured with the specified properties.

appFileListMap

public CySession.Builder appFileListMap(Map<String,List<File>> p)
Returns an instance of Builder that has at least been configured with the specified app file list map.
The app name should follow the java class namespace convention (e.g. org.orgname.appname) in order to prevent name collisions. The "org.cytoscape" domain is reserved for core Cytoscape apps (e.g. org.cytoscape.filter).

Parameters:
p - A map of app names to a list of File objects that the given app wants stored in the session file. The app name should follow the java class namespace convention.
Returns:
An instance of Builder that has at least been configured with the specified app file list map.

objectMap

public CySession.Builder objectMap(Map<Class<? extends CyIdentifiable>,Map<Object,? extends CyIdentifiable>> map)
Returns an instance of Builder that has at least been configured with the specified old ID maps.

Parameters:
map - A map of CyIdentifiable types to maps that have former identifiers as keys and CyNodes, CyEdges, CyNetworks or CyNetworkViews as values.
Returns:
An instance of Builder that has at least been configured with the specified map.

Cytoscape 3.0.0-beta1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.