Cytoscape 2.5.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)
          Creates a new XGMMLReader object.
 
Method Summary
 void doPostProcessing(CyNetwork network)
          DOCUMENT ME!
 Color getBackgroundColor()
          DOCUMENT ME!
 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 getGroupList()
          DOCUMENT ME!
 CyLayoutAlgorithm getLayoutAlgorithm()
          getLayoutAlgorithm is called to get the Layout Algorithm that will be used to layout the resulting graph.
 String getNetworkID()
          DOCUMENT ME!
 cytoscape.generated2.RdfRDF getNetworkMetadata()
          DOCUMENT ME!
 String getNetworkName()
          DOCUMENT ME!
 int[] getNodeIndicesArray()
          Part of interace contract
 void layout(CyNetworkView myView)
          layout the graph based on the graphic attributes
 void read()
          DOCUMENT ME!
 void setNetworkAttributes(CyNetwork cyNetwork)
          This should be called after other classes actually creates CyNetwork object.
 
Methods inherited from class cytoscape.data.readers.AbstractGraphReader
layout
 
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)
Creates a new XGMMLReader object.

Parameters:
fileName - DOCUMENT ME!
monitor - DOCUMENT ME!
Method Detail

read

public void read()
          throws IOException
DOCUMENT ME!

Specified by:
read in interface GraphReader
Specified by:
read in class AbstractGraphReader
Throws:
IOException - DOCUMENT ME!

getGroupList

public List getGroupList()
DOCUMENT ME!

Returns:
DOCUMENT ME!

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

getLayoutAlgorithm

public CyLayoutAlgorithm getLayoutAlgorithm()
getLayoutAlgorithm is called to get the Layout Algorithm that will be used to layout the resulting graph. In our case, we just return a stub that will call our internal layout routine, which will just use the default layout, but with our task monitor

Specified by:
getLayoutAlgorithm in interface GraphReader
Overrides:
getLayoutAlgorithm in class AbstractGraphReader
Returns:
the CyLayoutAlgorithm to use

layout

public void layout(CyNetworkView myView)
layout the graph based on the graphic attributes

Parameters:
myView - the view of the network we want to layout

getNodeIndicesArray

public int[] getNodeIndicesArray()
Part of interace contract

Specified by:
getNodeIndicesArray in interface GraphReader
Overrides:
getNodeIndicesArray in class AbstractGraphReader
Returns:
DOCUMENT ME!

getEdgeIndicesArray

public int[] getEdgeIndicesArray()
Part of interace contract

Specified by:
getEdgeIndicesArray in interface GraphReader
Overrides:
getEdgeIndicesArray in class AbstractGraphReader
Returns:
DOCUMENT ME!

getNetworkID

public String getNetworkID()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getNetworkName

public String getNetworkName()
Description copied from class: AbstractGraphReader
DOCUMENT ME!

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

getNetworkMetadata

public cytoscape.generated2.RdfRDF getNetworkMetadata()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getColor

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

Parameters:
colorString -
Returns:
Color object.

getBackgroundColor

public Color getBackgroundColor()
DOCUMENT ME!

Returns:
DOCUMENT ME!

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)
DOCUMENT ME!

Specified by:
doPostProcessing in interface GraphReader
Overrides:
doPostProcessing in class AbstractGraphReader
Parameters:
network - DOCUMENT ME!

www.cytoscape.org