Interface CyJobData


  • public interface CyJobData
    CyJobData presents a general interface to sending data to and receiving data from a job. The api is meant to be very similar to that of a Map, with String keys and arbirary Objects as values. Note that no type checking is done -- the values might contain other Maps, Lists or a variety of other objects (notably Cytoscape model and view model objects). The detailed implementation for this object is managed by a CyJobDataService which should be able to use the information contains within the object to create the appropriate data structure to send to a remote job ({@see CyJobDataService#getSerializedData(CyJobData)}) and retrieve the information from the remote job ({@see CyJobDataService#unSerialize(Object)}).

    Module: jobs-api

    To use this in your app, include the following dependency in your POM:

    <dependency>
        <groupId>org.cytoscape</groupId>
        <artifactId>jobs-api</artifactId>
    </dependency>

    Cytoscape Backwards Compatibility (SPI Interface): We expect that this interface will be implemented. Therefore to maintain backwards compatibility this interface will only be modified for major version updates.
    • Method Detail

      • get

        Object get​(String key)
        Returns the Object that contains the value for the specified key, or null if that key doesn't exist.
        Parameters:
        key - the key to access the requested data
        Returns:
        the data, if that key exists or null
      • keySet

        Set<String> keySet()
        Return the enumerated set of keys in this CyJobData.
        Returns:
        the set of keys
      • containsKey

        boolean containsKey​(String key)
        Test to see if a key exists in the current CyJobData.
        Parameters:
        key - the key to test
        Returns:
        true if that key exists, false otherwise
      • getAllValues

        Map<String,​Object> getAllValues()
        Return all of the values in this CyJobData
        Returns:
        a Map of all of the data in this CyJobData object.
      • put

        void put​(String key,
                 Object value)
        Set the value for a particular key.
        Parameters:
        key - the key to set the value for
        value - the value to set
      • remove

        Object remove​(String key)
        Remove the data for a key
        Parameters:
        key - the key to remove the data for
        Returns:
        the removed object or null if the key doesn't exit
      • clear

        void clear()
        Clear all of the data