Cytoscape 2.4.1 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.data.readers
Class XGMMLReader

java.lang.Object
  extended by cytoscape.data.readers.AbstractGraphReader
      extended by cytoscape.data.readers.XGMMLReader
All Implemented Interfaces:
GraphReader

public class XGMMLReader
extends AbstractGraphReader

XGMML file reader.
This version is Metanode-compatible.

Since:
Cytoscape 2.3
Version:
1.0
Author:
kono
See Also:
XGMMLWriter

Constructor Summary
XGMMLReader(InputStream is)
          Constructor.
XGMMLReader(String fileName)
          Constructor.
XGMMLReader(String fileName, cytoscape.task.TaskMonitor monitor)
           
 
Method Summary
 void doPostProcessing(CyNetwork network)
          Executes post-processing: no-op.
 Color getBackgroundColor()
           
 Color getColor(String colorString)
          Convert a valid string into Color object.
 int[] getEdgeIndicesArray()
          Part of interace contract
 Point2D getGraphViewCenter()
          Returns the graph view center.
 Double getGraphViewZoomLevel()
          Returns the zoom level read from the the xgmml file.
 List getMetanodeList()
           
 String getNetworkID()
           
 cytoscape.generated2.RdfRDF getNetworkMetadata()
           
 String getNetworkName()
          Gets the name of the network.
 int[] getNodeIndicesArray()
          Part of interace contract
 void layout(GraphView myView)
          Based on the graphic attributes, layout the graph.
 void read()
          Reads/imports the graph.
 void setNetworkAttributes(CyNetwork cyNetwork)
          This should be called after other classes actually creates CyNetwork object.
 
Methods inherited from class cytoscape.data.readers.AbstractGraphReader
getEdgeAttributes, getNodeAttributes, getRootGraph, read
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XGMMLReader

public XGMMLReader(String fileName)
Constructor.
This is for local XGMML file.

Parameters:
fileName - File name of local XGMML file.
Throws:
FileNotFoundException

XGMMLReader

public XGMMLReader(InputStream is)
Constructor.
This is usually used for remote file loading.

Parameters:
is - Input stream of XGMML file,

XGMMLReader

public XGMMLReader(String fileName,
                   cytoscape.task.TaskMonitor monitor)
Method Detail

read

public void read()
          throws IOException
Description copied from interface: GraphReader
Reads/imports the graph.

Specified by:
read in interface GraphReader
Specified by:
read in class AbstractGraphReader
Throws:
IOException - IO Errors.

getMetanodeList

public List getMetanodeList()

getGraphViewZoomLevel

public Double getGraphViewZoomLevel()
Returns the zoom level read from the the xgmml file.

Returns:
Double

getGraphViewCenter

public Point2D getGraphViewCenter()
Returns the graph view center.

Returns:
Double

layout

public void layout(GraphView myView)
Based on the graphic attributes, layout the graph.

Specified by:
layout in interface GraphReader
Overrides:
layout in class AbstractGraphReader
Parameters:
myView - GINY's graph view object.

getNodeIndicesArray

public int[] getNodeIndicesArray()
Part of interace contract

Specified by:
getNodeIndicesArray in interface GraphReader
Overrides:
getNodeIndicesArray in class AbstractGraphReader
Returns:
array of node indices from the root graph.

getEdgeIndicesArray

public int[] getEdgeIndicesArray()
Part of interace contract

Specified by:
getEdgeIndicesArray in interface GraphReader
Overrides:
getEdgeIndicesArray in class AbstractGraphReader
Returns:
array of edges indices from the root graph.

getNetworkID

public String getNetworkID()

getNetworkName

public String getNetworkName()
Description copied from interface: GraphReader
Gets the name of the network.

Specified by:
getNetworkName in interface GraphReader
Overrides:
getNetworkName in class AbstractGraphReader
Returns:
Returns the networkName.

getNetworkMetadata

public cytoscape.generated2.RdfRDF getNetworkMetadata()

getColor

public Color getColor(String colorString)
Convert a valid string into Color object.

Parameters:
colorString -
Returns:
Color object.

getBackgroundColor

public Color getBackgroundColor()

setNetworkAttributes

public void setNetworkAttributes(CyNetwork cyNetwork)
This should be called after other classes actually creates CyNetwork object. Otherwise, Network ID mismatch problem occures between CyNetwork object and Network CyAttributes!

Parameters:
cyNetwork - CyNetwork object for the loaded network.

doPostProcessing

public void doPostProcessing(CyNetwork network)
Description copied from class: AbstractGraphReader
Executes post-processing: no-op.

Specified by:
doPostProcessing in interface GraphReader
Overrides:
doPostProcessing in class AbstractGraphReader

www.cytoscape.org