Class CySession.Builder

java.lang.Object
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 Details

    • Builder

      public Builder()
  • Method Details

    • 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.
    • tableViews

      public CySession.Builder tableViews(Set<CyTableViewMetadata> views)
      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

      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 network VisualStyles in this instance of Cytoscape.
      Returns:
      An instance of Builder that has at least been configured with the specified properties.
    • tableStyles

      public CySession.Builder tableStyles(Set<VisualStyle> styles)
      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

      public CySession.Builder columnStyleAssociations(Set<StyleAssociation> associations)
      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

      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.