Package org.cytoscape.session
Class CySession.Builder
java.lang.Object
org.cytoscape.session.CySession.Builder
- Enclosing class:
- CySession
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
-
Method Summary
Modifier and TypeMethodDescriptionappFileListMap
(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.build()
Returns a complete instance of CySession based upon the methods called on this instance of Builder.columnStyleAssociations
(Set<StyleAssociation> associations) Returns an instance of Builder that has at least been configured with the specified properties.Returns an instance of Builder that has at least been configured with the specified networks.networkViews
(Set<CyNetworkView> views) Returns an instance of Builder that has at least been configured with the specified network views.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.properties
(Set<CyProperty<?>> p) Returns an instance of Builder that has at least been configured with the specified properties.tables
(Set<CyTableMetadata> tables2) Returns an instance of Builder that has at least been configured with the specified tables.tableStyles
(Set<VisualStyle> styles) Returns an instance of Builder that has at least been configured with the specified properties.tableViews
(Set<CyTableViewMetadata> views) Returns an instance of Builder that has at least been configured with the specified table views.Returns an instance of Builder that has at least been configured with the specified network view visual style name map.visualStyles
(Set<VisualStyle> styles) Returns an instance of Builder that has at least been configured with the specified properties.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
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
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.
-
tableViews
Returns an instance of Builder that has at least been configured with the specified table views.- Parameters:
views
- A Set of CyTableView objects, presumably all table views that exist in this instance of Cytoscape.- Returns:
- An instance of Builder that has at least been configured with the specified table views.
-
tables
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
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
Returns an instance of Builder that has at least been configured with the specified properties.- Parameters:
p
- A set of session relatedCyProperty
objects.- Returns:
- An instance of Builder that has at least been configured with the specified properties.
-
visualStyles
Returns an instance of Builder that has at least been configured with the specified properties.- Parameters:
styles
- All network VisualStyles in this instance of Cytoscape.- Returns:
- An instance of Builder that has at least been configured with the specified properties.
-
tableStyles
Returns an instance of Builder that has at least been configured with the specified properties.- Parameters:
styles
- All table VisualStyles in this instance of Cytoscape.- Returns:
- An instance of Builder that has at least been configured with the specified properties.
-
columnStyleAssociations
Returns an instance of Builder that has at least been configured with the specified properties.- Parameters:
associations
- All column style associations in this instance of Cytoscape.- Returns:
- An instance of Builder that has at least been configured with the specified properties.
-
appFileListMap
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 ofCyIdentifiable
types to maps that have former identifiers as keys andCyNode
s,CyEdge
s,CyNetwork
s orCyNetworkView
s as values.- Returns:
- An instance of Builder that has at least been configured with the specified map.
-