Package org.cytoscape.util.json
Interface CyJSONUtil
public interface CyJSONUtil
This interface provides some very basic JSON representations of Cytoscape objects. The implementation of this
interface should be included as part of a core app, to allow updates to the schemas outside of the regular Cytoscape
release cycle.
As a guideline, any JSON produced should be compatible with both R (using JSONIO) and python (using pandas).
- Author:
- David Otasek (dotasek.dev@gmail.com)
-
Method Summary
Modifier and TypeMethodDescriptioncyColumnsToJson(Collection<CyColumn> collection)
Returns a list of references (via column name) for a collection of CyColumn.cyIdentifiablesToJson(Collection<? extends CyIdentifiable> collection)
Returns a list of references (via SUID) for a collection of CyIdentifiable.Returns a JSON representation of CyColumn.toJson(CyIdentifiable cyIdentifiable)
Returns a reference (via SUID) for a CyIdentifiable.Returns a JSON representation of a network and its relevant data.Returns a JSON representation of a single CyEdge and its relevant data.Returns a JSON representation of a single CyNode and its relevant data.Returns a JSON representation of a table row.Returns a JSON representation of a CyTable.
-
Method Details
-
toJson
Returns a reference (via SUID) for a CyIdentifiable.- Parameters:
cyIdentifiable
-- Returns:
- a reference (via SUID) for a CyIdentifiable.
-
cyIdentifiablesToJson
Returns a list of references (via SUID) for a collection of CyIdentifiable.- Parameters:
collection
-- Returns:
- a list of references (via SUID) for a collection of CyIdentifiable.
-
toJson
Returns a JSON representation of a single CyNode and its relevant data. This JSON will be identical to the relevant row in the node table.- Parameters:
network
-cyNode
-columns
- The columns to be included in the output. If none are passed, return all.- Returns:
- a JSON representation of a single CyNode and its relevant data.
-
toJson
Returns a JSON representation of a single CyEdge and its relevant data. This JSON will be identical to the relevant row in the edge table, with the exception of additional source and target columns.- Parameters:
network
-cyEdge
-columns
- The columns to be included in the output. If none are passed, return all.- Returns:
- a JSON representation of a single CyEdge and its relevant data.
-
toJson
Returns a JSON representation of a network and its relevant data. This JSON will be identical to the relevant row in the network table.- Parameters:
cyNetwork
-- Returns:
- a JSON representation of a network and its relevant data.
-
toJson
Returns a JSON representation of a CyTable. The output can be customized to provide table definition information, as well as the rows in the table. Note that setting both includeDefinition and includeRows to false will result in an empty JSON object.- Parameters:
cyTable
-includeDefinition
- defines whether or not to include definitions like table name in the output.includeRows
- defines whether or not to include the table's row data in the output.- Returns:
- a JSON representation of a CyTable
-
cyColumnsToJson
Returns a list of references (via column name) for a collection of CyColumn.- Parameters:
collection
-- Returns:
- a list of references (via column name) for a collection of CyColumn
-
toJson
Returns a JSON representation of CyColumn. The output can be customized to provide column definition information, as well as the values in the column. Note that setting both includeDefinition and includeValues to false will result in an empty JSON object.- Parameters:
cyColumn
-includeDefinition
- defines whether or not to include definitions like column name in the output.includeValues
- defines whether or not to include the column's data in the output.- Returns:
- a JSON representation of a CyColumn.
-
toJson
Returns a JSON representation of a table row.- Parameters:
cyRow
-columns
- The columns to be included in the output. If none are passed, return all.- Returns:
- a JSON representation of a table row.
-