Class 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 Detail

      • Builder

        public 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.