tudelft.CytoscapeRPC
Class CytoscapeRPCCallHandler

java.lang.Object
  extended by tudelft.CytoscapeRPC.CytoscapeRPCCallHandler

public class CytoscapeRPCCallHandler
extends java.lang.Object

This class implements all the supported methods for the Cytoscape XMLRPC server. It acts as a basic translator of XMLRPC calls to native Cytoscape functions with some additional error checking.


Constructor Summary
CytoscapeRPCCallHandler()
          Constructs a CytoscapeRPCCallHandler.
 
Method Summary
 java.util.List<java.lang.String> _getAttributeNames()
          Function which returns all the function names.
 java.util.List<java.lang.String> _rGetNodesPositions(java.lang.String networkID, java.util.List<java.lang.String> nodeIDs)
          R function for getting node positions.
 java.util.List<java.lang.String> _rGetNodesPositions(java.lang.String networkID, java.util.List<java.lang.String> nodeIDs, java.lang.String nodeNameDelim, java.lang.String xyDelim)
          R function for getting node positions.
 boolean addBooleanEdgeAttribute(java.lang.String name, java.lang.String ID, boolean value)
          Add a boolean attribute to an edge.
 boolean addBooleanEdgeAttributes(java.lang.String name, java.util.List<java.lang.String> IDs, java.util.List<java.lang.Boolean> values)
          Add boolean attributes to a number of edges.
 boolean addBooleanNetworkAttribute(java.lang.String name, java.lang.String ID, boolean value)
          Add a boolean attribute to a network.
 boolean addBooleanNetworkAttributes(java.lang.String name, java.util.List<java.lang.String> IDs, java.util.List<java.lang.Boolean> values)
          Add boolean attributes to a number of networks.
 boolean addBooleanNodeAttribute(java.lang.String name, java.lang.String ID, boolean value)
          Add a boolean attribute to a node.
 boolean addBooleanNodeAttributes(java.lang.String name, java.util.List<java.lang.String> IDs, java.util.List<java.lang.Boolean> values)
          Add boolean attributes to a number of nodes.
 boolean addDoubleEdgeAttribute(java.lang.String name, java.lang.String ID, double value)
          Add a double attribute to an edge.
 boolean addDoubleEdgeAttributes(java.lang.String name, java.util.List<java.lang.String> IDs, java.util.List<java.lang.Double> values)
          Add double attributes to a number of edges.
 boolean addDoubleNetworkAttribute(java.lang.String name, java.lang.String ID, double value)
          Add a double attribute to a network.
 boolean addDoubleNetworkAttributes(java.lang.String name, java.util.List<java.lang.String> IDs, java.util.List<java.lang.Double> values)
          Add double attributes to a number of networks.
 boolean addDoubleNodeAttribute(java.lang.String name, java.lang.String ID, double value)
          Add a double attribute to a node.
 boolean addDoubleNodeAttributes(java.lang.String name, java.util.List<java.lang.String> IDs, java.util.List<java.lang.Double> values)
          Add double attributes to a number of nodes.
 boolean addEdgeAttribute(java.lang.String name, java.lang.String type, java.lang.String ID, java.lang.Object value)
          Add an attribute to an edge.
 boolean addEdgeAttributes(java.lang.String name, java.lang.String type, java.util.Map<java.lang.String,java.lang.Object> values)
          Adds attributes to CyEdges.
 boolean addEdgeAttributes(java.lang.String name, java.lang.String type, java.util.Vector<java.lang.String> edgeIDs, java.util.Vector<java.lang.Object> values)
          Adds attributes to CyEdges.
 boolean addIntegerEdgeAttribute(java.lang.String name, java.lang.String ID, int value)
          Add a integer attribute to an edge.
 boolean addIntegerEdgeAttributes(java.lang.String name, java.util.List<java.lang.String> IDs, java.util.List<java.lang.Integer> values)
          Add integer attributes to a number of edges.
 boolean addIntegerNetworkAttribute(java.lang.String name, java.lang.String ID, int value)
          Add a integer attribute to a network.
 boolean addIntegerNetworkAttributes(java.lang.String name, java.util.List<java.lang.String> IDs, java.util.List<java.lang.Integer> values)
          Add integer attributes to a number of networks.
 boolean addIntegerNodeAttribute(java.lang.String name, java.lang.String ID, int value)
          Add a integer attribute to a node.
 boolean addIntegerNodeAttributes(java.lang.String name, java.util.List<java.lang.String> IDs, java.util.List<java.lang.Integer> values)
          Add integer attributes to a number of nodes.
 boolean addNetworkAttribute(java.lang.String name, java.lang.String type, java.lang.String networkID, java.lang.Object value)
          Add an attribute to a network.
 boolean addNetworkAttributes(java.lang.String name, java.lang.String type, java.util.Map<java.lang.String,java.lang.Object> values)
          Add attributes to CyNetworks.
 boolean addNetworkAttributes(java.lang.String name, java.lang.String type, java.lang.String[] networkIDs, java.lang.Object[] values)
          Add attributes to CyNetworks.
 boolean addNodeAttribute(java.lang.String name, java.lang.String type, java.lang.String ID, java.lang.Object value)
          Add an attribute to a node.
 boolean addNodeAttributes(java.lang.String name, java.lang.String type, java.util.Map<java.lang.String,java.lang.Object> values, boolean forgive)
          Add attributes to nodes.
 boolean addNodesToNetwork(java.util.List nodeIDs, boolean forgive)
          Add nodes that already exist in Cytoscape to the current network.
 boolean addNodesToNetwork(java.lang.String networkID, java.util.List nodeIDs, boolean forgive)
          Adds nodes that already exist in Cytoscape to a network.
 boolean addStringEdgeAttribute(java.lang.String name, java.lang.String ID, java.lang.String value)
          Add a string attribute to an edge.
 boolean addStringEdgeAttributes(java.lang.String name, java.util.List<java.lang.String> IDs, java.util.List<java.lang.String> values)
          Add string attributes to a number of edges.
 boolean addStringNetworkAttribute(java.lang.String name, java.lang.String ID, java.lang.String value)
          Add a string attribute to a network.
 boolean addStringNetworkAttributes(java.lang.String name, java.util.List<java.lang.String> IDs, java.util.List<java.lang.String> values)
          Add string attributes to a number of networks.
 boolean addStringNodeAttribute(java.lang.String name, java.lang.String ID, java.lang.String value)
          Add a string attribute to a node.
 boolean addStringNodeAttributes(java.lang.String name, java.util.List<java.lang.String> IDs, java.util.List<java.lang.String> values)
          Add string attributes to a number of nodes.
protected static
<A,B> java.util.HashMap<A,B>
arraysToMap(A[] keys, B[] values)
          Creates a hashmap out of a list of keys and a list of values
 boolean arrowMapper()
          Function to overwrite the arrow settings.
 boolean clearEdgeSelection()
          Clear the edge selection of the current network.
 boolean clearEdgeSelection(java.lang.String networkID)
          Clear the edge selection of a network.
 boolean clearNodeSelection()
          Unselect all nodes in the current network.
 boolean clearNodeSelection(java.lang.String networkID)
          Unselect all nodes in a network.
 boolean clearSelection()
          Clear the edge and node selection of the current network.
 boolean clearSelection(java.lang.String networkID)
          Clear the edge and node selections of a network.
 boolean clearStatusBarMessage()
          Clear the status bar message.
 boolean closeAllNetworkViews()
          Close all network views.
 boolean closeNetworkView(java.lang.String networkID)
          Close one network view.
 boolean copyVisualStyle(java.lang.String fromName, java.lang.String toName)
          Copies a VisualStyle.
 int countAllEdges()
          Count all edges present in Cytoscape.
 int countAllNodes()
          Count all nodes present in Cytoscape.
 int countEdges()
          Count the number of edges in the current network.
 int countEdges(java.lang.String networkID)
          Count the number of edges in a particular network.
 int countNodes()
          Count the number of nodes in the current network.
 int countNodes(java.lang.String networkID)
          Count the number of nodes in a particular network.
 int countSelectedEdges()
          Count the number of selected edges in the current network.
 int countSelectedEdges(java.lang.String networkID)
          Count the number of selected edges in a particular network.
 int countSelectedNodes()
          Count the number of selected nodes in the current network.
 int countSelectedNodes(java.lang.String networkID)
          Get the number of selected nodes for the specified network.
 boolean createContinuousEdgeVisualStyle(java.lang.String attrName, java.lang.String edgePropName, double maxEdgeWidth)
          Create a continuous visual style for edges based on an edge attribute.
 boolean createContinuousEdgeVisualStyle(java.lang.String attrName, java.lang.String edgePropName, double minValue, double midValue, double maxValue, double maxEdgeWidth)
          Deprecated. Use createContinuousMapper
 boolean createContinuousEdgeVisualStyle(java.lang.String attrName, java.lang.String edgePropName, java.util.List<java.lang.Object> attrValues, java.util.List<java.lang.Object> propValues)
          Create a new continuous visual style for edges and apply it.
 boolean createContinuousEdgeVisualStyle(java.lang.String attrName, java.lang.String edgePropName, java.util.List<java.lang.Object> attrValues, java.util.List<java.lang.Object> propValues, boolean redraw)
          Create a new continuous visual style for edges and apply it.
 boolean createContinuousMapper(java.lang.String styleName, java.lang.String attrName, java.lang.String propertyName, java.util.List<java.lang.Object> attrValues, java.util.List<java.lang.Object> propValues)
          Create a continuous mapper
 boolean createContinuousMapper(java.lang.String styleName, java.lang.String attrName, java.lang.String propertyName, java.util.List<java.lang.Object> attrValues, java.util.List<java.lang.Object> propValues, boolean redraw)
          Create a continuous mapper
 boolean createContinuousNodeColorVisualStyle(java.lang.String attrName, java.lang.String nodePropName, java.lang.String minColorS, java.lang.String midColorS, java.lang.String maxColorS, double minValue, double midValue, double maxValue)
          Deprecated. use createContinuousMapper
 boolean createContinuousNodeVisualStyle(java.lang.String attrName, java.lang.String nodePropName, java.util.List<java.lang.Object> attrValues, java.util.List<java.lang.Object> propValues)
          Create a continuous style for nodes.
 boolean createContinuousNodeVisualStyle(java.lang.String attrName, java.lang.String nodePropName, java.util.List<java.lang.Object> attrValues, java.util.List<java.lang.Object> propValues, boolean redraw)
          Create a continuous style for nodes.
 boolean createDiscreteMapper(java.lang.String styleName, java.lang.String attrName, java.lang.String visualPropertyName, java.lang.String defaultValue, java.util.List values, java.util.List props)
          Alternative implementation of the discrete mapper method which overcomes the inability of XML-RPC to send numeric keys in maps.
 boolean createDiscreteMapper(java.lang.String styleName, java.lang.String attrName, java.lang.String visualPropertyName, java.lang.String defaultValue, java.util.Map<java.lang.String,java.lang.String> mapping)
          Create a discrete mapper based on the provided attributes.
 boolean createDiscreteMapper(java.lang.String networkID, java.lang.String styleName, java.lang.String attrName, java.lang.String visualPropertyName, java.lang.String defaultValue, java.util.Map<java.lang.String,java.lang.String> mapping)
          Deprecated. Use same function but without network parameter.
 java.lang.String createEdge(java.lang.String from, java.lang.String to, java.lang.String type, boolean directed)
          Create one edge in the current network.
 java.lang.String createEdge(java.lang.String networkID, java.lang.String from, java.lang.String to, java.lang.String type, boolean directed)
          Create one edge in the specified network.
 java.util.List<java.lang.String> createEdges(java.util.List<java.lang.String> from, java.util.List<java.lang.String> to, java.util.List<java.lang.String> type, java.util.List<java.lang.Boolean> directed, boolean forgive)
          Add edges to the current network.
 java.util.List<java.lang.String> createEdges(java.lang.String networkID, java.util.List<java.lang.String> from, java.util.List<java.lang.String> to, java.util.List<java.lang.String> type, java.util.List<java.lang.Boolean> directed, boolean forgive)
          Add edges to a Cytoscape network.
 java.util.Vector<java.lang.String> createEdges(java.lang.String networkID, java.util.Vector<java.lang.String> sources, java.util.Vector<java.lang.String> targets)
          Create edges in the provided network.
 java.util.Vector<java.lang.String> createEdges(java.util.Vector<java.lang.String> sources, java.util.Vector<java.lang.String> targets)
          Create edges in the current network.
 java.util.List<java.lang.String> createEdgesFromVector(java.lang.String networkID, java.util.Vector sources, java.util.Vector targets)
          Deprecated. Use createEdges(java.lang.String, java.util.List, java.util.List, java.util.List, java.util.List, boolean) with same parameters.
 java.util.List<java.lang.String> createEdgesFromVector(java.util.Vector sources, java.util.Vector targets)
          Deprecated. Use createEdges(java.lang.String, java.util.List, java.util.List, java.util.List, java.util.List, boolean) with same parameters.
 java.lang.String createNetwork(java.lang.String title)
          Creates a new CyNetwork with the supplied title.
 java.lang.String createNetwork(java.lang.String title, boolean createView)
          Create a new CyNetwork with the supplied title.
 java.lang.String createNetworkFromSelection(java.lang.String networkID, java.lang.String networkName)
          Create a new network based on the selected nodes of another network.
 boolean createNetworkView(java.lang.String networkID)
          Creates a new network view.
 java.lang.String createNode(java.lang.String identifier)
          Create a node in the current network.
 java.lang.String createNode(java.lang.String networkID, java.lang.String identifier)
          Create a node in the supplied network.
 boolean createNodes(java.util.List identifiers)
          Create nodes in the current network.
 boolean createNodes(java.lang.String networkID, java.util.List identifiers)
          Create new nodes in a network.
 boolean createNodesFromVector(java.lang.String networkID, java.util.Vector identifiers)
          Create nodes in the current network.
 boolean createNodesFromVector(java.util.Vector identifiers)
          Create nodes in the current network.
 boolean createPassthroughMapper(java.lang.String attrName, java.lang.String property, java.lang.String def)
          Create a passthrough mapper for the current visual style.
 boolean createPassthroughMapper(java.lang.String vizstyleName, java.lang.String attrName, java.lang.String property, java.lang.String def)
          Create a passthrough mapper.
 boolean createPassthroughMapper(java.lang.String vizstyleName, java.lang.String attrName, java.lang.String property, java.lang.String def, boolean redraw)
          Create a passthrough mapper.
 java.lang.String cytoscapeVersion()
          Method to get the Cytoscape version.
 boolean deleteEdgeAttribute(java.lang.String attrName)
          Delete one attribute for all edges.
 boolean deleteEdgeAttribute(java.lang.String ID, java.lang.String name)
          Delete an edge attribute for a certain edge.
 boolean deleteNetworkAttribute(java.lang.String attrName)
          Delete one attribute for all networks.
 boolean deleteNetworkAttribute(java.lang.String ID, java.lang.String name)
          Delete a network attribute for a certain network.
 boolean deleteNodeAttribute(java.lang.String attrName)
          Delete one attribute for all nodes.
 boolean deleteNodeAttribute(java.lang.String ID, java.lang.String name)
          Delete an attribute for a certain node.
 boolean deleteNodeByPassAttr(java.lang.String type)
          Method which allows you to delete an attribute which overwrites the normal behaviour of the vismapper.
 boolean deleteVisualStyle(java.lang.String styleName)
          Delete a visual style.
 boolean deselectNode(java.lang.String networkID, java.lang.String nodeID)
          Remove a node from the current selection.
 boolean destroyNetwork(java.lang.String networkID)
          Destroys a network.
 boolean discreteMapper(java.lang.String networkID, java.lang.String styleName, java.lang.String attrName, java.lang.String visualPropertyName, java.lang.String defaultValue, java.util.List values, java.util.List props)
          Deprecated. use the createDiscreteMapper function with the same parameters instead.
 boolean discreteMapper(java.lang.String networkID, java.lang.String styleName, java.lang.String attrName, java.lang.String visualPropertyName, java.lang.String defaultValue, java.util.Map<java.lang.String,java.lang.String> mapping)
          Deprecated. Use the createDiscreteMapper functions with the same parameters instead.
 boolean dockPanel(java.lang.String panelName)
          Dock a panel to the Cytoscape main window.
 boolean edgePassthroughMapper(java.lang.String attrName, java.lang.String property, java.lang.String def)
          Deprecated. Use the createPassthroughMapper instead.
 java.util.ArrayList<java.lang.Boolean> edgesHaveAttribute(java.lang.String name, java.util.Vector<java.lang.String> ids)
          Check if a list of edges have a particular attribute.
 java.util.Map<java.lang.String,java.lang.Object> executeCommand(java.lang.String namespace, java.lang.String command, java.util.Map arguments)
          Execute one command from an external plugin.
 boolean exportView(java.lang.String location, java.lang.String type, java.lang.Double scale)
          Export the current view to an image file.
 boolean exportView(java.lang.String networkID, java.lang.String location, java.lang.String type, java.lang.Double scale)
          Export a network view to an image file.
 boolean fitContent(java.lang.String networkID)
          Fit all the viewable elements onto this graph.
 boolean fitSelectedContent(java.lang.String networkID)
          Fit all the selected elements onto this graph.
 boolean floatPanel(java.lang.String panelName)
          Make a currently attached panel float.
 java.util.List<java.lang.String> getAdjacentEdges(java.lang.String networkID, java.lang.String nodeID)
          Get the edges coming from and going to a node.
 java.util.List<java.lang.String> getAllEdges()
          Method to get all the edges available in Cytoscape.
 java.util.List<java.util.Map<java.lang.String,java.lang.String>> getAllNetworks()
          Method to get a list of all the available networks, represented by their networkid and network title.
 java.util.Vector<java.lang.String> getAllNodes()
          Get a list of nodes.
 java.util.List<java.lang.String> getArrowShapeNames()
          Get a list of all the names of the different arrowheads that can be used.
 java.util.List<java.lang.Double> getCenter(java.lang.String networkID)
           
static java.util.List<java.lang.String> getChildConnectingEdges(java.util.List<java.lang.String> nodeIDs)
          Get the edges connecting the currently selected nodes and their children.
static java.util.List<java.lang.String> getChildConnectingEdges(java.lang.String networkID, java.util.List<java.lang.String> nodeIDs)
          Get the edges connecting the specified nodes and their children.
 java.util.List<java.lang.String> getCommandList(java.lang.String namespace)
          Get all the commands provided by a certain namespace.
 java.util.List<java.lang.String> getConnectedEdges(java.lang.String nodeID1, java.lang.String nodeID2)
          Get the edges between two nodes in the current network
 java.util.List<java.lang.String> getConnectedEdges(java.lang.String networkID, java.lang.String nodeID1, java.lang.String nodeID2)
          Get the edges between two nodes.
 java.util.List<java.lang.String> getConnectedEdges(java.lang.String networkID, java.util.Vector<java.lang.String> nodeIDs)
          Get the edges between a number of nodes.
 java.util.List<java.lang.String> getConnectedEdges(java.util.Vector<java.lang.String> nodeIDs)
          Get the edges between a number of nodes.
 java.lang.String getCurrentNetworkIndex()
          Get the index of the current network.
 java.util.Map<java.lang.String,java.lang.String> getCurrentNetworkProperties()
          Returns the current network.
 java.lang.String getCurrentVisualStyle()
          Returns the name of the current VisualStyle.
 java.lang.String getCytoscapeVersion()
          Alternative to the cytoscapeVersion function.
 java.lang.String getDefaultBackgroundColor(java.lang.String styleName)
           
 java.lang.String getDefaultEdgeReverseSelectionColor(java.lang.String styleName)
           
 java.lang.String getDefaultEdgeSelectionColor(java.lang.String styleName)
           
 java.lang.String getDefaultNodeReverseSelectionColor(java.lang.String styleName)
           
 java.lang.String getDefaultNodeSelectionColor(java.lang.String styleName)
           
 java.lang.Object getEdgeAttribute(java.lang.String edgeID, java.lang.String attrName)
          Get node attribute.
 java.util.List<java.lang.String> getEdgeAttributeNames()
          Get all the names of edge attributes.
 java.util.Map<java.lang.String,java.lang.Object> getEdgeAttributes(java.lang.String edgeID)
          Get all the attribute values for an edge.
 java.lang.String getEdgeAttributeType(java.lang.String attrName)
          Get the type of an edge attribute.
 java.util.List<java.lang.String> getEdges()
          Get all the edge identifiers of the current network.
 java.util.List<java.lang.String> getEdges(java.lang.String networkID)
          Get all the edge identifiers of a network.
 java.util.List<java.lang.Object> getEdgesAttributes(java.lang.String attrName, java.util.Vector<java.lang.String> ids)
          Get for a list of edges the value of an attribute.
 java.util.List<java.lang.String> getEdgeSourceNodes(java.lang.String networkID, java.util.Vector<java.lang.String> edgeNames)
          Get the source nodes of a number of edges.
 java.util.List<java.lang.String> getEdgeTargetNodes(java.lang.String networkID, java.util.Vector<java.lang.String> edgeNames)
          Get the target nodes of a number of edges.
 java.util.List<java.lang.String> getFontFaces()
          Get the names of the fonts available in Cytoscape.
 java.lang.String getFunctions()
          Displays a list of all available functions in this class.
 int getInputArgMismatchCode()
          Get the error number for argument mismatch errors.
 java.util.List<java.lang.String> getLayoutNames()
          Helper function to get the names of all available layouts.
 java.util.Map<java.lang.String,java.lang.String> getLayoutNamesMapping()
           
 java.util.List<java.lang.String> getLayoutProperties(java.lang.String layoutName)
          Get the property names (tunable names) for a layout.
 java.lang.String getLayoutPropertyType(java.lang.String layoutName, java.lang.String propertyName)
          Get the type of a layout property.
 java.util.Map<java.lang.String,java.lang.String> getLayoutPropertyTypes(java.lang.String layoutName)
          Get the names and types of all the properties of a layout.
 java.lang.Object getLayoutPropertyValue(java.lang.String layoutName, java.lang.String propertyName)
          Get the current property value of a layout algorithm.
 java.util.Map<java.lang.String,java.lang.Object> getLayoutPropertyValues(java.lang.String layoutName)
          Get the current property values of a layout algorithm.
 java.util.List<java.lang.String> getLineStyleNames()
          Get a list of all the names of the different line styles which can be used.
 java.util.List<java.lang.String> getNamespaceList()
          Get all the namespaces available through the CyCommands api.
 java.util.List<java.lang.String> getNetworkAttributeNames()
          Get all the names of network attributes.
 java.util.Map<java.lang.String,java.lang.Object> getNetworkAttributes(java.lang.String networkID)
          Get all the attribute values for a network.
 java.lang.String getNetworkAttributeType(java.lang.String attrName)
          Finds the type of a network attribute.
 int getNetworkCount()
          Get the number of available networks.
 java.lang.String getNetworkID()
          Retrieve the ID of the current network.
 java.util.List<java.util.Map<java.lang.String,java.lang.String>> getNetworkList()
          Function to list the ids and titles of all networks available in Cytoscape.
 java.util.Vector<java.lang.Object> getNetworksAttributes(java.lang.String name, java.util.Vector<java.lang.String> IDs)
          Get the attribute values for one attribute for a number of networks.
 java.lang.String getNetworkTitle()
          Get the title of the current network.
 java.lang.String getNetworkTitle(java.lang.String networkID)
          Get the title of the network with the supplied ID.
 java.lang.Object getNodeAttribute(java.lang.String nodeID, java.lang.String attrName)
          Get node attribute.
 java.util.List<java.lang.String> getNodeAttributeNames()
          Get all the names of node attributes.
 java.util.Map<java.lang.String,java.lang.Object> getNodeAttributes(java.lang.String nodeID)
          Get all the attribute values for a node.
 java.lang.String getNodeAttributeType(java.lang.String attrName)
          Finds the type of a node attribute.
 java.util.List<java.lang.String> getNodeChildren(java.lang.String networkID, java.lang.String nodeID)
          Get the children of a node.
 java.util.List<java.lang.String> getNodeColorPropertyNames()
          Helper method to list all the names of the color properties of nodes.
 java.util.List<java.lang.String> getNodeNeighbors(java.lang.String nodeID)
          Get the neighbors of a node in the current network.
 java.util.List<java.lang.String> getNodeNeighbors(java.lang.String networkID, java.lang.String nodeID)
          Get the neighbors of a node in a particular network.
 java.util.Vector<java.lang.String> getNodes()
          Get the IDs of all the nodes in the current network.
 java.util.Vector<java.lang.String> getNodes(java.lang.String networkID)
          Retrieve the IDs of all the nodes in a network.
 java.util.Vector<java.lang.Object> getNodesAttributes(java.lang.String name, java.util.Vector<java.lang.String> IDs)
          Get the attribute values for one attribute for a number of nodes.
 java.util.List<java.lang.String> getNodesByStringAttr(java.lang.String attrName, java.lang.String attrValue)
          Returns a list of nodes which have a String attribute with the supplied name and value.
 java.util.Set<java.lang.String> getNodesChildren(java.lang.String networkID, java.util.List<java.lang.String> nodeIDs, boolean acceptUndirected)
          Get the children of multiple nodes.
 java.util.List<java.lang.String> getNodeShapeNames()
          Get the names of the shapes that nodes can have.
 java.util.List<java.lang.String> getNodesIDs(java.lang.String networkID)
          Get the rootgrah IDs of the provided nodes.
 java.util.List<java.lang.String> getNodesNeighbors(java.lang.String networkId, java.util.Vector<java.lang.String> nodeIDS)
          Get the neighbords of a list of nodes in a network.
 java.util.List<java.lang.String> getNodesNeighbors(java.util.Vector<java.lang.String> nodeIDs)
          Get the neighbors of a list of nodes in the current network.
 java.util.Set<java.lang.String> getNodesParents(java.util.List<java.lang.String> nodeIDs, boolean acceptUndirected)
           
 java.util.Set<java.lang.String> getNodesParents(java.lang.String networkID, java.util.List<java.lang.String> nodeIDs, boolean acceptUndirected)
           
 int getNotExistsCode()
          Get the error number for the not exists errors.
 int getNotFoundCode()
          Get the error number for not found errors.
 java.util.List<java.lang.String> getSelectedEdges()
          Get the selected edges of the current network.
 java.util.List<java.lang.String> getSelectedEdges(java.lang.String networkID)
          Get the selected edges in a network.
 java.util.List<java.lang.String> getSelectedNodes()
          Get a list of selected nodes in the current network.
 java.util.List<java.lang.String> getSelectedNodes(java.lang.String networkID)
          Get a list of selected nodes.
 java.util.List<java.lang.String> getShapeNames()
          Get a list of names of possible shapes.
 int getTotalNodeCount()
          Get the number of nodes present in the current instance of Cytoscape.
 java.util.Collection getUniqueNodeAttributes(java.lang.String attrName)
           
 java.util.Collection getUniqueNodeAttributes(java.lang.String attrName, java.lang.String networkID)
           
 java.util.List<java.lang.Double> getViewCoordinates(java.lang.String networkID)
           
 java.util.Vector<java.lang.String> getVisualBypassNames()
          Get a list of visual bypass names.
 java.util.List<java.lang.String> getVisualStyleModifiables()
          Retrieves all the names of the attributes that can be set in a VisualStyle.
 java.util.List<java.lang.String> getVisualStyleNames()
          Lists all the available visual styles.
 int getWrongTypeCode()
          Get the error number for wrong type errors.
 double getZoom(java.lang.String networkID)
          Get the current zoom level of a networkview.
 boolean hasCurrentNetwork()
          Check if there is a current network.
 boolean hasEdgeAttribute(java.lang.String edgeID, java.lang.String attrName)
          Check if the attribute exists in a certain edge.
 boolean hasNetworkAttribute(java.lang.String networkID, java.lang.String attrName)
          Check if the attribute exists for a certain network.
 boolean hasNodeAttribute(java.lang.String nodeID, java.lang.String attrName)
          Check if the attribute exists for a certain node.
 boolean hideAll()
          Hide all nodes and edges in the current network.
 boolean hideAll(java.lang.String networkID)
          Hide all nodes and edges.
 boolean hideAllEdges()
          Hide all edges in the current network.
 boolean hideAllEdges(java.lang.String networkid)
          Hide all the edges in a network.
 boolean hideAllNodes(java.lang.String networkID)
          Hide all nodes in a network.
 boolean hideEdge(java.lang.String networkid, java.lang.String edgeID)
          Hide an edge in a network.
 boolean hideNode(java.lang.String nodeid)
          Hide one node in the current network.
 boolean hideNode(java.lang.String networkid, java.lang.String nodeid)
          Hide one node in a network.
 boolean hidePanel(java.lang.String panelName)
          Hide a panel in Cytoscape.
 boolean hideSelectedEdges()
          Hide the selected edges in the current network.
 boolean hideSelectedEdges(java.lang.String networkID)
          Hide the selected edges in a network.
 boolean hideSelectedNodes()
          Hide the selected nodes in the current network.
 boolean hideSelectedNodes(java.lang.String networkID)
          Hide the selected nodes in a network.
 boolean invertEdgeSelection(java.lang.String networkID)
          Invert the edge selection.
 boolean invertNodeSelection(java.lang.String networkID)
          Invert the node selection.
 boolean isNodeSelected(java.lang.String nodeID)
          Check whether a node is selected in the current network.
 boolean isNodeSelected(java.lang.String networkID, java.lang.String nodeID)
          Check whether a node is selected.
static java.util.List<java.lang.String> listAttributeTypes()
          Method to list all the available types of attributes.
 boolean networkExists(java.lang.String networkID)
          Checks if a network exists.
 java.util.ArrayList<java.lang.Boolean> networksHaveAttribute(java.lang.String name, java.util.Vector<java.lang.String> ids)
          Check if a list of networks have a particular attribute.
 boolean nodeExists(java.lang.String networkID, java.lang.String nodeID)
          Checks if a node is present in a network.
 boolean nodePassthroughMapper(java.lang.String attrName, java.lang.String property, java.lang.String def)
          Deprecated. Use createPassthroughMapper instead.
 java.util.ArrayList<java.lang.Boolean> nodesHaveAttribute(java.lang.String name, java.util.Vector<java.lang.String> ids)
          Check if a list of nodes have a particular attribute.
 boolean overrideNodeVizAttribute(java.util.Map<java.lang.String,java.lang.String> nodeValues, java.lang.String attrName)
          Override the visual attribute for a number of nodes.
 boolean overrideNodeVizAttribute(java.lang.String nodeID, java.lang.String attrName, java.lang.String value)
          Override a visual attribute of a node by some value.
 boolean performDefaultLayout()
          Performs the default cytoscape layout on the current network, usually gridLayout.
 boolean performDefaultLayout(java.lang.String networkID)
          Performs the default layout (usually grid) on the provided network.
 boolean performLayout(java.lang.String layoutName)
          Performs the layout on the current network.
 boolean performLayout(java.lang.String networkID, java.lang.String layoutName)
          Performs the layout on the provided network.
 boolean raiseNetworkView(java.lang.String networkID)
          Raise a network view to the top of the Cytoscape window.
 boolean redraw()
          Redraws the networkview of the current network.
 boolean redraw(java.lang.String networkID)
          Redraws a networkview.
 boolean removeEdge(java.lang.String edgeID)
          Remove an edge from the current network.
 boolean removeEdge(java.lang.String networkID, java.lang.String edgeID)
          Remove an edge from a network.
 boolean removeNode(java.lang.String nodeID)
          Remove a node from the current network.
 boolean removeNode(java.lang.String networkId, java.lang.String nodeID)
          Remove a node from a network.
 boolean removeSelectedEdges(java.lang.String networkID, boolean set_remove)
          Remove the selected edges from a network.
 boolean removeSelectedNodes(java.lang.String networkID, boolean set_remove)
          Remove the selected nodes.
 boolean resetRootGraph()
          Method for resetting the rootgraph.
 boolean resizeNetworkView(java.lang.String networkID, int width, int height)
          Resize a network view.
 boolean saveNetwork(java.lang.String networkID, java.lang.String filename)
          Save a network to a GML file.
 boolean saveSessionAsCys(java.lang.String filename)
           
 boolean selectEdge(java.lang.String networkID, java.lang.String edgeName)
          Select an edge in a network.
 boolean selectEdges(java.lang.String networkID, java.util.Vector<java.lang.String> edgeNames)
          Select multiple edges in a network.
 boolean selectNode(java.lang.String nodeName)
          Select a single node in the current network.
 boolean selectNode(java.lang.String networkID, java.lang.String nodeID)
          Add a node to the selection.
 boolean selectNodes(java.util.List<java.lang.String> nodeNames)
          Select a number of nodes in the current network, clears the previous selection.
 boolean selectNodes(java.lang.String networkID, java.util.List<java.lang.String> nodeNames)
          Select a number of nodes, clears the previous selection.
 boolean selectNodes(java.lang.String networkID, java.util.List<java.lang.String> nodeIDs, boolean keepSelection, boolean forgive)
          Select a number of nodes.
 boolean selectNodes(java.lang.String networkID, java.lang.String nodeName)
          Select a single node.
 boolean selectNodes(java.util.Vector<java.lang.String> nodeIDs)
          Add multiple nodes to the selection in the current network.
 boolean setCenter(java.lang.String networkID, double x, double y)
          Set the center of a view.
 boolean setContinuousEdgeColorRule(java.lang.String networkID, java.lang.String attributeName, java.lang.String minColor, java.lang.String midColor, java.lang.String maxColor, double minValue, double midValue, double maxValue)
           
 boolean setCurrentNetwork(java.lang.String networkID)
          Sets the current network.
 boolean setDefaultBackgroundColor(java.lang.String styleName, java.lang.String color)
           
 boolean setDefaultEdgeReverseSelectionColor(java.lang.String styleName, java.lang.String color)
           
 boolean setDefaultEdgeSelectionColor(java.lang.String styleName, java.lang.String color)
           
 boolean setDefaultNodeReverseSelectionColor(java.lang.String styleName, java.lang.String color)
           
 boolean setDefaultNodeSelectionColor(java.lang.String styleName, java.lang.String color)
           
 boolean setDefaultVizMapValue(java.lang.String styleName, java.lang.String visualPropertyName, java.lang.String value)
          Set the default value for a visualProperty in one particular style.
 boolean setDiscreteNodeMapper(java.lang.String networkID, java.lang.String styleName, java.lang.String styleProperty, java.lang.String paramName, java.util.Map<java.lang.String,java.lang.String> mapping)
           
 boolean setDiscreteNodeMapper(java.lang.String networkID, java.lang.String styleName, java.lang.String styleProperty, java.lang.String paramName, java.lang.String[] mappingKeys, java.lang.String[] mappingValues)
           
 boolean setDiscreteNodeShapeMapper(java.lang.String networkID, java.lang.String styleName, java.lang.String attrName, java.lang.String defaultShape, java.util.Map<java.lang.Object,java.lang.String> mapping, boolean overWrite)
          Deprecated. Use createDiscreteMapper
 boolean setDiscreteNodeShapeMapper(java.lang.String networkID, java.lang.String styleName, java.lang.String attrName, java.lang.String defaultShape, java.lang.Object[] values, java.lang.String[] shapes, boolean overWrite)
          Sets the node-shape mapping for the provided network & style.
 boolean setDiscreteNodeShapeMapper(java.lang.String networkID, java.lang.String styleName, java.lang.String attrName, java.lang.String defaultShape, java.lang.Object[] values, java.lang.String[] shapes, boolean overWrite, boolean redraw)
          Sets the node-shape mapping for the provided network & style.
 boolean setEdgeColorRule(java.lang.String networkID, java.lang.String attributeName, java.lang.String defaultColor, java.util.List<java.lang.String> attributeValues, java.util.List<java.lang.String> colors)
           
 boolean setEdgeLineStyleRule(java.lang.String networkID, java.lang.String attributeName, java.lang.String defaultStyle, java.util.List<java.lang.String> attributeValues, java.util.List<java.lang.String> lineStyles)
           
 boolean setEdgeProperties(java.util.List<java.lang.String> edgeIDs, java.util.List<java.lang.String> propertyNames, java.util.List<java.lang.String> propertyValues)
          Set the properties of a number of edges simultaneously.
 boolean setEdgeProperty(java.lang.String edgeid, java.lang.String propertyName, java.lang.String propertyValue)
          Set a visual property for an edge to overwrite whatever the VizMapper is doing.
 boolean setEdgeSourceArrowRule(java.lang.String networkID, java.lang.String attributeName, java.lang.String defaultStyle, java.util.List<java.lang.String> attributeValues, java.util.List<java.lang.String> arrows)
           
 boolean setEdgeTargetArrowRule(java.lang.String networkID, java.lang.String attributeName, java.lang.String defaultStyle, java.util.List<java.lang.String> attributeValues, java.util.List<java.lang.String> arrows)
           
 boolean setLayoutPropertyValue(java.lang.String layoutName, java.lang.String propertyName, java.lang.String value)
          Set one layout property value.
 boolean setLayoutPropertyValues(java.lang.String layoutName, java.util.List<java.lang.String> names, java.util.List<java.lang.String> values)
          Alternative (R specific) version of the setLayoutPropertyValues function.
 boolean setLayoutPropertyValues(java.lang.String layoutName, java.util.Map<java.lang.String,java.lang.String> values)
          Set multiple layout property values at once.
 boolean setNetworkTitle(java.lang.String networkTitle)
          Set the title of the current network.
 boolean setNetworkTitle(java.lang.String networkID, java.lang.String networkTitle)
          Set the title for the network with the provided ID.
 boolean setNetworkViewPosition(java.lang.String networkID, int xpos, int ypos)
          Set the position of a network view.
 boolean setNodeBorderColor(java.lang.String networkID, java.lang.Object[] nodeIDs, int red, int green, int blue)
          Sets the node border color for the provided nodes.
 boolean setNodeBorderColor(java.lang.String networkID, java.lang.Object[] nodeIDs, int red, int green, int blue, boolean redraw)
          Sets the node border color for the provided nodes.
 boolean setNodeFillColor(java.lang.String networkID, java.lang.Object[] nodeIDs, int red, int green, int blue)
          Sets the fill color for the provided nodes.
 boolean setNodeFillColor(java.lang.String networkID, java.lang.Object[] nodeIDs, int red, int green, int blue, boolean redraw)
          Sets the fill color for the provided nodes.
 boolean setNodeLabel(java.lang.String networkid, java.lang.String attrName, java.lang.Object defaultValue, java.lang.String visualStyleName)
           
 boolean setNodeLabelColor(java.lang.String networkID, java.lang.Object[] nodeIDs, int red, int green, int blue)
          Sets the node label color for the provided nodes.
 boolean setNodeLabelColor(java.lang.String networkID, java.lang.Object[] nodeIDs, int red, int green, int blue, boolean redraw)
          Sets the node label color for the provided nodes.
 boolean setNodePosition(java.lang.String networkID, java.lang.String nodeID, double x, double y)
          Set the position of a node (bypasses the layout algorithm).
 boolean setNodeProperties(java.util.List<java.lang.String> nodeIDs, java.util.List<java.lang.String> propertyNames, java.util.List<java.lang.String> propertyValues)
          Set the properties of a number of nodes simultaneously.
 boolean setNodeProperty(java.lang.String nodeid, java.lang.String propertyName, java.lang.String propertyValue)
          Set a visual property for a node to overwrite whatever the VizMapper is doing.
 boolean setNodeShape(java.lang.Object[] nodeIDs, java.lang.String shape)
          Sets the node shapes of the provided nodes in the current network.
 boolean setNodeShape(java.lang.String networkID, java.lang.Object[] nodeIDs, java.lang.String shapestr)
          Sets the node shapes of the provided nodes in the provided network.
 boolean setNodeShapeRule(java.lang.String networkID, java.lang.String attributeName, java.lang.String defaultShape, java.util.List<java.lang.String> attributeValues, java.util.List<java.lang.String> shapes)
           
 boolean setNodeSizeLocked(java.lang.String styleName, boolean locked)
          Indicated whether the width and the height of a node should be locked.
 boolean setNodesPositions(java.lang.String networkID, java.util.List<java.lang.String> nodeIDs, java.util.List<java.lang.Double> xpos, java.util.List<java.lang.Double> ypos)
          Change the position of a number of nodes in a network.
 boolean setRPCLogLevel(java.lang.String l)
          Logger
 boolean setSelectedNodes(java.lang.String networkID, java.util.Vector<java.lang.String> nodeIDs, boolean forgive)
          Set the selected nodes for a network.
 boolean setSelectedNodes(java.util.Vector<java.lang.String> nodeIDs)
          Set the selected nodes of a network.
 boolean setSelectedNodes(java.util.Vector<java.lang.String> nodeids, boolean forgive)
          Set the selected nodes of the current network.
 boolean setShowGraphicsDetails(boolean flag)
           
 boolean setShowGraphicsDetails(java.lang.String networkID, boolean flag)
           
 boolean setStatusBarMessage(java.lang.String msg)
          Display a message in the Cytoscape status bar.
 boolean setToolTipDismissDelay(int dismissDelay)
          Set the time out for a tool tip to disappear.
 boolean setToolTipInitialDelay(int initialDelay)
          Set the time to wait before a tool tip appears.
 boolean setVisualStyle(java.lang.String name)
          Set the current VisualStyle.
 boolean setZoom(java.lang.String networkID, double zoom)
          Set the zoom level for a network.
 boolean showMessage(java.lang.String message)
          Shows a message in a JOptionPane and writes that same message to stdout.
 java.lang.String test()
          Minimal method to test if the connection is working.
 java.util.List<java.lang.String> trait_names()
          Function which returns all the function names.
 boolean unhideAll()
          Restore all nodes and edges in the current network.
 boolean unhideAll(java.lang.String networkID)
          Unhide all nodes and edges in a network.
 boolean unhideAllEdges()
          Unhide all edges in the current network.
 boolean unhideAllEdges(java.lang.String networkID)
          Unhide all edges in a network.
 boolean unhideAllNodes()
          Unhide all nodes in the current network.
 boolean unhideAllNodes(java.lang.String networkID)
          Unhide all nodes in a network.
 boolean unhideNode(java.lang.String nodeid)
          Unhide a node in the current network.
 boolean unhideNode(java.lang.String networkid, java.lang.String nodeid)
          Unhide a node in a network.
 java.lang.String version()
          Returns a string representing the version of the plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CytoscapeRPCCallHandler

public CytoscapeRPCCallHandler()
Constructs a CytoscapeRPCCallHandler.

Method Detail

version

public java.lang.String version()
Returns a string representing the version of the plugin.

Returns:

cytoscapeVersion

public java.lang.String cytoscapeVersion()
Method to get the Cytoscape version.

Returns:
String representation of the Cytoscape version.

getCytoscapeVersion

public java.lang.String getCytoscapeVersion()
Alternative to the cytoscapeVersion function.

Returns:
String representing the Cytoscape version.

test

public java.lang.String test()
Minimal method to test if the connection is working.

Returns:
The string "It works!".

getShapeNames

public java.util.List<java.lang.String> getShapeNames()
Get a list of names of possible shapes.

Returns:
a list of strings which are the names of the shapes that can be used for nodes.

getFontFaces

public java.util.List<java.lang.String> getFontFaces()
Get the names of the fonts available in Cytoscape.

Returns:
A list of Strings representing the names of the fonts.

getVisualBypassNames

public java.util.Vector<java.lang.String> getVisualBypassNames()
Get a list of visual bypass names.

Returns:
A list of Strings representing the attribute names used to bypass the visual mappers.

showMessage

public boolean showMessage(java.lang.String message)
Shows a message in a JOptionPane and writes that same message to stdout.

Parameters:
message - Message text you want to display.
Returns:
True.

getNotFoundCode

public int getNotFoundCode()
Get the error number for not found errors.

Returns:
number representing the not found error.

getNotExistsCode

public int getNotExistsCode()
Get the error number for the not exists errors.

Returns:
number representing the non exist error.

getWrongTypeCode

public int getWrongTypeCode()
Get the error number for wrong type errors.

Returns:
number representing the wrong type code error.

getInputArgMismatchCode

public int getInputArgMismatchCode()
Get the error number for argument mismatch errors.

Returns:
number representing the argument mismatch.

_getAttributeNames

public java.util.List<java.lang.String> _getAttributeNames()
Function which returns all the function names.

Returns:
a list of all the function names.

trait_names

public java.util.List<java.lang.String> trait_names()
Function which returns all the function names. Is used by Ipython when trying to do tab-completen.

Returns:
List of all methods names.

getFunctions

public final java.lang.String getFunctions()
Displays a list of all available functions in this class.

Returns:
A string containing all the available functions of this module including the in and output variables.

deleteNodeByPassAttr

public boolean deleteNodeByPassAttr(java.lang.String type)
Method which allows you to delete an attribute which overwrites the normal behaviour of the vismapper.

Parameters:
type - String representing the type of attribute that was overwritten and should now be deleted. Name should be written in uppercase and spaces should be converted to underscores.
Returns:
True if the operation succeeded, an exception otherwise.

hasCurrentNetwork

public boolean hasCurrentNetwork()
Check if there is a current network.

Returns:
whether there is a currentNetwork.

getNetworkList

public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getNetworkList()
Function to list the ids and titles of all networks available in Cytoscape.

Returns:
Returns a list of all networks in Cytoscape. Each entry is a map of the form .

createNetwork

public java.lang.String createNetwork(java.lang.String title)
Creates a new CyNetwork with the supplied title.

Parameters:
title - The title of the new network to be created.
Returns:
Identifier of the network just created.

createNetwork

public java.lang.String createNetwork(java.lang.String title,
                                      boolean createView)
Create a new CyNetwork with the supplied title.

Parameters:
title - Title of the network.
createView - Whether to also create a view.
Returns:

createNetworkFromSelection

public java.lang.String createNetworkFromSelection(java.lang.String networkID,
                                                   java.lang.String networkName)
                                            throws org.apache.xmlrpc.XmlRpcException
Create a new network based on the selected nodes of another network.

Parameters:
networkID - The identifier of the source network.
networkName - Name of the new network.
Returns:
The identifier of the newly created network.
Throws:
org.apache.xmlrpc.XmlRpcException

hideAll

public boolean hideAll(java.lang.String networkID)
                throws org.apache.xmlrpc.XmlRpcException
Hide all nodes and edges.

Parameters:
networkID - ID of the network where all nodes and edges should be hidden.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

hideAll

public boolean hideAll()
                throws org.apache.xmlrpc.XmlRpcException
Hide all nodes and edges in the current network.

Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

unhideAll

public boolean unhideAll(java.lang.String networkID)
                  throws org.apache.xmlrpc.XmlRpcException
Unhide all nodes and edges in a network.

Parameters:
networkID - ID of the network where all nodes and edges should be restored.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

unhideAll

public boolean unhideAll()
                  throws org.apache.xmlrpc.XmlRpcException
Restore all nodes and edges in the current network.

Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

clearSelection

public boolean clearSelection(java.lang.String networkID)
                       throws org.apache.xmlrpc.XmlRpcException
Clear the edge and node selections of a network.

Parameters:
networkID - Identifier of the network to clear the selection of.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

clearSelection

public boolean clearSelection()
                       throws org.apache.xmlrpc.XmlRpcException
Clear the edge and node selection of the current network.

Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

createNetworkView

public boolean createNetworkView(java.lang.String networkID)
                          throws org.apache.xmlrpc.XmlRpcException
Creates a new network view.

Parameters:
networkID - the network ID of the network that should be used as the basis for the view.
Returns:
True.
Throws:
org.apache.xmlrpc.XmlRpcException - when network cannot be found.

closeNetworkView

public boolean closeNetworkView(java.lang.String networkID)
                         throws org.apache.xmlrpc.XmlRpcException
Close one network view.

Parameters:
networkID - Identifier of the network.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

closeAllNetworkViews

public boolean closeAllNetworkViews()
Close all network views.

Returns:
True

destroyNetwork

public boolean destroyNetwork(java.lang.String networkID)
                       throws org.apache.xmlrpc.XmlRpcException
Destroys a network.

Parameters:
networkID - ID of the network that should be destroyed.
Returns:
True when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException - when the network does not exist.

getCurrentNetworkProperties

public java.util.Map<java.lang.String,java.lang.String> getCurrentNetworkProperties()
                                                                             throws org.apache.xmlrpc.XmlRpcException
Returns the current network.

Returns:
a map of the form: .
Throws:
org.apache.xmlrpc.XmlRpcException

getCurrentNetworkIndex

public java.lang.String getCurrentNetworkIndex()
                                        throws org.apache.xmlrpc.XmlRpcException
Get the index of the current network.

Returns:
The identifier of the current network.
Throws:
org.apache.xmlrpc.XmlRpcException - when there is no current network.

getNetworkID

public java.lang.String getNetworkID()
                              throws org.apache.xmlrpc.XmlRpcException
Retrieve the ID of the current network.

Returns:
The ID of the current network (as a string).
Throws:
org.apache.xmlrpc.XmlRpcException

getNetworkTitle

public java.lang.String getNetworkTitle()
                                 throws org.apache.xmlrpc.XmlRpcException
Get the title of the current network.

Returns:
The title of the current network.
Throws:
org.apache.xmlrpc.XmlRpcException - when there is no current network.

getNetworkCount

public int getNetworkCount()
Get the number of available networks.

Returns:
The number of networks available in Cytoscape.

getAllNetworks

public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getAllNetworks()
Method to get a list of all the available networks, represented by their networkid and network title.

Returns:
A list of maps containing the ids and the titles of all networks.

getNetworkTitle

public java.lang.String getNetworkTitle(java.lang.String networkID)
                                 throws org.apache.xmlrpc.XmlRpcException
Get the title of the network with the supplied ID.

Parameters:
networkID - Identifier of the network.
Returns:
title of the network.
Throws:
org.apache.xmlrpc.XmlRpcException - when there is no network with the provided network id.

setCurrentNetwork

public boolean setCurrentNetwork(java.lang.String networkID)
                          throws org.apache.xmlrpc.XmlRpcException
Sets the current network.

Parameters:
networkID - id of the network you want to set as current network.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException - when there is no network with the provided network id.

setNetworkTitle

public boolean setNetworkTitle(java.lang.String networkTitle)
                        throws org.apache.xmlrpc.XmlRpcException
Set the title of the current network.

Parameters:
networkTitle - The title you want to give to the current network.
Returns:
True if renaming succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException - When no current network is available.

setNetworkTitle

public boolean setNetworkTitle(java.lang.String networkID,
                               java.lang.String networkTitle)
                        throws org.apache.xmlrpc.XmlRpcException
Set the title for the network with the provided ID.

Parameters:
networkID - ID of the network for which the name should be changed.
networkTitle - the title the network should have.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException - when the network does not exist.

networkExists

public boolean networkExists(java.lang.String networkID)
Checks if a network exists.

Parameters:
networkID - ID of the network you want to check for existence.
Returns:
true if the network exists, false otherwise.

setShowGraphicsDetails

public boolean setShowGraphicsDetails(boolean flag)
                               throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

setShowGraphicsDetails

public boolean setShowGraphicsDetails(java.lang.String networkID,
                                      boolean flag)
                               throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

countAllNodes

public int countAllNodes()
Count all nodes present in Cytoscape.

Returns:
the total number of nodes in Cytoscape.

countNodes

public int countNodes()
               throws org.apache.xmlrpc.XmlRpcException
Count the number of nodes in the current network.

Returns:
the number of nodes in the current network.
Throws:
org.apache.xmlrpc.XmlRpcException

countNodes

public int countNodes(java.lang.String networkID)
               throws org.apache.xmlrpc.XmlRpcException
Count the number of nodes in a particular network.

Parameters:
networkID - the ID of the network of which the nodes should be counted.
Returns:
the number of nodes in a network.
Throws:
org.apache.xmlrpc.XmlRpcException

countSelectedNodes

public int countSelectedNodes(java.lang.String networkID)
                       throws org.apache.xmlrpc.XmlRpcException
Get the number of selected nodes for the specified network.

Parameters:
networkID - ID of the network to count the selected nodes in.
Returns:
number of selected nodes in the provided network.
Throws:
org.apache.xmlrpc.XmlRpcException

countSelectedNodes

public int countSelectedNodes()
                       throws org.apache.xmlrpc.XmlRpcException
Count the number of selected nodes in the current network.

Returns:
The number of selected nodes in the current network.
Throws:
org.apache.xmlrpc.XmlRpcException

hideSelectedNodes

public boolean hideSelectedNodes(java.lang.String networkID)
                          throws org.apache.xmlrpc.XmlRpcException
Hide the selected nodes in a network.

Parameters:
networkID - ID of the network where the selected nodes should be hidden.
Returns:
true.
Throws:
org.apache.xmlrpc.XmlRpcException

hideSelectedNodes

public boolean hideSelectedNodes()
                          throws org.apache.xmlrpc.XmlRpcException
Hide the selected nodes in the current network.

Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

getNodesIDs

public java.util.List<java.lang.String> getNodesIDs(java.lang.String networkID)
                                             throws org.apache.xmlrpc.XmlRpcException
Get the rootgrah IDs of the provided nodes.

Parameters:
networkID - ID of the network to get the nodes from.
Returns:
A list of identifiers of all nodes in the network.
Throws:
org.apache.xmlrpc.XmlRpcException

getNodes

public java.util.Vector<java.lang.String> getNodes(java.lang.String networkID)
                                            throws org.apache.xmlrpc.XmlRpcException
Retrieve the IDs of all the nodes in a network.

Parameters:
networkID - The ID of the network you want the node ids from.
Returns:
A list of all the node ids in the provided network.
Throws:
org.apache.xmlrpc.XmlRpcException - when there is no network with the provided network id.

getNodes

public java.util.Vector<java.lang.String> getNodes()
                                            throws org.apache.xmlrpc.XmlRpcException
Get the IDs of all the nodes in the current network.

Returns:
A list of all the nodeIDs in the current network.
Throws:
org.apache.xmlrpc.XmlRpcException - when there is no current network.

isNodeSelected

public boolean isNodeSelected(java.lang.String networkID,
                              java.lang.String nodeID)
                       throws org.apache.xmlrpc.XmlRpcException
Check whether a node is selected.

Parameters:
networkID - identifier of the network.
nodeID - node identifier.
Returns:
whether the node is selected.
Throws:
org.apache.xmlrpc.XmlRpcException

isNodeSelected

public boolean isNodeSelected(java.lang.String nodeID)
                       throws org.apache.xmlrpc.XmlRpcException
Check whether a node is selected in the current network.

Parameters:
nodeID - identifier of the node.
Returns:
whether the node is selected.
Throws:
org.apache.xmlrpc.XmlRpcException

clearNodeSelection

public boolean clearNodeSelection(java.lang.String networkID)
                           throws org.apache.xmlrpc.XmlRpcException
Unselect all nodes in a network.

Parameters:
networkID - ID of the network where the node selection should be cleared.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

clearNodeSelection

public boolean clearNodeSelection()
                           throws org.apache.xmlrpc.XmlRpcException
Unselect all nodes in the current network.

Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

selectNodes

public boolean selectNodes(java.lang.String networkID,
                           java.lang.String nodeName)
                    throws org.apache.xmlrpc.XmlRpcException
Select a single node. Function needed for R.

Parameters:
networkID - identifier of the network to select the node in.
nodeName - name of the node to select.
Returns:
true.
Throws:
org.apache.xmlrpc.XmlRpcException

selectNode

public boolean selectNode(java.lang.String nodeName)
                   throws org.apache.xmlrpc.XmlRpcException
Select a single node in the current network.

Parameters:
nodeName - name of the node to select.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

selectNodes

public boolean selectNodes(java.lang.String networkID,
                           java.util.List<java.lang.String> nodeIDs,
                           boolean keepSelection,
                           boolean forgive)
                    throws org.apache.xmlrpc.XmlRpcException
Select a number of nodes.

Parameters:
networkID -
nodeIDs -
keepSelection -
forgive -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

selectNodes

public boolean selectNodes(java.lang.String networkID,
                           java.util.List<java.lang.String> nodeNames)
                    throws org.apache.xmlrpc.XmlRpcException
Select a number of nodes, clears the previous selection. This is a shortcut to the setSelectedNodes function.

Parameters:
networkID - identifier of the network to select the nodes in.
nodeNames - Names of the nodes to select.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

selectNodes

public boolean selectNodes(java.util.List<java.lang.String> nodeNames)
                    throws org.apache.xmlrpc.XmlRpcException
Select a number of nodes in the current network, clears the previous selection. This is a shortcut to the setSelectedNodes function.

Parameters:
nodeNames - Names of the nodes to select.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

getSelectedNodes

public java.util.List<java.lang.String> getSelectedNodes(java.lang.String networkID)
                                                  throws org.apache.xmlrpc.XmlRpcException
Get a list of selected nodes.

Parameters:
networkID - Identifier of the network to get the selected node IDs from.
Returns:
List of strings which contains the node IDs.
Throws:
org.apache.xmlrpc.XmlRpcException

getSelectedNodes

public java.util.List<java.lang.String> getSelectedNodes()
                                                  throws org.apache.xmlrpc.XmlRpcException
Get a list of selected nodes in the current network.

Returns:
List of strings which contains the node IDs.
Throws:
org.apache.xmlrpc.XmlRpcException

setSelectedNodes

public boolean setSelectedNodes(java.lang.String networkID,
                                java.util.Vector<java.lang.String> nodeIDs,
                                boolean forgive)
                         throws org.apache.xmlrpc.XmlRpcException
Set the selected nodes for a network.

Parameters:
networkID - The ID of the network where the selection should be changed.
nodeIDs - The IDs of the nodes that should be selected.
forgive - If true the algorithm continues selecting nodes even when ids are supplied which are not found. If not it returns an XMLRPC error.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

setSelectedNodes

public boolean setSelectedNodes(java.util.Vector<java.lang.String> nodeIDs)
                         throws org.apache.xmlrpc.XmlRpcException
Set the selected nodes of a network.

Parameters:
nodeIDs -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

invertNodeSelection

public boolean invertNodeSelection(java.lang.String networkID)
                            throws org.apache.xmlrpc.XmlRpcException
Invert the node selection.

Parameters:
networkID - identifier of the network to invert the node selection in.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

removeSelectedNodes

public boolean removeSelectedNodes(java.lang.String networkID,
                                   boolean set_remove)
                            throws org.apache.xmlrpc.XmlRpcException
Remove the selected nodes.

Parameters:
networkID - identifier of the network to remove the nodes from.
set_remove - removes the nodes from all of Cytoscape, not only from the provided network.
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

nodeExists

public boolean nodeExists(java.lang.String networkID,
                          java.lang.String nodeID)
                   throws org.apache.xmlrpc.XmlRpcException
Checks if a node is present in a network.

Parameters:
networkID - Network in which the node should be present.
nodeID - Node identifier.
Returns:
True if the node exists, false otherwise.
Throws:
org.apache.xmlrpc.XmlRpcException - When the network does not exist.

getTotalNodeCount

public int getTotalNodeCount()
Get the number of nodes present in the current instance of Cytoscape.

Returns:
The total number of nodes present in Cytoscape (in the root- graph).

createNode

public java.lang.String createNode(java.lang.String networkID,
                                   java.lang.String identifier)
                            throws org.apache.xmlrpc.XmlRpcException
Create a node in the supplied network.

Parameters:
networkID - ID of the network where the node should be created.
identifier - Identifier of the node.
Returns:
the identifier of the node.
Throws:
org.apache.xmlrpc.XmlRpcException

createNode

public java.lang.String createNode(java.lang.String identifier)
                            throws org.apache.xmlrpc.XmlRpcException
Create a node in the current network.

Parameters:
identifier - Identifier of the node.
Returns:
the identifier.
Throws:
org.apache.xmlrpc.XmlRpcException

createNodes

public boolean createNodes(java.lang.String networkID,
                           java.util.List identifiers)
                    throws org.apache.xmlrpc.XmlRpcException
Create new nodes in a network.

Parameters:
networkID - Network to which the nodes should be added.
identifiers - Identifiers of the nodes that should be created.
Returns:
true.
Throws:
org.apache.xmlrpc.XmlRpcException

createNodes

public boolean createNodes(java.util.List identifiers)
                    throws org.apache.xmlrpc.XmlRpcException
Create nodes in the current network.

Parameters:
identifiers - Identifers of the nodes that need to be created.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException - when there is no current network.

createNodesFromVector

public boolean createNodesFromVector(java.lang.String networkID,
                                     java.util.Vector identifiers)
                              throws org.apache.xmlrpc.XmlRpcException
Create nodes in the current network. Same function as create nodes but also works for R. Function supplied by Keiichiro Ono.

Parameters:
networkID - identifier of the network to add the nodes to.
identifiers - Vector with node identifiers.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

createNodesFromVector

public boolean createNodesFromVector(java.util.Vector identifiers)
                              throws org.apache.xmlrpc.XmlRpcException
Create nodes in the current network. Same function as create nodes but also works for R. Function supplied by Keiichiro Ono.

Parameters:
identifiers - Vector with node identifiers.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

getNodeNeighbors

public java.util.List<java.lang.String> getNodeNeighbors(java.lang.String networkID,
                                                         java.lang.String nodeID)
                                                  throws org.apache.xmlrpc.XmlRpcException
Get the neighbors of a node in a particular network.

Parameters:
networkID - network identifier.
nodeID - node identifier.
Returns:
list of node identifiers.
Throws:
org.apache.xmlrpc.XmlRpcException

getNodeNeighbors

public java.util.List<java.lang.String> getNodeNeighbors(java.lang.String nodeID)
                                                  throws org.apache.xmlrpc.XmlRpcException
Get the neighbors of a node in the current network.

Parameters:
nodeID - identifier of the node.
Returns:
a list of node identifiers.
Throws:
org.apache.xmlrpc.XmlRpcException

getNodesNeighbors

public java.util.List<java.lang.String> getNodesNeighbors(java.lang.String networkId,
                                                          java.util.Vector<java.lang.String> nodeIDS)
                                                   throws org.apache.xmlrpc.XmlRpcException
Get the neighbords of a list of nodes in a network.

Parameters:
networkId - network identifier.
nodeIDS - list of node identifiers.
Returns:
list of node identifiers.
Throws:
org.apache.xmlrpc.XmlRpcException

getNodesNeighbors

public java.util.List<java.lang.String> getNodesNeighbors(java.util.Vector<java.lang.String> nodeIDs)
                                                   throws org.apache.xmlrpc.XmlRpcException
Get the neighbors of a list of nodes in the current network.

Parameters:
nodeIDs - list of node identifiers.
Returns:
list of node identifiers.
Throws:
org.apache.xmlrpc.XmlRpcException

getNodeChildren

public java.util.List<java.lang.String> getNodeChildren(java.lang.String networkID,
                                                        java.lang.String nodeID)
                                                 throws org.apache.xmlrpc.XmlRpcException
Get the children of a node.

Parameters:
networkID -
nodeID -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getNodesChildren

public java.util.Set<java.lang.String> getNodesChildren(java.lang.String networkID,
                                                        java.util.List<java.lang.String> nodeIDs,
                                                        boolean acceptUndirected)
                                                 throws org.apache.xmlrpc.XmlRpcException
Get the children of multiple nodes.

Parameters:
networkID -
nodeIDs -
acceptUndirected -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getNodesParents

public java.util.Set<java.lang.String> getNodesParents(java.lang.String networkID,
                                                       java.util.List<java.lang.String> nodeIDs,
                                                       boolean acceptUndirected)
                                                throws org.apache.xmlrpc.XmlRpcException
Parameters:
networkID -
nodeIDs -
acceptUndirected -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getNodesParents

public java.util.Set<java.lang.String> getNodesParents(java.util.List<java.lang.String> nodeIDs,
                                                       boolean acceptUndirected)
                                                throws org.apache.xmlrpc.XmlRpcException
Parameters:
nodeIDs -
acceptUndirected -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getConnectedEdges

public java.util.List<java.lang.String> getConnectedEdges(java.lang.String networkID,
                                                          java.lang.String nodeID1,
                                                          java.lang.String nodeID2)
                                                   throws org.apache.xmlrpc.XmlRpcException
Get the edges between two nodes.

Parameters:
networkID - Identifier of the network where the connections should be in.
nodeID1 - Identifier of node 1.
nodeID2 - Identifier of node 2.
Returns:
a list of edge identifiers.
Throws:
org.apache.xmlrpc.XmlRpcException

getConnectedEdges

public java.util.List<java.lang.String> getConnectedEdges(java.lang.String nodeID1,
                                                          java.lang.String nodeID2)
                                                   throws org.apache.xmlrpc.XmlRpcException
Get the edges between two nodes in the current network

Parameters:
nodeID1 - Identifier of node 1.
nodeID2 - Identifier of node 2.
Returns:
a list of edge identifiers.
Throws:
org.apache.xmlrpc.XmlRpcException

getConnectedEdges

public java.util.List<java.lang.String> getConnectedEdges(java.lang.String networkID,
                                                          java.util.Vector<java.lang.String> nodeIDs)
                                                   throws org.apache.xmlrpc.XmlRpcException
Get the edges between a number of nodes.

Parameters:
networkID -
nodeIDs -
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

getConnectedEdges

public java.util.List<java.lang.String> getConnectedEdges(java.util.Vector<java.lang.String> nodeIDs)
                                                   throws org.apache.xmlrpc.XmlRpcException
Get the edges between a number of nodes.

Parameters:
nodeIDs -
Returns:
List of edge identifiers.
Throws:
org.apache.xmlrpc.XmlRpcException

removeNode

public boolean removeNode(java.lang.String networkId,
                          java.lang.String nodeID)
                   throws org.apache.xmlrpc.XmlRpcException
Remove a node from a network.

Parameters:
networkId - network identifier.
nodeID - node identifier.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

removeNode

public boolean removeNode(java.lang.String nodeID)
                   throws org.apache.xmlrpc.XmlRpcException
Remove a node from the current network.

Parameters:
nodeID - node identifier.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addNodesToNetwork

public boolean addNodesToNetwork(java.lang.String networkID,
                                 java.util.List nodeIDs,
                                 boolean forgive)
                          throws org.apache.xmlrpc.XmlRpcException
Adds nodes that already exist in Cytoscape to a network.

Parameters:
networkID - the ID of the network where the nodes should be added to.
nodeIDs - IDs of the nodes you want to add.
forgive - Whether to continue when a node does not exist.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException - when the network does not exist or when the forgive parameter is set to false and a node is not present in Cytoscape.

addNodesToNetwork

public boolean addNodesToNetwork(java.util.List nodeIDs,
                                 boolean forgive)
                          throws org.apache.xmlrpc.XmlRpcException
Add nodes that already exist in Cytoscape to the current network.

Parameters:
nodeIDs - IDs of the nodes you want to add.
forgive - whether to continue when a node does not exist.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException - when there is no current network or when the forgive parameter is set to false and a node is not present in Cytoscape.

selectNode

public boolean selectNode(java.lang.String networkID,
                          java.lang.String nodeID)
                   throws org.apache.xmlrpc.XmlRpcException
Add a node to the selection.

Parameters:
networkID - ID of the network to selected the node in.
nodeID - ID of the node to select.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

selectNodes

public boolean selectNodes(java.util.Vector<java.lang.String> nodeIDs)
                    throws org.apache.xmlrpc.XmlRpcException
Add multiple nodes to the selection in the current network.

Parameters:
nodeIDs - List of node identifiers.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

deselectNode

public boolean deselectNode(java.lang.String networkID,
                            java.lang.String nodeID)
                     throws org.apache.xmlrpc.XmlRpcException
Remove a node from the current selection.

Parameters:
networkID - ID of the network to deselect the node in.
nodeID - ID of the node to deselect.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

getNodeAttributeType

public java.lang.String getNodeAttributeType(java.lang.String attrName)
                                      throws org.apache.xmlrpc.XmlRpcException
Finds the type of a node attribute.

Parameters:
attrName - name of the attribute.
Returns:
a string representation of the type of the attribute.
Throws:
org.apache.xmlrpc.XmlRpcException - when the attribute does not exist.

getNodesByStringAttr

public java.util.List<java.lang.String> getNodesByStringAttr(java.lang.String attrName,
                                                             java.lang.String attrValue)
                                                      throws org.apache.xmlrpc.XmlRpcException
Returns a list of nodes which have a String attribute with the supplied name and value.

Parameters:
attrName - name of the attribute that the search is based on.
attrValue - value of the attribute that the search uses.
Returns:
a list of node identifiers.
Throws:
org.apache.xmlrpc.XmlRpcException

setSelectedNodes

public boolean setSelectedNodes(java.util.Vector<java.lang.String> nodeids,
                                boolean forgive)
                         throws org.apache.xmlrpc.XmlRpcException
Set the selected nodes of the current network.

Parameters:
nodeids - IDs of the nodes that should be selected.
forgive - If set the program skips over IDs that do not have a corresponding node in the current network.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException - when there is not current network or when the forgive parameter is set to false and a node is not present in the network.

getAllNodes

public java.util.Vector<java.lang.String> getAllNodes()
Get a list of nodes.

Returns:
A list of string node IDs.

getNodeShapeNames

public java.util.List<java.lang.String> getNodeShapeNames()
Get the names of the shapes that nodes can have.

Returns:
A list of all the shape names one can use for nodes.

getNodeColorPropertyNames

public java.util.List<java.lang.String> getNodeColorPropertyNames()
Helper method to list all the names of the color properties of nodes.

Returns:
A list with the names of node color properties.

setNodeShape

public boolean setNodeShape(java.lang.Object[] nodeIDs,
                            java.lang.String shape)
                     throws org.apache.xmlrpc.XmlRpcException
Sets the node shapes of the provided nodes in the current network. WARNING: should use the discreteMapper(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map).

Parameters:
nodeIDs -
shape -
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException
See Also:
createDiscreteMapper( java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

setNodeShape

public boolean setNodeShape(java.lang.String networkID,
                            java.lang.Object[] nodeIDs,
                            java.lang.String shapestr)
                     throws org.apache.xmlrpc.XmlRpcException
Sets the node shapes of the provided nodes in the provided network. WARNING: should use the createDiscreteMapper(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map).

Parameters:
networkID -
nodeIDs -
shapestr -
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException
See Also:
createDiscreteMapper( java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

setNodeFillColor

public boolean setNodeFillColor(java.lang.String networkID,
                                java.lang.Object[] nodeIDs,
                                int red,
                                int green,
                                int blue)
                         throws org.apache.xmlrpc.XmlRpcException
Sets the fill color for the provided nodes. WARNING: this overwrites the vizmapper settings! Using the different VizMappers is more efficient.

Parameters:
networkID - network where the nodes should be changed.
nodeIDs - ids of the nodes.
red - Red component.
green - Green component.
blue - Blue component.
Returns:
True when the operation succeeds.
Throws:
org.apache.xmlrpc.XmlRpcException
See Also:
discreteMapper(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

setNodeFillColor

public boolean setNodeFillColor(java.lang.String networkID,
                                java.lang.Object[] nodeIDs,
                                int red,
                                int green,
                                int blue,
                                boolean redraw)
                         throws org.apache.xmlrpc.XmlRpcException
Sets the fill color for the provided nodes. WARNING: this overwrites the vizmapper settings! Using the different VizMappers is more efficient.

Parameters:
networkID - network where the nodes should be changed.
nodeIDs - ids of the nodes.
red - Red component.
green - Green component.
blue - Blue component.
redraw -
Returns:
True when the operation succeeds.
Throws:
org.apache.xmlrpc.XmlRpcException
See Also:
discreteMapper(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

setNodeBorderColor

public boolean setNodeBorderColor(java.lang.String networkID,
                                  java.lang.Object[] nodeIDs,
                                  int red,
                                  int green,
                                  int blue)
                           throws org.apache.xmlrpc.XmlRpcException
Sets the node border color for the provided nodes. WARNING: this overwrites the vizmapper settings!

Parameters:
networkID - ID of the network where to change the color
nodeIDs - IDs of the nodes to change the color of
red - Red component [0..255].
green - Green component [0..255].
blue - Blue component [0..255].
Returns:
True when the operation succeeds
Throws:
org.apache.xmlrpc.XmlRpcException - when the operation fails.

setNodeBorderColor

public boolean setNodeBorderColor(java.lang.String networkID,
                                  java.lang.Object[] nodeIDs,
                                  int red,
                                  int green,
                                  int blue,
                                  boolean redraw)
                           throws org.apache.xmlrpc.XmlRpcException
Sets the node border color for the provided nodes. WARNING: this overwrites the vizmapper settings!

Parameters:
networkID - ID of the network where to change the color
nodeIDs - IDs of the nodes to change the color of
red - Red component [0..255].
green - Green component [0..255].
blue - Blue component [0..255].
redraw -
Returns:
True when the operation succeeds
Throws:
org.apache.xmlrpc.XmlRpcException - when the operation fails.

setNodeLabelColor

public boolean setNodeLabelColor(java.lang.String networkID,
                                 java.lang.Object[] nodeIDs,
                                 int red,
                                 int green,
                                 int blue)
                          throws org.apache.xmlrpc.XmlRpcException
Sets the node label color for the provided nodes.

Parameters:
networkID - ID of the network where to change the color.
nodeIDs - IDs of the nodes to change.
red - Red component [0..255].
green - Green component [0..255].
blue - Blue component [0..255].
Returns:
True when the operation succeeds.
Throws:
org.apache.xmlrpc.XmlRpcException

setNodeLabelColor

public boolean setNodeLabelColor(java.lang.String networkID,
                                 java.lang.Object[] nodeIDs,
                                 int red,
                                 int green,
                                 int blue,
                                 boolean redraw)
                          throws org.apache.xmlrpc.XmlRpcException
Sets the node label color for the provided nodes.

Parameters:
networkID - ID of the network where to change the color.
nodeIDs - IDs of the nodes to change.
red - Red component [0..255].
green - Green component [0..255].
blue - Blue component [0..255].
redraw -
Returns:
True when the operation succeeds.
Throws:
org.apache.xmlrpc.XmlRpcException

overrideNodeVizAttribute

public boolean overrideNodeVizAttribute(java.lang.String nodeID,
                                        java.lang.String attrName,
                                        java.lang.String value)
                                 throws org.apache.xmlrpc.XmlRpcException
Override a visual attribute of a node by some value. This can be used to figure out what Cytoscape expects as values for a visual parameter.

Parameters:
nodeID - ID of the node you want to set the attribute of.
attrName - Name of the attribute.
value - Value the attribute should get.
Returns:
True when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException - when something went wrong.

overrideNodeVizAttribute

public boolean overrideNodeVizAttribute(java.util.Map<java.lang.String,java.lang.String> nodeValues,
                                        java.lang.String attrName)
                                 throws org.apache.xmlrpc.XmlRpcException
Override the visual attribute for a number of nodes.

Parameters:
nodeValues - Map of pairs.
attrName - name of the attribute to set.
Returns:
True when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException

hideAllNodes

public boolean hideAllNodes(java.lang.String networkID)
                     throws org.apache.xmlrpc.XmlRpcException
Hide all nodes in a network.

Parameters:
networkID - Identifier of hte network in which you want to hide all nodes
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

hideNode

public boolean hideNode(java.lang.String nodeid)
                 throws org.apache.xmlrpc.XmlRpcException
Hide one node in the current network.

Parameters:
nodeid - ID of the node.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

hideNode

public boolean hideNode(java.lang.String networkid,
                        java.lang.String nodeid)
                 throws org.apache.xmlrpc.XmlRpcException
Hide one node in a network.

Parameters:
networkid - ID of the network where the node should be hidden.
nodeid - ID of the node.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

unhideNode

public boolean unhideNode(java.lang.String nodeid)
                   throws org.apache.xmlrpc.XmlRpcException
Unhide a node in the current network.

Parameters:
nodeid - list of nodeIDs.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

unhideNode

public boolean unhideNode(java.lang.String networkid,
                          java.lang.String nodeid)
                   throws org.apache.xmlrpc.XmlRpcException
Unhide a node in a network.

Parameters:
networkid - ID of the network where the nodes should be exposed.
nodeid - list of nodeIDs.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

unhideAllNodes

public boolean unhideAllNodes(java.lang.String networkID)
                       throws org.apache.xmlrpc.XmlRpcException
Unhide all nodes in a network.

Parameters:
networkID - ID of the network where the nodes should be restored.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

unhideAllNodes

public boolean unhideAllNodes()
                       throws org.apache.xmlrpc.XmlRpcException
Unhide all nodes in the current network.

Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

setNodeProperty

public boolean setNodeProperty(java.lang.String nodeid,
                               java.lang.String propertyName,
                               java.lang.String propertyValue)
                        throws org.apache.xmlrpc.XmlRpcException
Set a visual property for a node to overwrite whatever the VizMapper is doing.

Parameters:
nodeid - ID of the node that should be changed.
propertyName - name of the property.
propertyValue - String representation of the property value.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

setNodeProperties

public boolean setNodeProperties(java.util.List<java.lang.String> nodeIDs,
                                 java.util.List<java.lang.String> propertyNames,
                                 java.util.List<java.lang.String> propertyValues)
                          throws org.apache.xmlrpc.XmlRpcException
Set the properties of a number of nodes simultaneously.

Parameters:
nodeIDs - list of node identifiers.
propertyNames - list of property names.
propertyValues - list of property values.
Returns:
true when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException

getAdjacentEdges

public java.util.List<java.lang.String> getAdjacentEdges(java.lang.String networkID,
                                                         java.lang.String nodeID)
                                                  throws org.apache.xmlrpc.XmlRpcException
Get the edges coming from and going to a node.

Parameters:
networkID - identifier of the network to get the edges from.
nodeID - node identifier.
Returns:
a list of strings containing the identifiers of the edges going to or coming from this node.
Throws:
org.apache.xmlrpc.XmlRpcException

countAllEdges

public int countAllEdges()
                  throws org.apache.xmlrpc.XmlRpcException
Count all edges present in Cytoscape.

Returns:
The number of edges in cytoscape.
Throws:
org.apache.xmlrpc.XmlRpcException

countEdges

public int countEdges()
               throws org.apache.xmlrpc.XmlRpcException
Count the number of edges in the current network.

Returns:
the number of edges in the current network.
Throws:
org.apache.xmlrpc.XmlRpcException

countEdges

public int countEdges(java.lang.String networkID)
               throws org.apache.xmlrpc.XmlRpcException
Count the number of edges in a particular network.

Parameters:
networkID - the ID of the network where the edges should be counted.
Returns:
the number of edges in that network.
Throws:
org.apache.xmlrpc.XmlRpcException

countSelectedEdges

public int countSelectedEdges()
                       throws org.apache.xmlrpc.XmlRpcException
Count the number of selected edges in the current network.

Returns:
the number of selected edges in the current network.
Throws:
org.apache.xmlrpc.XmlRpcException

countSelectedEdges

public int countSelectedEdges(java.lang.String networkID)
                       throws org.apache.xmlrpc.XmlRpcException
Count the number of selected edges in a particular network.

Parameters:
networkID - the ID of the network where the selected edges should be counted.
Returns:
the number of selected edges.
Throws:
org.apache.xmlrpc.XmlRpcException

hideSelectedEdges

public boolean hideSelectedEdges(java.lang.String networkID)
                          throws org.apache.xmlrpc.XmlRpcException
Hide the selected edges in a network.

Parameters:
networkID - ID of the network where the selected edges should be hidden.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

hideSelectedEdges

public boolean hideSelectedEdges()
                          throws org.apache.xmlrpc.XmlRpcException
Hide the selected edges in the current network.

Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

createEdge

public java.lang.String createEdge(java.lang.String networkID,
                                   java.lang.String from,
                                   java.lang.String to,
                                   java.lang.String type,
                                   boolean directed)
                            throws org.apache.xmlrpc.XmlRpcException
Create one edge in the specified network.

Parameters:
networkID - ID of the network where the edge should be added.
from - identifier of the source node.
to - identifier of the target node.
type - the type of the relation.
directed - whether the relation is directed.
Returns:
identifier of the edge.
Throws:
org.apache.xmlrpc.XmlRpcException

createEdge

public java.lang.String createEdge(java.lang.String from,
                                   java.lang.String to,
                                   java.lang.String type,
                                   boolean directed)
                            throws org.apache.xmlrpc.XmlRpcException
Create one edge in the current network.

Parameters:
from - identifier of the source node.
to - identifier of the target node.
type - type of the relation.
directed - whether the relation is directed.
Returns:
identifier of the edge.
Throws:
org.apache.xmlrpc.XmlRpcException

createEdges

public java.util.List<java.lang.String> createEdges(java.lang.String networkID,
                                                    java.util.List<java.lang.String> from,
                                                    java.util.List<java.lang.String> to,
                                                    java.util.List<java.lang.String> type,
                                                    java.util.List<java.lang.Boolean> directed,
                                                    boolean forgive)
                                             throws org.apache.xmlrpc.XmlRpcException
Add edges to a Cytoscape network.

Parameters:
networkID - Network to which you want to add the edges.
from - List of node ids from which the edges start
to - List of node ids to which the edges should go to
type - List of types of the edges
directed -
forgive - Whether to continue adding edges when a node does not exist
Returns:
List of all the edge ids in the same order as the input lists.
Throws:
org.apache.xmlrpc.XmlRpcException

createEdges

public java.util.List<java.lang.String> createEdges(java.util.List<java.lang.String> from,
                                                    java.util.List<java.lang.String> to,
                                                    java.util.List<java.lang.String> type,
                                                    java.util.List<java.lang.Boolean> directed,
                                                    boolean forgive)
                                             throws org.apache.xmlrpc.XmlRpcException
Add edges to the current network.

Parameters:
from - List of node ids from which the edges start
to - List of node ids to which the edges should go to
type - List of types of the edges
directed -
forgive - Whether to continue adding edges when a node does not exist
Returns:
List of all the edge ids in the same order as the input lists.
Throws:
org.apache.xmlrpc.XmlRpcException

createEdgesFromVector

public java.util.List<java.lang.String> createEdgesFromVector(java.util.Vector sources,
                                                              java.util.Vector targets)
                                                       throws org.apache.xmlrpc.XmlRpcException
Deprecated. Use createEdges(java.lang.String, java.util.List, java.util.List, java.util.List, java.util.List, boolean) with same parameters.

Create edges in the current network. Function supplied by Keiichiro.

Parameters:
sources - Vector of source node ids.
targets - Vector of target node ids.
Returns:
a list of edge identifiers.
Throws:
org.apache.xmlrpc.XmlRpcException

createEdgesFromVector

public java.util.List<java.lang.String> createEdgesFromVector(java.lang.String networkID,
                                                              java.util.Vector sources,
                                                              java.util.Vector targets)
                                                       throws org.apache.xmlrpc.XmlRpcException
Deprecated. Use createEdges(java.lang.String, java.util.List, java.util.List, java.util.List, java.util.List, boolean) with same parameters.

Create edges in the provided network.

Parameters:
networkID - ID of the network to create the edges in.
sources - Vector of Strings with the source node IDs.
targets - Vector of Strings with the target node IDS.
Returns:
a list of Strings identifying the edges.
Throws:
org.apache.xmlrpc.XmlRpcException

createEdges

public java.util.Vector<java.lang.String> createEdges(java.util.Vector<java.lang.String> sources,
                                                      java.util.Vector<java.lang.String> targets)
                                               throws org.apache.xmlrpc.XmlRpcException
Create edges in the current network.

Parameters:
sources - List of source node IDs.
targets - List of target node IDs.
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

createEdges

public java.util.Vector<java.lang.String> createEdges(java.lang.String networkID,
                                                      java.util.Vector<java.lang.String> sources,
                                                      java.util.Vector<java.lang.String> targets)
                                               throws org.apache.xmlrpc.XmlRpcException
Create edges in the provided network.

Parameters:
networkID - ID of the network to create the edges in.
sources - List of source node IDs.
targets - List of target node IDs.
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

removeEdge

public boolean removeEdge(java.lang.String networkID,
                          java.lang.String edgeID)
                   throws org.apache.xmlrpc.XmlRpcException
Remove an edge from a network.

Parameters:
networkID - ID of the network to remove the edge from.
edgeID - identifier of the edge.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

removeEdge

public boolean removeEdge(java.lang.String edgeID)
                   throws org.apache.xmlrpc.XmlRpcException
Remove an edge from the current network.

Parameters:
edgeID - identifier of the edge.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

clearEdgeSelection

public boolean clearEdgeSelection(java.lang.String networkID)
                           throws org.apache.xmlrpc.XmlRpcException
Clear the edge selection of a network.

Parameters:
networkID -
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

clearEdgeSelection

public boolean clearEdgeSelection()
                           throws org.apache.xmlrpc.XmlRpcException
Clear the edge selection of the current network.

Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

getEdges

public java.util.List<java.lang.String> getEdges(java.lang.String networkID)
                                          throws org.apache.xmlrpc.XmlRpcException
Get all the edge identifiers of a network.

Parameters:
networkID - ID of the network.
Returns:
A list of strings with all the edge identifiers.
Throws:
org.apache.xmlrpc.XmlRpcException

getEdges

public java.util.List<java.lang.String> getEdges()
                                          throws org.apache.xmlrpc.XmlRpcException
Get all the edge identifiers of the current network.

Returns:
A list of strings with all the edge identifiers.
Throws:
org.apache.xmlrpc.XmlRpcException

getAllEdges

public java.util.List<java.lang.String> getAllEdges()
                                             throws org.apache.xmlrpc.XmlRpcException
Method to get all the edges available in Cytoscape.

Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getEdgeSourceNodes

public java.util.List<java.lang.String> getEdgeSourceNodes(java.lang.String networkID,
                                                           java.util.Vector<java.lang.String> edgeNames)
                                                    throws org.apache.xmlrpc.XmlRpcException
Get the source nodes of a number of edges.

Parameters:
networkID - Network to search the edges in.
edgeNames - names of the edges.
Returns:
A list of strings representing nodes.
Throws:
org.apache.xmlrpc.XmlRpcException

getEdgeTargetNodes

public java.util.List<java.lang.String> getEdgeTargetNodes(java.lang.String networkID,
                                                           java.util.Vector<java.lang.String> edgeNames)
                                                    throws org.apache.xmlrpc.XmlRpcException
Get the target nodes of a number of edges.

Parameters:
networkID - Network to search the edges in.
edgeNames - names of the edges.
Returns:
A list of strings representing the nodes.
Throws:
org.apache.xmlrpc.XmlRpcException

getChildConnectingEdges

public static java.util.List<java.lang.String> getChildConnectingEdges(java.util.List<java.lang.String> nodeIDs)
                                                                throws org.apache.xmlrpc.XmlRpcException
Get the edges connecting the currently selected nodes and their children.

Parameters:
nodeIDs -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getChildConnectingEdges

public static java.util.List<java.lang.String> getChildConnectingEdges(java.lang.String networkID,
                                                                       java.util.List<java.lang.String> nodeIDs)
                                                                throws org.apache.xmlrpc.XmlRpcException
Get the edges connecting the specified nodes and their children.

Parameters:
networkID -
nodeIDs -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getEdgeAttributeType

public java.lang.String getEdgeAttributeType(java.lang.String attrName)
                                      throws org.apache.xmlrpc.XmlRpcException
Get the type of an edge attribute.

Parameters:
attrName - The name of the attribute.
Returns:
string representation of the type.
Throws:
org.apache.xmlrpc.XmlRpcException

getSelectedEdges

public java.util.List<java.lang.String> getSelectedEdges(java.lang.String networkID)
                                                  throws org.apache.xmlrpc.XmlRpcException
Get the selected edges in a network.

Parameters:
networkID - ID of the network to get the selected edges from.
Returns:
a list of strings with the edge ids.
Throws:
org.apache.xmlrpc.XmlRpcException

getSelectedEdges

public java.util.List<java.lang.String> getSelectedEdges()
                                                  throws org.apache.xmlrpc.XmlRpcException
Get the selected edges of the current network.

Returns:
a list of strings with the edge ids.
Throws:
org.apache.xmlrpc.XmlRpcException

selectEdge

public boolean selectEdge(java.lang.String networkID,
                          java.lang.String edgeName)
                   throws org.apache.xmlrpc.XmlRpcException
Select an edge in a network.

Parameters:
networkID -
edgeName -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

selectEdges

public boolean selectEdges(java.lang.String networkID,
                           java.util.Vector<java.lang.String> edgeNames)
                    throws org.apache.xmlrpc.XmlRpcException
Select multiple edges in a network.

Parameters:
networkID -
edgeNames -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

invertEdgeSelection

public boolean invertEdgeSelection(java.lang.String networkID)
                            throws org.apache.xmlrpc.XmlRpcException
Invert the edge selection.

Parameters:
networkID - identifier of the network to invert the selection in.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

removeSelectedEdges

public boolean removeSelectedEdges(java.lang.String networkID,
                                   boolean set_remove)
                            throws org.apache.xmlrpc.XmlRpcException
Remove the selected edges from a network.

Parameters:
networkID - identifier of the network to remove the edges from.
set_remove - remove the edges from all of Cytoscape, not just the provided network.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

hideEdge

public boolean hideEdge(java.lang.String networkid,
                        java.lang.String edgeID)
                 throws org.apache.xmlrpc.XmlRpcException
Hide an edge in a network.

Parameters:
networkid - ID of the network where the edge should be hidden.
edgeID - identifier of the edge.
Returns:
true.
Throws:
org.apache.xmlrpc.XmlRpcException

hideAllEdges

public boolean hideAllEdges(java.lang.String networkid)
                     throws org.apache.xmlrpc.XmlRpcException
Hide all the edges in a network.

Parameters:
networkid - ID of the network where the edges should be hidden.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

hideAllEdges

public boolean hideAllEdges()
                     throws org.apache.xmlrpc.XmlRpcException
Hide all edges in the current network.

Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

unhideAllEdges

public boolean unhideAllEdges(java.lang.String networkID)
                       throws org.apache.xmlrpc.XmlRpcException
Unhide all edges in a network.

Parameters:
networkID - ID of the network where the edges should be restored.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

unhideAllEdges

public boolean unhideAllEdges()
                       throws org.apache.xmlrpc.XmlRpcException
Unhide all edges in the current network.

Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

setEdgeProperty

public boolean setEdgeProperty(java.lang.String edgeid,
                               java.lang.String propertyName,
                               java.lang.String propertyValue)
                        throws org.apache.xmlrpc.XmlRpcException
Set a visual property for an edge to overwrite whatever the VizMapper is doing.

Parameters:
edgeid - ID of the edge that should be changed.
propertyName - name of the property.
propertyValue - String representation of the property value.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

setEdgeProperties

public boolean setEdgeProperties(java.util.List<java.lang.String> edgeIDs,
                                 java.util.List<java.lang.String> propertyNames,
                                 java.util.List<java.lang.String> propertyValues)
                          throws org.apache.xmlrpc.XmlRpcException
Set the properties of a number of edges simultaneously.

Parameters:
edgeIDs - list of node identifiers.
propertyNames - list of property names.
propertyValues - list of property values.
Returns:
true when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException

getLineStyleNames

public java.util.List<java.lang.String> getLineStyleNames()
                                                   throws org.apache.xmlrpc.XmlRpcException
Get a list of all the names of the different line styles which can be used.

Returns:
A list of strings containing all the names of the different line styles.
Throws:
org.apache.xmlrpc.XmlRpcException

getArrowShapeNames

public java.util.List<java.lang.String> getArrowShapeNames()
                                                    throws org.apache.xmlrpc.XmlRpcException
Get a list of all the names of the different arrowheads that can be used.

Returns:
A list of strings containing all the names of the different arrowheads.
Throws:
org.apache.xmlrpc.XmlRpcException

listAttributeTypes

public static java.util.List<java.lang.String> listAttributeTypes()
Method to list all the available types of attributes.

Returns:
List of strings with the names of the attribute types.

hasEdgeAttribute

public boolean hasEdgeAttribute(java.lang.String edgeID,
                                java.lang.String attrName)
Check if the attribute exists in a certain edge.

Parameters:
edgeID - the identifier of the edge.
attrName - the name of the attribute.
Returns:
whether the edge has an attribute with the provided name.

hasNodeAttribute

public boolean hasNodeAttribute(java.lang.String nodeID,
                                java.lang.String attrName)
Check if the attribute exists for a certain node.

Parameters:
nodeID - the node identifier.
attrName - the name of the attribute.
Returns:
whether the node has an attribute with the provided name.

hasNetworkAttribute

public boolean hasNetworkAttribute(java.lang.String networkID,
                                   java.lang.String attrName)
Check if the attribute exists for a certain network.

Parameters:
networkID - Identifier of the network.
attrName - Name of the attribute.
Returns:
true

getNodeAttribute

public java.lang.Object getNodeAttribute(java.lang.String nodeID,
                                         java.lang.String attrName)
                                  throws org.apache.xmlrpc.XmlRpcException
Get node attribute.

Parameters:
nodeID - ID of the node.
attrName - name of the attribute.
Returns:
object representation of the value.
Throws:
org.apache.xmlrpc.XmlRpcException

getNodesAttributes

public java.util.Vector<java.lang.Object> getNodesAttributes(java.lang.String name,
                                                             java.util.Vector<java.lang.String> IDs)
                                                      throws org.apache.xmlrpc.XmlRpcException
Get the attribute values for one attribute for a number of nodes.

Parameters:
name - name of the attribute.
IDs - list of node identifiers.
Returns:
a list of attribute values.
Throws:
org.apache.xmlrpc.XmlRpcException

getNodeAttributes

public java.util.Map<java.lang.String,java.lang.Object> getNodeAttributes(java.lang.String nodeID)
Get all the attribute values for a node.

Parameters:
nodeID - the node identifier.
Returns:
a map containing pairs of attributes for the specified node.

getNetworksAttributes

public java.util.Vector<java.lang.Object> getNetworksAttributes(java.lang.String name,
                                                                java.util.Vector<java.lang.String> IDs)
                                                         throws org.apache.xmlrpc.XmlRpcException
Get the attribute values for one attribute for a number of networks.

Parameters:
name - Name of the attribute.
IDs - List of network identifier.
Returns:
a list of attribute values.
Throws:
org.apache.xmlrpc.XmlRpcException

getNetworkAttributes

public java.util.Map<java.lang.String,java.lang.Object> getNetworkAttributes(java.lang.String networkID)
Get all the attribute values for a network.

Parameters:
networkID - Network identifier.
Returns:
A map containing pairs.

getEdgeAttribute

public java.lang.Object getEdgeAttribute(java.lang.String edgeID,
                                         java.lang.String attrName)
                                  throws org.apache.xmlrpc.XmlRpcException
Get node attribute.

Parameters:
edgeID - ID of the edge.
attrName - name of the attribute.
Returns:
object representation of the value.
Throws:
org.apache.xmlrpc.XmlRpcException

getEdgesAttributes

public java.util.List<java.lang.Object> getEdgesAttributes(java.lang.String attrName,
                                                           java.util.Vector<java.lang.String> ids)
                                                    throws org.apache.xmlrpc.XmlRpcException
Get for a list of edges the value of an attribute.

Parameters:
attrName - name of the attribute
ids - list of edge identifiers.
Returns:
list of attribute values (one for each requested edge).
Throws:
org.apache.xmlrpc.XmlRpcException

getEdgeAttributes

public java.util.Map<java.lang.String,java.lang.Object> getEdgeAttributes(java.lang.String edgeID)
Get all the attribute values for an edge.

Parameters:
edgeID - id of the edge.
Returns:
a map containing pairs of attributes for the specified edge.

getEdgeAttributeNames

public java.util.List<java.lang.String> getEdgeAttributeNames()
Get all the names of edge attributes.

Returns:
A list of strings containing all the names of the edge attributes.

getNodeAttributeNames

public java.util.List<java.lang.String> getNodeAttributeNames()
Get all the names of node attributes.

Returns:
A list of strings containing all the names of the node attributes.

getNetworkAttributeNames

public java.util.List<java.lang.String> getNetworkAttributeNames()
Get all the names of network attributes.

Returns:
A list of strings containing all the names of the network attributes.

getNetworkAttributeType

public java.lang.String getNetworkAttributeType(java.lang.String attrName)
                                         throws org.apache.xmlrpc.XmlRpcException
Finds the type of a network attribute.

Parameters:
attrName - name of the attribute.
Returns:
a string representation of the type of the attribute.
Throws:
org.apache.xmlrpc.XmlRpcException - when the attribute does not exist.

getUniqueNodeAttributes

public java.util.Collection getUniqueNodeAttributes(java.lang.String attrName)
                                             throws org.apache.xmlrpc.XmlRpcException
Parameters:
attrName - Name of the attribute.
Returns:
A list of unique attribute values for the specified attribute.
Throws:
org.apache.xmlrpc.XmlRpcException - when the attribute does not exist.

getUniqueNodeAttributes

public java.util.Collection getUniqueNodeAttributes(java.lang.String attrName,
                                                    java.lang.String networkID)
                                             throws org.apache.xmlrpc.XmlRpcException
Parameters:
attrName - Name of the attribute you want the unique instances of.
networkID - ID of the network where the nodes should be in
Returns:
A set of unique values of the requested attributes.
Throws:
org.apache.xmlrpc.XmlRpcException

addBooleanEdgeAttribute

public boolean addBooleanEdgeAttribute(java.lang.String name,
                                       java.lang.String ID,
                                       boolean value)
Add a boolean attribute to an edge.

Parameters:
name - name of the attribute.
ID - Identifier of the edge.
value - Value of the attribute.
Returns:
true

addBooleanNetworkAttribute

public boolean addBooleanNetworkAttribute(java.lang.String name,
                                          java.lang.String ID,
                                          boolean value)
Add a boolean attribute to a network.

Parameters:
name - name of the attribute.
ID - Identifier of the network.
value - Value of the attribute.
Returns:
true

addBooleanNodeAttribute

public boolean addBooleanNodeAttribute(java.lang.String name,
                                       java.lang.String ID,
                                       boolean value)
Add a boolean attribute to a node.

Parameters:
name - name of the attribute.
ID - Identifier of the node.
value - Value of the attribute.
Returns:
true

addDoubleEdgeAttribute

public boolean addDoubleEdgeAttribute(java.lang.String name,
                                      java.lang.String ID,
                                      double value)
Add a double attribute to an edge.

Parameters:
name - name of the attribute.
ID - Identifier of the edge.
value - Value of the attribute.
Returns:
true

addDoubleNetworkAttribute

public boolean addDoubleNetworkAttribute(java.lang.String name,
                                         java.lang.String ID,
                                         double value)
Add a double attribute to a network.

Parameters:
name - name of the attribute.
ID - Identifier of the network.
value - Value of the attribute.
Returns:
true

addDoubleNodeAttribute

public boolean addDoubleNodeAttribute(java.lang.String name,
                                      java.lang.String ID,
                                      double value)
Add a double attribute to a node.

Parameters:
name - name of the attribute.
ID - Identifier of the node.
value - Value of the attribute.
Returns:
true

addIntegerEdgeAttribute

public boolean addIntegerEdgeAttribute(java.lang.String name,
                                       java.lang.String ID,
                                       int value)
Add a integer attribute to an edge.

Parameters:
name - name of the attribute.
ID - Identifier of the edge.
value - Value of the attribute.
Returns:
true

addIntegerNetworkAttribute

public boolean addIntegerNetworkAttribute(java.lang.String name,
                                          java.lang.String ID,
                                          int value)
Add a integer attribute to a network.

Parameters:
name - name of the attribute.
ID - Identifier of the network.
value - Value of the attribute.
Returns:
true

addIntegerNodeAttribute

public boolean addIntegerNodeAttribute(java.lang.String name,
                                       java.lang.String ID,
                                       int value)
Add a integer attribute to a node.

Parameters:
name - name of the attribute.
ID - Identifier of the node.
value - Value of the attribute.
Returns:
true

addStringEdgeAttribute

public boolean addStringEdgeAttribute(java.lang.String name,
                                      java.lang.String ID,
                                      java.lang.String value)
Add a string attribute to an edge.

Parameters:
name - name of the attribute.
ID - Identifier of the edge.
value - Value of the attribute.
Returns:
true

addStringNetworkAttribute

public boolean addStringNetworkAttribute(java.lang.String name,
                                         java.lang.String ID,
                                         java.lang.String value)
Add a string attribute to a network.

Parameters:
name - name of the attribute.
ID - Identifier of the network.
value - Value of the attribute.
Returns:
true

addStringNodeAttribute

public boolean addStringNodeAttribute(java.lang.String name,
                                      java.lang.String ID,
                                      java.lang.String value)
Add a string attribute to a node.

Parameters:
name - name of the attribute.
ID - Identifier of the node.
value - Value of the attribute.
Returns:
true

addBooleanEdgeAttributes

public boolean addBooleanEdgeAttributes(java.lang.String name,
                                        java.util.List<java.lang.String> IDs,
                                        java.util.List<java.lang.Boolean> values)
                                 throws org.apache.xmlrpc.XmlRpcException
Add boolean attributes to a number of edges.

Parameters:
name - name of the attribute.
IDs - identifiers of the edges.
values - values of the attributes.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addBooleanNetworkAttributes

public boolean addBooleanNetworkAttributes(java.lang.String name,
                                           java.util.List<java.lang.String> IDs,
                                           java.util.List<java.lang.Boolean> values)
                                    throws org.apache.xmlrpc.XmlRpcException
Add boolean attributes to a number of networks.

Parameters:
name - name of the attribute.
IDs - identifiers of the networks.
values - values of the attributes.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addBooleanNodeAttributes

public boolean addBooleanNodeAttributes(java.lang.String name,
                                        java.util.List<java.lang.String> IDs,
                                        java.util.List<java.lang.Boolean> values)
                                 throws org.apache.xmlrpc.XmlRpcException
Add boolean attributes to a number of nodes.

Parameters:
name - name of the attribute.
IDs - identifiers of the nodes.
values - values of the attributes.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addDoubleEdgeAttributes

public boolean addDoubleEdgeAttributes(java.lang.String name,
                                       java.util.List<java.lang.String> IDs,
                                       java.util.List<java.lang.Double> values)
                                throws org.apache.xmlrpc.XmlRpcException
Add double attributes to a number of edges.

Parameters:
name - name of the attribute.
IDs - identifiers of the edges.
values - values of the attributes.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addDoubleNetworkAttributes

public boolean addDoubleNetworkAttributes(java.lang.String name,
                                          java.util.List<java.lang.String> IDs,
                                          java.util.List<java.lang.Double> values)
                                   throws org.apache.xmlrpc.XmlRpcException
Add double attributes to a number of networks.

Parameters:
name - name of the attribute.
IDs - identifiers of the networks.
values - values of the attributes.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addDoubleNodeAttributes

public boolean addDoubleNodeAttributes(java.lang.String name,
                                       java.util.List<java.lang.String> IDs,
                                       java.util.List<java.lang.Double> values)
                                throws org.apache.xmlrpc.XmlRpcException
Add double attributes to a number of nodes.

Parameters:
name - name of the attribute.
IDs - identifiers of the nodes.
values - values of the attributes.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addIntegerEdgeAttributes

public boolean addIntegerEdgeAttributes(java.lang.String name,
                                        java.util.List<java.lang.String> IDs,
                                        java.util.List<java.lang.Integer> values)
                                 throws org.apache.xmlrpc.XmlRpcException
Add integer attributes to a number of edges.

Parameters:
name - name of the attribute.
IDs - identifiers of the edges.
values - values of the attributes.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addIntegerNetworkAttributes

public boolean addIntegerNetworkAttributes(java.lang.String name,
                                           java.util.List<java.lang.String> IDs,
                                           java.util.List<java.lang.Integer> values)
                                    throws org.apache.xmlrpc.XmlRpcException
Add integer attributes to a number of networks.

Parameters:
name - name of the attribute.
IDs - identifiers of the networksr.
values - values of the attributes.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addIntegerNodeAttributes

public boolean addIntegerNodeAttributes(java.lang.String name,
                                        java.util.List<java.lang.String> IDs,
                                        java.util.List<java.lang.Integer> values)
                                 throws org.apache.xmlrpc.XmlRpcException
Add integer attributes to a number of nodes.

Parameters:
name - name of the attribute.
IDs - identifiers of the nodes.
values - values of the attributes.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addStringEdgeAttributes

public boolean addStringEdgeAttributes(java.lang.String name,
                                       java.util.List<java.lang.String> IDs,
                                       java.util.List<java.lang.String> values)
                                throws org.apache.xmlrpc.XmlRpcException
Add string attributes to a number of edges.

Parameters:
name - name of the attribute.
IDs - identifiers of the edges.
values - values of the attributes.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addStringNetworkAttributes

public boolean addStringNetworkAttributes(java.lang.String name,
                                          java.util.List<java.lang.String> IDs,
                                          java.util.List<java.lang.String> values)
                                   throws org.apache.xmlrpc.XmlRpcException
Add string attributes to a number of networks.

Parameters:
name - name of the attribute.
IDs - identifiers of the networks.
values - values of the attributes.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addStringNodeAttributes

public boolean addStringNodeAttributes(java.lang.String name,
                                       java.util.List<java.lang.String> IDs,
                                       java.util.List<java.lang.String> values)
                                throws org.apache.xmlrpc.XmlRpcException
Add string attributes to a number of nodes.

Parameters:
name - name of the attribute.
IDs - identifiers of the nodes.
values - values of the attributes.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addNodeAttribute

public boolean addNodeAttribute(java.lang.String name,
                                java.lang.String type,
                                java.lang.String ID,
                                java.lang.Object value)
                         throws org.apache.xmlrpc.XmlRpcException
Add an attribute to a node.

Parameters:
name - Name of the attribute.
type - Type of the attribute.
ID - ID of the node.
value - value of the attribute.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addEdgeAttribute

public boolean addEdgeAttribute(java.lang.String name,
                                java.lang.String type,
                                java.lang.String ID,
                                java.lang.Object value)
                         throws org.apache.xmlrpc.XmlRpcException
Add an attribute to an edge.

Parameters:
name - Name of the attribute.
type - Type of the attribute.
ID - ID of the edge.
value - value of the attribute.
Returns:
true.
Throws:
org.apache.xmlrpc.XmlRpcException

addNetworkAttribute

public boolean addNetworkAttribute(java.lang.String name,
                                   java.lang.String type,
                                   java.lang.String networkID,
                                   java.lang.Object value)
                            throws org.apache.xmlrpc.XmlRpcException
Add an attribute to a network.

Parameters:
name - Name of the attribute.
type - Type of the attribute.
networkID - ID of the network.
value - value of the attribute.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

nodesHaveAttribute

public java.util.ArrayList<java.lang.Boolean> nodesHaveAttribute(java.lang.String name,
                                                                 java.util.Vector<java.lang.String> ids)
Check if a list of nodes have a particular attribute.

Parameters:
name -
ids -
Returns:

edgesHaveAttribute

public java.util.ArrayList<java.lang.Boolean> edgesHaveAttribute(java.lang.String name,
                                                                 java.util.Vector<java.lang.String> ids)
Check if a list of edges have a particular attribute.

Parameters:
name -
ids -
Returns:

networksHaveAttribute

public java.util.ArrayList<java.lang.Boolean> networksHaveAttribute(java.lang.String name,
                                                                    java.util.Vector<java.lang.String> ids)
Check if a list of networks have a particular attribute.

Parameters:
name -
ids -
Returns:

addNodeAttributes

public boolean addNodeAttributes(java.lang.String name,
                                 java.lang.String type,
                                 java.util.Map<java.lang.String,java.lang.Object> values,
                                 boolean forgive)
                          throws org.apache.xmlrpc.XmlRpcException
Add attributes to nodes.

Parameters:
name - Name that the attribute should have.
type - The type of the attribute that you want to add.
values - a map of pairs.
forgive - whether non-existing nodes may be skipped.
Returns:
true when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException

addEdgeAttributes

public boolean addEdgeAttributes(java.lang.String name,
                                 java.lang.String type,
                                 java.util.Map<java.lang.String,java.lang.Object> values)
                          throws org.apache.xmlrpc.XmlRpcException
Adds attributes to CyEdges. Warning: does not check for edge existence.

Parameters:
name - Name of the attribute.
type - Type of the attribute (BOOLEAN, INTEGER, FLOATING, STRING).
values - Map of pairs.
Returns:
True when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException

addEdgeAttributes

public boolean addEdgeAttributes(java.lang.String name,
                                 java.lang.String type,
                                 java.util.Vector<java.lang.String> edgeIDs,
                                 java.util.Vector<java.lang.Object> values)
                          throws org.apache.xmlrpc.XmlRpcException
Adds attributes to CyEdges. Warning: does not check for edge existence.

Parameters:
name - Name of the attribute.
type - Type of the attribute (BOOLEAN, INTEGER, FLOATING, STRING).
edgeIDs - List of edge identifiers
values - List of values for each edge
Returns:
True when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException

addNetworkAttributes

public boolean addNetworkAttributes(java.lang.String name,
                                    java.lang.String type,
                                    java.util.Map<java.lang.String,java.lang.Object> values)
                             throws org.apache.xmlrpc.XmlRpcException
Add attributes to CyNetworks.

Parameters:
name - Name of the attribute.
type - Type of the attribute.
values - Map of pairs.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

addNetworkAttributes

public boolean addNetworkAttributes(java.lang.String name,
                                    java.lang.String type,
                                    java.lang.String[] networkIDs,
                                    java.lang.Object[] values)
                             throws org.apache.xmlrpc.XmlRpcException
Add attributes to CyNetworks.

Parameters:
name - Name of the attribute.
type - Type of the attribute.
networkIDs - List of IDs
values - Values for each networkID
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

deleteEdgeAttribute

public boolean deleteEdgeAttribute(java.lang.String attrName)
Delete one attribute for all edges.

Parameters:
attrName - Name of the attribute to delete.
Returns:
true

deleteEdgeAttribute

public boolean deleteEdgeAttribute(java.lang.String ID,
                                   java.lang.String name)
Delete an edge attribute for a certain edge.

Parameters:
ID - ID of the edge.
name - name of the attribute.
Returns:
true.

deleteNetworkAttribute

public boolean deleteNetworkAttribute(java.lang.String attrName)
Delete one attribute for all networks.

Parameters:
attrName -
Returns:
true

deleteNetworkAttribute

public boolean deleteNetworkAttribute(java.lang.String ID,
                                      java.lang.String name)
Delete a network attribute for a certain network.

Parameters:
ID - Identifier of the network.
name - Name of the attribute.
Returns:
true

deleteNodeAttribute

public boolean deleteNodeAttribute(java.lang.String attrName)
Delete one attribute for all nodes.

Parameters:
attrName - Name of the attribute to delete.
Returns:
true

deleteNodeAttribute

public boolean deleteNodeAttribute(java.lang.String ID,
                                   java.lang.String name)
Delete an attribute for a certain node.

Parameters:
ID - id of the node.
name - name of the attribute.
Returns:
true

getLayoutNames

public java.util.List<java.lang.String> getLayoutNames()
Helper function to get the names of all available layouts.

Returns:
A list of strings with all the available layouts.

getLayoutNamesMapping

public java.util.Map<java.lang.String,java.lang.String> getLayoutNamesMapping()

getLayoutProperties

public java.util.List<java.lang.String> getLayoutProperties(java.lang.String layoutName)
                                                     throws org.apache.xmlrpc.XmlRpcException
Get the property names (tunable names) for a layout.

Parameters:
layoutName - Name of the layout.
Returns:
a list of strings with the names of the properties.
Throws:
org.apache.xmlrpc.XmlRpcException

getLayoutPropertyType

public java.lang.String getLayoutPropertyType(java.lang.String layoutName,
                                              java.lang.String propertyName)
                                       throws org.apache.xmlrpc.XmlRpcException
Get the type of a layout property.

Parameters:
layoutName - Name of the layout.
propertyName - Name of the property.
Returns:
A string representation of the type of a property.
Throws:
org.apache.xmlrpc.XmlRpcException

getLayoutPropertyTypes

public java.util.Map<java.lang.String,java.lang.String> getLayoutPropertyTypes(java.lang.String layoutName)
                                                                        throws org.apache.xmlrpc.XmlRpcException
Get the names and types of all the properties of a layout.

Parameters:
layoutName - Name of the layout.
Returns:
HashMap with the names of the properties as keys and the types as values.
Throws:
org.apache.xmlrpc.XmlRpcException

getLayoutPropertyValue

public java.lang.Object getLayoutPropertyValue(java.lang.String layoutName,
                                               java.lang.String propertyName)
                                        throws org.apache.xmlrpc.XmlRpcException
Get the current property value of a layout algorithm.

Parameters:
layoutName - Name of the layout.
propertyName - Name of the property.
Returns:
An object representing the current value of the property.
Throws:
org.apache.xmlrpc.XmlRpcException

getLayoutPropertyValues

public java.util.Map<java.lang.String,java.lang.Object> getLayoutPropertyValues(java.lang.String layoutName)
                                                                         throws org.apache.xmlrpc.XmlRpcException
Get the current property values of a layout algorithm.

Parameters:
layoutName - Name of the layout.
Returns:
Hashmap with the names of the properties as keys and the values as values.
Throws:
org.apache.xmlrpc.XmlRpcException

setLayoutPropertyValue

public boolean setLayoutPropertyValue(java.lang.String layoutName,
                                      java.lang.String propertyName,
                                      java.lang.String value)
                               throws org.apache.xmlrpc.XmlRpcException
Set one layout property value.

Parameters:
layoutName - Name of the layout.
propertyName - Name of the layout.
value - Value the property shoud get. Specify as string.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

setLayoutPropertyValues

public boolean setLayoutPropertyValues(java.lang.String layoutName,
                                       java.util.Map<java.lang.String,java.lang.String> values)
                                throws org.apache.xmlrpc.XmlRpcException
Set multiple layout property values at once.

Parameters:
layoutName - Name of the layout.
values - Map of pairs. Specify the values as strings.
Returns:
True.
Throws:
org.apache.xmlrpc.XmlRpcException

setLayoutPropertyValues

public boolean setLayoutPropertyValues(java.lang.String layoutName,
                                       java.util.List<java.lang.String> names,
                                       java.util.List<java.lang.String> values)
                                throws org.apache.xmlrpc.XmlRpcException
Alternative (R specific) version of the setLayoutPropertyValues function.

Parameters:
layoutName - Name of the layout.
names - Layout property names.
values - Layout property values.
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

performDefaultLayout

public boolean performDefaultLayout()
                             throws org.apache.xmlrpc.XmlRpcException
Performs the default cytoscape layout on the current network, usually gridLayout.

Returns:
True is the layout algorithm succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException - When there is no current network or the layout algorithm did not work.

performDefaultLayout

public boolean performDefaultLayout(java.lang.String networkID)
                             throws org.apache.xmlrpc.XmlRpcException
Performs the default layout (usually grid) on the provided network.

Parameters:
networkID - The network id of the network you want to perform the layout on.
Returns:
True if the layout succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException - When the requested network does not exist or the layout algorithm did not complete.

performLayout

public boolean performLayout(java.lang.String networkID,
                             java.lang.String layoutName)
                      throws org.apache.xmlrpc.XmlRpcException
Performs the layout on the provided network. Returns an error if either the network or the layout can't be found.

Parameters:
networkID - The network id of the network you want to perform the layout on.
layoutName - Name of the layout you want to use. See 'getLayoutNames' for the names of the layouts that you can use.
Returns:
True when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException - when the requested network does not exist or the layout algorithm could not be performed.

performLayout

public boolean performLayout(java.lang.String layoutName)
                      throws org.apache.xmlrpc.XmlRpcException
Performs the layout on the current network.

Parameters:
layoutName - Name of the layout you want to use.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

getVisualStyleNames

public java.util.List<java.lang.String> getVisualStyleNames()
Lists all the available visual styles.

Returns:
A list of visual style names.

copyVisualStyle

public boolean copyVisualStyle(java.lang.String fromName,
                               java.lang.String toName)
                        throws org.apache.xmlrpc.XmlRpcException
Copies a VisualStyle. This can be used to later modify this style.

Parameters:
fromName - Name of the original VisualStyle.
toName - Name the new VisualStyle should get.
Returns:
True when operations succeeds.
Throws:
org.apache.xmlrpc.XmlRpcException - when the VisualStyle does not exist or the clone operation cannot be performed.

deleteVisualStyle

public boolean deleteVisualStyle(java.lang.String styleName)
                          throws org.apache.xmlrpc.XmlRpcException
Delete a visual style.

Parameters:
styleName - Name of the style to delete.
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getCurrentVisualStyle

public java.lang.String getCurrentVisualStyle()
Returns the name of the current VisualStyle.

Returns:
the name of the current VisualStyle.

setVisualStyle

public boolean setVisualStyle(java.lang.String name)
                       throws org.apache.xmlrpc.XmlRpcException
Set the current VisualStyle.

Parameters:
name - Name of the VisualStyle that should be set as the current VS.
Returns:
True if the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException

getVisualStyleModifiables

public java.util.List<java.lang.String> getVisualStyleModifiables()
Retrieves all the names of the attributes that can be set in a VisualStyle.

Returns:
A list of names of the modifiable attributes of a VisualStyle.
See Also:
VisualPropertyType

setDiscreteNodeShapeMapper

public boolean setDiscreteNodeShapeMapper(java.lang.String networkID,
                                          java.lang.String styleName,
                                          java.lang.String attrName,
                                          java.lang.String defaultShape,
                                          java.lang.Object[] values,
                                          java.lang.String[] shapes,
                                          boolean overWrite)
                                   throws org.apache.xmlrpc.XmlRpcException
Sets the node-shape mapping for the provided network & style. Takes a values and shapes array, instead of a Map. Consider using the more flexible discreteMapper function instead.

Parameters:
networkID - the ID of the network where the mapping should be performed.
styleName - name of the style that should be changed.
attrName - name of the attribute that holds the values that the vizmapper should use to set the shape of the nodes.
defaultShape -
values - Values for attributes
shapes - A shape for each element in 'values'
overWrite - whether to delete custom set attributes.
Returns:
true When the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException - When the network does not exist, the style does not exist, one of the shapes does not exist or the attribute does not exist.
See Also:
getNodeShapeNames(), getUniqueNodeAttributes(java.lang.String), discreteMapper(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

setDiscreteNodeShapeMapper

public boolean setDiscreteNodeShapeMapper(java.lang.String networkID,
                                          java.lang.String styleName,
                                          java.lang.String attrName,
                                          java.lang.String defaultShape,
                                          java.lang.Object[] values,
                                          java.lang.String[] shapes,
                                          boolean overWrite,
                                          boolean redraw)
                                   throws org.apache.xmlrpc.XmlRpcException
Sets the node-shape mapping for the provided network & style. Takes a values and shapes array, instead of a Map. Consider using the more flexible discreteMapper function instead.

Parameters:
networkID - the ID of the network where the mapping should be performed.
styleName - name of the style that should be changed.
attrName - name of the attribute that holds the values that the vizmapper should use to set the shape of the nodes.
defaultShape -
values - Values for attributes
shapes - A shape for each element in 'values'
overWrite - whether to delete custom set attributes.
redraw -
Returns:
true When the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException - When the network does not exist, the style does not exist, one of the shapes does not exist or the attribute does not exist.
See Also:
getNodeShapeNames(), getUniqueNodeAttributes(java.lang.String), discreteMapper(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

setDiscreteNodeShapeMapper

public boolean setDiscreteNodeShapeMapper(java.lang.String networkID,
                                          java.lang.String styleName,
                                          java.lang.String attrName,
                                          java.lang.String defaultShape,
                                          java.util.Map<java.lang.Object,java.lang.String> mapping,
                                          boolean overWrite)
                                   throws org.apache.xmlrpc.XmlRpcException
Deprecated. Use createDiscreteMapper

Sets the node-shape mapping for the provided network & style. Consider using the more flexible discreteMapper function instead.

Parameters:
networkID - the ID of the network where the mapping should be performed.
styleName - name of the style that should be changed.
attrName - name of the attribute that holds the values that the vizmapper should use to set the shape of the nodes.
defaultShape -
mapping - Map of pairs indicating what shape an attribute value should get.
overWrite - whether to delete custom set attributes.
Returns:
true When the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException - When the network does not exist, the style does not exist, one of the shapes does not exist or the attribute does not exist.
See Also:
getNodeShapeNames(), getUniqueNodeAttributes(java.lang.String), discreteMapper(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

createContinuousNodeColorVisualStyle

public boolean createContinuousNodeColorVisualStyle(java.lang.String attrName,
                                                    java.lang.String nodePropName,
                                                    java.lang.String minColorS,
                                                    java.lang.String midColorS,
                                                    java.lang.String maxColorS,
                                                    double minValue,
                                                    double midValue,
                                                    double maxValue)
                                             throws org.apache.xmlrpc.XmlRpcException
Deprecated. use createContinuousMapper

Create a visual style for a node color property.

Parameters:
attrName -
nodePropName -
minColorS - HTML color value for the smallest attribute value
midColorS - HTML color value for the average attribute value
maxColorS - HTML color value for the max attribute value
minValue -
midValue -
maxValue -
Returns:
True when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException

createContinuousEdgeVisualStyle

public boolean createContinuousEdgeVisualStyle(java.lang.String attrName,
                                               java.lang.String edgePropName,
                                               double maxEdgeWidth)
                                        throws org.apache.xmlrpc.XmlRpcException
Create a continuous visual style for edges based on an edge attribute.

Parameters:
attrName - name of the attribute to use.
edgePropName - name of the visual property to adjust.
maxEdgeWidth -
Returns:
True when the operation succeeds.
Throws:
org.apache.xmlrpc.XmlRpcException

createContinuousNodeVisualStyle

public boolean createContinuousNodeVisualStyle(java.lang.String attrName,
                                               java.lang.String nodePropName,
                                               java.util.List<java.lang.Object> attrValues,
                                               java.util.List<java.lang.Object> propValues)
                                        throws org.apache.xmlrpc.XmlRpcException
Create a continuous style for nodes.

Parameters:
attrName - name of the attribute to use for the mapping.
nodePropName - property of the node to change.
attrValues - attribute values to use.
propValues - property values to set.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

createContinuousNodeVisualStyle

public boolean createContinuousNodeVisualStyle(java.lang.String attrName,
                                               java.lang.String nodePropName,
                                               java.util.List<java.lang.Object> attrValues,
                                               java.util.List<java.lang.Object> propValues,
                                               boolean redraw)
                                        throws org.apache.xmlrpc.XmlRpcException
Create a continuous style for nodes.

Parameters:
attrName - name of the attribute to use for the mapping.
nodePropName - property of the node to change.
attrValues - attribute values to use.
propValues - property values to set.
redraw -
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

createContinuousEdgeVisualStyle

public boolean createContinuousEdgeVisualStyle(java.lang.String attrName,
                                               java.lang.String edgePropName,
                                               java.util.List<java.lang.Object> attrValues,
                                               java.util.List<java.lang.Object> propValues)
                                        throws org.apache.xmlrpc.XmlRpcException
Create a new continuous visual style for edges and apply it.

Parameters:
attrName - Name of the attribute to use for the mapping.
edgePropName - Name of the property to change.
attrValues - Values of the attribute to create the mapping with.
propValues - Values of the visual style property.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

createContinuousEdgeVisualStyle

public boolean createContinuousEdgeVisualStyle(java.lang.String attrName,
                                               java.lang.String edgePropName,
                                               java.util.List<java.lang.Object> attrValues,
                                               java.util.List<java.lang.Object> propValues,
                                               boolean redraw)
                                        throws org.apache.xmlrpc.XmlRpcException
Create a new continuous visual style for edges and apply it.

Parameters:
attrName - Name of the attribute to use for the mapping.
edgePropName - Name of the property to change.
attrValues - Values of the attribute to create the mapping with.
propValues - Values of the visual style property.
redraw -
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

createContinuousEdgeVisualStyle

public boolean createContinuousEdgeVisualStyle(java.lang.String attrName,
                                               java.lang.String edgePropName,
                                               double minValue,
                                               double midValue,
                                               double maxValue,
                                               double maxEdgeWidth)
                                        throws org.apache.xmlrpc.XmlRpcException
Deprecated. Use createContinuousMapper

Method to create a continuous edge visual style.

Parameters:
attrName - name of the attribute to use in the mapping.
edgePropName - visual property of the edges to change.
minValue - lower bound for mapping.
midValue - mind value for mapping.
maxValue - upper bound for mapping.
maxEdgeWidth - maximum edge width.
Returns:
True when the operation succeeds.
Throws:
org.apache.xmlrpc.XmlRpcException

createContinuousMapper

public boolean createContinuousMapper(java.lang.String styleName,
                                      java.lang.String attrName,
                                      java.lang.String propertyName,
                                      java.util.List<java.lang.Object> attrValues,
                                      java.util.List<java.lang.Object> propValues)
                               throws org.apache.xmlrpc.XmlRpcException
Create a continuous mapper

Parameters:
styleName - name of the style to change
attrName - name of the attribute to use
propertyName - name of the visual property to set
attrValues - attribute values used for interpolation
propValues - property values used for interpolation
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

createContinuousMapper

public boolean createContinuousMapper(java.lang.String styleName,
                                      java.lang.String attrName,
                                      java.lang.String propertyName,
                                      java.util.List<java.lang.Object> attrValues,
                                      java.util.List<java.lang.Object> propValues,
                                      boolean redraw)
                               throws org.apache.xmlrpc.XmlRpcException
Create a continuous mapper

Parameters:
styleName - name of the style to change
attrName - name of the attribute to use
propertyName - name of the visual property to set
attrValues - attribute values used for interpolation
propValues - property values used for interpolation
redraw -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setDefaultVizMapValue

public boolean setDefaultVizMapValue(java.lang.String styleName,
                                     java.lang.String visualPropertyName,
                                     java.lang.String value)
                              throws org.apache.xmlrpc.XmlRpcException
Set the default value for a visualProperty in one particular style.

Parameters:
styleName - name of the style to adjust.
visualPropertyName - name of the property.
value - default value of the property.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

redraw

public boolean redraw()
               throws org.apache.xmlrpc.XmlRpcException
Redraws the networkview of the current network.

Returns:
True when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException - when there is no current network.

redraw

public boolean redraw(java.lang.String networkID)
               throws org.apache.xmlrpc.XmlRpcException
Redraws a networkview.

Parameters:
networkID - the ID of the network that we be redrawn.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException - when there is no network with the provided ID.

setDiscreteNodeMapper

public boolean setDiscreteNodeMapper(java.lang.String networkID,
                                     java.lang.String styleName,
                                     java.lang.String styleProperty,
                                     java.lang.String paramName,
                                     java.util.Map<java.lang.String,java.lang.String> mapping)
                              throws org.apache.xmlrpc.XmlRpcException
Parameters:
networkID -
styleName -
styleProperty -
paramName -
mapping -
Returns:
True when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException

setDiscreteNodeMapper

public boolean setDiscreteNodeMapper(java.lang.String networkID,
                                     java.lang.String styleName,
                                     java.lang.String styleProperty,
                                     java.lang.String paramName,
                                     java.lang.String[] mappingKeys,
                                     java.lang.String[] mappingValues)
                              throws org.apache.xmlrpc.XmlRpcException
Parameters:
networkID -
styleName -
styleProperty -
paramName -
mappingKeys -
mappingValues -
Returns:
True when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException

discreteMapper

public boolean discreteMapper(java.lang.String networkID,
                              java.lang.String styleName,
                              java.lang.String attrName,
                              java.lang.String visualPropertyName,
                              java.lang.String defaultValue,
                              java.util.Map<java.lang.String,java.lang.String> mapping)
                       throws org.apache.xmlrpc.XmlRpcException
Deprecated. Use the createDiscreteMapper functions with the same parameters instead.

Create a discrete mapper based on the provided attributes.

Parameters:
networkID - ID of the network that the discrete mapper should work on.
styleName - Name of the style that should be adjusted.
attrName - Name of the attribute that should be used for the mapping.
visualPropertyName - Name of the property that should be changed.
defaultValue - Default value for the visual property.
mapping - mapping
Returns:
True when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException
See Also:
copyVisualStyle( java.lang.String, java.lang.String), createDiscreteMapper( java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

createDiscreteMapper

public boolean createDiscreteMapper(java.lang.String networkID,
                                    java.lang.String styleName,
                                    java.lang.String attrName,
                                    java.lang.String visualPropertyName,
                                    java.lang.String defaultValue,
                                    java.util.Map<java.lang.String,java.lang.String> mapping)
                             throws org.apache.xmlrpc.XmlRpcException
Deprecated. Use same function but without network parameter.

Create a discrete mapper based on the provided attributes.

Parameters:
networkID - ID of the network that the discrete mapper should work on.
styleName - Name of the style that should be adjusted.
attrName - Name of the attribute that should be used for the mapping.
visualPropertyName - Name of the property that should be changed.
defaultValue - Default value for the visual property.
mapping - mapping
Returns:
True when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException
See Also:
copyVisualStyle( java.lang.String, java.lang.String)

createDiscreteMapper

public boolean createDiscreteMapper(java.lang.String styleName,
                                    java.lang.String attrName,
                                    java.lang.String visualPropertyName,
                                    java.lang.String defaultValue,
                                    java.util.Map<java.lang.String,java.lang.String> mapping)
                             throws org.apache.xmlrpc.XmlRpcException
Create a discrete mapper based on the provided attributes.

Parameters:
styleName - Name of the style that should be adjusted.
attrName - Name of the attribute that should be used for the mapping.
visualPropertyName - Name of the property that should be changed.
defaultValue - Default value for the visual property.
mapping - mapping
Returns:
True when the operation succeeded.
Throws:
org.apache.xmlrpc.XmlRpcException
See Also:
copyVisualStyle( java.lang.String, java.lang.String)

discreteMapper

public boolean discreteMapper(java.lang.String networkID,
                              java.lang.String styleName,
                              java.lang.String attrName,
                              java.lang.String visualPropertyName,
                              java.lang.String defaultValue,
                              java.util.List values,
                              java.util.List props)
                       throws org.apache.xmlrpc.XmlRpcException
Deprecated. use the createDiscreteMapper function with the same parameters instead.

Alternative implementation of the discrete mapper method which overcomes the inability of XML-RPC to send numeric keys in maps. This method uses two arrays to specify the key-value pairs to set for the discrete mapper. WARNING: depricated, use the createDiscreteMapper function with the same parameters instead.

Parameters:
networkID - identifier of the network on which to apply the visual style.
styleName - name of the style to change.
attrName - name of the attribute to use for the mapping.
visualPropertyName - name of the visual property to change.
defaultValue - default value for the visual property.
values - List of input values for the mapping (so values of the attribute).
props - List of visual property values.
Returns:
True when the operation succeeds.
Throws:
org.apache.xmlrpc.XmlRpcException
See Also:
createDiscreteMapper(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)

createDiscreteMapper

public boolean createDiscreteMapper(java.lang.String styleName,
                                    java.lang.String attrName,
                                    java.lang.String visualPropertyName,
                                    java.lang.String defaultValue,
                                    java.util.List values,
                                    java.util.List props)
                             throws org.apache.xmlrpc.XmlRpcException
Alternative implementation of the discrete mapper method which overcomes the inability of XML-RPC to send numeric keys in maps. This method uses two arrays to specify the key-value pairs to set for the discrete mapper.

Parameters:
styleName - name of the style to change.
attrName - name of the attribute to use for the mapping.
visualPropertyName - name of the visual property to change.
defaultValue - default value for the visual property.
values - List of input values for the mapping (so values of the attribute).
props - List of visual property values.
Returns:
True when the operation succeeds.
Throws:
org.apache.xmlrpc.XmlRpcException

edgePassthroughMapper

public boolean edgePassthroughMapper(java.lang.String attrName,
                                     java.lang.String property,
                                     java.lang.String def)
                              throws org.apache.xmlrpc.XmlRpcException
Deprecated. Use the createPassthroughMapper instead.

Create a pass through mapper for edges.

Parameters:
attrName - name of the attribute to use.
property - name of the property to set.
def - Default value.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

nodePassthroughMapper

public boolean nodePassthroughMapper(java.lang.String attrName,
                                     java.lang.String property,
                                     java.lang.String def)
                              throws org.apache.xmlrpc.XmlRpcException
Deprecated. Use createPassthroughMapper instead.

Create a pass through mapper for nodes.

Parameters:
attrName - name of the attribute to use.
property - name of the property to set.
def - Default value.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

createPassthroughMapper

public boolean createPassthroughMapper(java.lang.String vizstyleName,
                                       java.lang.String attrName,
                                       java.lang.String property,
                                       java.lang.String def)
                                throws org.apache.xmlrpc.XmlRpcException
Create a passthrough mapper.

Parameters:
vizstyleName - name of the visual style to change
attrName - name of the attribute to use.
property - name of the property to set.
def - Default value
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

createPassthroughMapper

public boolean createPassthroughMapper(java.lang.String vizstyleName,
                                       java.lang.String attrName,
                                       java.lang.String property,
                                       java.lang.String def,
                                       boolean redraw)
                                throws org.apache.xmlrpc.XmlRpcException
Create a passthrough mapper.

Parameters:
vizstyleName - name of the visual style to change
attrName - name of the attribute to use.
property - name of the property to set.
def - Default value
redraw -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

createPassthroughMapper

public boolean createPassthroughMapper(java.lang.String attrName,
                                       java.lang.String property,
                                       java.lang.String def)
                                throws org.apache.xmlrpc.XmlRpcException
Create a passthrough mapper for the current visual style.

Parameters:
attrName - name of the attribute to use.
property - name of the property to set.
def - Default value
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

arrowMapper

public boolean arrowMapper()
Function to overwrite the arrow settings.

Returns:
True when the operation succeeded.

setNodeLabel

public boolean setNodeLabel(java.lang.String networkid,
                            java.lang.String attrName,
                            java.lang.Object defaultValue,
                            java.lang.String visualStyleName)
                     throws org.apache.xmlrpc.XmlRpcException
Parameters:
networkid -
attrName -
defaultValue -
visualStyleName -
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

getDefaultBackgroundColor

public java.lang.String getDefaultBackgroundColor(java.lang.String styleName)
                                           throws org.apache.xmlrpc.XmlRpcException
Parameters:
styleName -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setDefaultBackgroundColor

public boolean setDefaultBackgroundColor(java.lang.String styleName,
                                         java.lang.String color)
                                  throws org.apache.xmlrpc.XmlRpcException
Parameters:
styleName -
color -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getDefaultNodeSelectionColor

public java.lang.String getDefaultNodeSelectionColor(java.lang.String styleName)
                                              throws org.apache.xmlrpc.XmlRpcException
Parameters:
styleName -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setDefaultNodeSelectionColor

public boolean setDefaultNodeSelectionColor(java.lang.String styleName,
                                            java.lang.String color)
                                     throws org.apache.xmlrpc.XmlRpcException
Parameters:
styleName -
color -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getDefaultNodeReverseSelectionColor

public java.lang.String getDefaultNodeReverseSelectionColor(java.lang.String styleName)
                                                     throws org.apache.xmlrpc.XmlRpcException
Parameters:
styleName -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setDefaultNodeReverseSelectionColor

public boolean setDefaultNodeReverseSelectionColor(java.lang.String styleName,
                                                   java.lang.String color)
                                            throws org.apache.xmlrpc.XmlRpcException
Parameters:
styleName -
color -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getDefaultEdgeSelectionColor

public java.lang.String getDefaultEdgeSelectionColor(java.lang.String styleName)
                                              throws org.apache.xmlrpc.XmlRpcException
Parameters:
styleName -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setNodeSizeLocked

public boolean setNodeSizeLocked(java.lang.String styleName,
                                 boolean locked)
                          throws org.apache.xmlrpc.XmlRpcException
Indicated whether the width and the height of a node should be locked.

Parameters:
styleName - name of the style to change.
locked -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setDefaultEdgeSelectionColor

public boolean setDefaultEdgeSelectionColor(java.lang.String styleName,
                                            java.lang.String color)
                                     throws org.apache.xmlrpc.XmlRpcException
Parameters:
styleName -
color -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getDefaultEdgeReverseSelectionColor

public java.lang.String getDefaultEdgeReverseSelectionColor(java.lang.String styleName)
                                                     throws org.apache.xmlrpc.XmlRpcException
Parameters:
styleName -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setDefaultEdgeReverseSelectionColor

public boolean setDefaultEdgeReverseSelectionColor(java.lang.String styleName,
                                                   java.lang.String color)
                                            throws org.apache.xmlrpc.XmlRpcException
Parameters:
styleName -
color -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

exportView

public boolean exportView(java.lang.String location,
                          java.lang.String type,
                          java.lang.Double scale)
                   throws org.apache.xmlrpc.XmlRpcException
Export the current view to an image file.

Parameters:
location - Location where the file should be saved.
type - Type of image to save.
scale - Scale of the image.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

saveNetwork

public boolean saveNetwork(java.lang.String networkID,
                           java.lang.String filename)
                    throws org.apache.xmlrpc.XmlRpcException
Save a network to a GML file.

Parameters:
networkID - identifier of the network to save.
filename - location of the file to write to.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

saveSessionAsCys

public boolean saveSessionAsCys(java.lang.String filename)
                         throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

fitContent

public boolean fitContent(java.lang.String networkID)
                   throws org.apache.xmlrpc.XmlRpcException
Fit all the viewable elements onto this graph.

Parameters:
networkID - Identifier of the network.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

fitSelectedContent

public boolean fitSelectedContent(java.lang.String networkID)
                           throws org.apache.xmlrpc.XmlRpcException
Fit all the selected elements onto this graph.

Parameters:
networkID - Identifier of the network.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

getCenter

public java.util.List<java.lang.Double> getCenter(java.lang.String networkID)
                                           throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

setCenter

public boolean setCenter(java.lang.String networkID,
                         double x,
                         double y)
                  throws org.apache.xmlrpc.XmlRpcException
Set the center of a view.

Parameters:
networkID - Identifier of the network.
x - x-position
y - y-position
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getZoom

public double getZoom(java.lang.String networkID)
               throws org.apache.xmlrpc.XmlRpcException
Get the current zoom level of a networkview.

Parameters:
networkID -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setZoom

public boolean setZoom(java.lang.String networkID,
                       double zoom)
                throws org.apache.xmlrpc.XmlRpcException
Set the zoom level for a network.

Parameters:
networkID -
zoom -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

getViewCoordinates

public java.util.List<java.lang.Double> getViewCoordinates(java.lang.String networkID)
                                                    throws org.apache.xmlrpc.XmlRpcException
Parameters:
networkID -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

exportView

public boolean exportView(java.lang.String networkID,
                          java.lang.String location,
                          java.lang.String type,
                          java.lang.Double scale)
                   throws org.apache.xmlrpc.XmlRpcException
Export a network view to an image file.

Parameters:
networkID - ID of the network to export.
location - location where the file should be saved.
type - type of the file.
scale - Scale of the image.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

getNamespaceList

public java.util.List<java.lang.String> getNamespaceList()
Get all the namespaces available through the CyCommands api.

Returns:
A list of strings representing the namespaces.

getCommandList

public java.util.List<java.lang.String> getCommandList(java.lang.String namespace)
Get all the commands provided by a certain namespace.

Parameters:
namespace - name of the namespace.
Returns:
A list of strings representing the functions.

executeCommand

public java.util.Map<java.lang.String,java.lang.Object> executeCommand(java.lang.String namespace,
                                                                       java.lang.String command,
                                                                       java.util.Map arguments)
                                                                throws org.apache.xmlrpc.XmlRpcException
Execute one command from an external plugin.

Parameters:
namespace - namespace the command is in.
command - name of the command.
arguments - key value pairs for the arguments that the command takes.
Returns:
An object representing the output of the command.
Throws:
org.apache.xmlrpc.XmlRpcException

hidePanel

public boolean hidePanel(java.lang.String panelName)
                  throws org.apache.xmlrpc.XmlRpcException
Hide a panel in Cytoscape.

Parameters:
panelName - Name of the panel to hide.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

dockPanel

public boolean dockPanel(java.lang.String panelName)
                  throws org.apache.xmlrpc.XmlRpcException
Dock a panel to the Cytoscape main window.

Parameters:
panelName - Name of the panel to dock.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

floatPanel

public boolean floatPanel(java.lang.String panelName)
                   throws org.apache.xmlrpc.XmlRpcException
Make a currently attached panel float.

Parameters:
panelName - Name of the panel to float.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

clearStatusBarMessage

public boolean clearStatusBarMessage()
                              throws org.apache.xmlrpc.XmlRpcException
Clear the status bar message.

Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

setStatusBarMessage

public boolean setStatusBarMessage(java.lang.String msg)
                            throws org.apache.xmlrpc.XmlRpcException
Display a message in the Cytoscape status bar.

Parameters:
msg - Message to display.
Returns:
True
Throws:
org.apache.xmlrpc.XmlRpcException

setNodePosition

public boolean setNodePosition(java.lang.String networkID,
                               java.lang.String nodeID,
                               double x,
                               double y)
                        throws org.apache.xmlrpc.XmlRpcException
Set the position of a node (bypasses the layout algorithm).

Parameters:
networkID - ID of the network to change the position of the node in.
nodeID - Identifier of the node.
x - x-position
y - y-position
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

setNodesPositions

public boolean setNodesPositions(java.lang.String networkID,
                                 java.util.List<java.lang.String> nodeIDs,
                                 java.util.List<java.lang.Double> xpos,
                                 java.util.List<java.lang.Double> ypos)
                          throws org.apache.xmlrpc.XmlRpcException
Change the position of a number of nodes in a network.

Parameters:
networkID - ID of the network to change the position of nodes in.
nodeIDs - List of strings containing the node IDs.
xpos - List of doubles with the x positions.
ypos - List of doubles with the y positions.
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

resizeNetworkView

public boolean resizeNetworkView(java.lang.String networkID,
                                 int width,
                                 int height)
                          throws org.apache.xmlrpc.XmlRpcException
Resize a network view.

Parameters:
networkID - Identifier of the network.
width - new width
height - new height
Returns:
true
Throws:
org.apache.xmlrpc.XmlRpcException

raiseNetworkView

public boolean raiseNetworkView(java.lang.String networkID)
                         throws org.apache.xmlrpc.XmlRpcException
Raise a network view to the top of the Cytoscape window.

Parameters:
networkID - Identifier of the network to raise.
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setNetworkViewPosition

public boolean setNetworkViewPosition(java.lang.String networkID,
                                      int xpos,
                                      int ypos)
                               throws org.apache.xmlrpc.XmlRpcException
Set the position of a network view.

Parameters:
networkID - Identifier of the network.
xpos - x position
ypos - y position
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setToolTipInitialDelay

public boolean setToolTipInitialDelay(int initialDelay)
Set the time to wait before a tool tip appears.

Parameters:
initialDelay - time in milliseconds for the tool tip delay.
Returns:

setToolTipDismissDelay

public boolean setToolTipDismissDelay(int dismissDelay)
Set the time out for a tool tip to disappear.

Parameters:
dismissDelay - time in milliseconds that a tool tip is kept alive after the mouse pointer has moved off of the target.
Returns:

setRPCLogLevel

public boolean setRPCLogLevel(java.lang.String l)
                       throws org.apache.xmlrpc.XmlRpcException
Logger

Throws:
org.apache.xmlrpc.XmlRpcException

setNodeShapeRule

public boolean setNodeShapeRule(java.lang.String networkID,
                                java.lang.String attributeName,
                                java.lang.String defaultShape,
                                java.util.List<java.lang.String> attributeValues,
                                java.util.List<java.lang.String> shapes)
                         throws org.apache.xmlrpc.XmlRpcException
Parameters:
networkID -
attributeName -
defaultShape -
attributeValues -
shapes -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setEdgeLineStyleRule

public boolean setEdgeLineStyleRule(java.lang.String networkID,
                                    java.lang.String attributeName,
                                    java.lang.String defaultStyle,
                                    java.util.List<java.lang.String> attributeValues,
                                    java.util.List<java.lang.String> lineStyles)
                             throws org.apache.xmlrpc.XmlRpcException
Parameters:
networkID -
attributeName -
defaultStyle -
attributeValues -
lineStyles -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setEdgeTargetArrowRule

public boolean setEdgeTargetArrowRule(java.lang.String networkID,
                                      java.lang.String attributeName,
                                      java.lang.String defaultStyle,
                                      java.util.List<java.lang.String> attributeValues,
                                      java.util.List<java.lang.String> arrows)
                               throws org.apache.xmlrpc.XmlRpcException
Parameters:
networkID -
attributeName -
defaultStyle -
attributeValues -
arrows -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setEdgeSourceArrowRule

public boolean setEdgeSourceArrowRule(java.lang.String networkID,
                                      java.lang.String attributeName,
                                      java.lang.String defaultStyle,
                                      java.util.List<java.lang.String> attributeValues,
                                      java.util.List<java.lang.String> arrows)
                               throws org.apache.xmlrpc.XmlRpcException
Parameters:
networkID -
attributeName -
defaultStyle -
attributeValues -
arrows -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setContinuousEdgeColorRule

public boolean setContinuousEdgeColorRule(java.lang.String networkID,
                                          java.lang.String attributeName,
                                          java.lang.String minColor,
                                          java.lang.String midColor,
                                          java.lang.String maxColor,
                                          double minValue,
                                          double midValue,
                                          double maxValue)
                                   throws org.apache.xmlrpc.XmlRpcException
Parameters:
networkID -
attributeName -
minColor -
midColor -
maxColor -
minValue -
midValue -
maxValue -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

setEdgeColorRule

public boolean setEdgeColorRule(java.lang.String networkID,
                                java.lang.String attributeName,
                                java.lang.String defaultColor,
                                java.util.List<java.lang.String> attributeValues,
                                java.util.List<java.lang.String> colors)
                         throws org.apache.xmlrpc.XmlRpcException
Parameters:
networkID -
attributeName -
defaultColor -
attributeValues -
colors -
Returns:
Throws:
org.apache.xmlrpc.XmlRpcException

_rGetNodesPositions

public java.util.List<java.lang.String> _rGetNodesPositions(java.lang.String networkID,
                                                            java.util.List<java.lang.String> nodeIDs)
                                                     throws org.apache.xmlrpc.XmlRpcException
R function for getting node positions. The data needs to be transformed to strings because that works better in R. This is the default function which uses ';' to separate entries and ',' to separate coordinates.

Parameters:
networkID - identifier of the network to get the coordinates from.
nodeIDs - List of node identifiers.
Returns:
A list of strings representing the node locations.
Throws:
org.apache.xmlrpc.XmlRpcException

_rGetNodesPositions

public java.util.List<java.lang.String> _rGetNodesPositions(java.lang.String networkID,
                                                            java.util.List<java.lang.String> nodeIDs,
                                                            java.lang.String nodeNameDelim,
                                                            java.lang.String xyDelim)
                                                     throws org.apache.xmlrpc.XmlRpcException
R function for getting node positions. The data needs to be transformed to strings because that works better for R. With this function it's possible to specify the delimiters.

Parameters:
networkID - identifier of the network to get the coordinates from.
nodeIDs - List of node identifiers.
nodeNameDelim - delimiter to use between different entries.
xyDelim - Delimiter to use between coordinates.
Returns:
A list of strings representing the node locations.
Throws:
org.apache.xmlrpc.XmlRpcException

resetRootGraph

public boolean resetRootGraph()
Method for resetting the rootgraph.

Returns:
true

arraysToMap

protected static <A,B> java.util.HashMap<A,B> arraysToMap(A[] keys,
                                                          B[] values)
                                             throws org.apache.xmlrpc.XmlRpcException
Creates a hashmap out of a list of keys and a list of values

Throws:
org.apache.xmlrpc.XmlRpcException