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

cytoscape.data.readers
Class GMLReader

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

public class GMLReader
extends AbstractGraphReader

This class is responsible for converting a gml object tree into cytoscape objects New features to the current version: 1. Small bug fixes. 2. Translate all features in the GML file. This includes 3. New Visual Style will be generated when you call this class. The new style saves all visual features (like node shape) and will not be lost even after other style selected.


Constructor Summary
GMLReader(InputStream is, String name)
          Constructor.
GMLReader(String filename)
          Constructor.
GMLReader(String filename, TaskMonitor taskMonitor)
          Constructor.
 
Method Summary
 void applyMaps(String mapSuffix, String VSName)
          Deprecated. Don't use this. Gone 2/2009.
 void doPostProcessing(CyNetwork net)
          DOCUMENT ME!
 void extract()
          DOCUMENT ME!
 Color getColor(String colorString)
          Create a color object from the string like it is stored in a gml file
 int[] getEdgeIndicesArray()
          Part of interace contract
 CyLayoutAlgorithm getLayoutAlgorithm()
          getLayoutAlgorithm is called to get the Layout Algorithm that will be used to layout the resulting graph.
static LineType getLineType(int width)
          Deprecated. Don't use this. Set the line width directly. Gone 5/2008.
 List getList()
          Returns a list containing the gml object tree
 int[] getNodeIndicesArray()
          Part of interface contract
 void layout(CyNetworkView myView)
          layout the graph based on the GML values we read
 void read()
          DOCUMENT ME!
 void setEdgeMaps(VisualMappingManager vizmapper)
          Deprecated. Don't use this. Gone 2/2009.
 void setNodeMaps(VisualMappingManager vizmapper)
          Deprecated. Don't use this. Gone 2/2009.
 void setTaskMonitor(TaskMonitor monitor)
          Sets the task monitor we want to use
 void showMaps()
          DOCUMENT ME!
 
Methods inherited from class cytoscape.data.readers.AbstractGraphReader
getNetworkName, layout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GMLReader

public GMLReader(String filename)
Constructor.

Parameters:
filename - File name.

GMLReader

public GMLReader(InputStream is,
                 String name)
Constructor.
This is usually used for remote file loading.

Parameters:
is - Input stream of GML file,

GMLReader

public GMLReader(String filename,
                 TaskMonitor taskMonitor)
Constructor.

Parameters:
filename - File name.
taskMonitor - TaskMonitor Object.
Method Detail

setTaskMonitor

public void setTaskMonitor(TaskMonitor monitor)
Sets the task monitor we want to use

Overrides:
setTaskMonitor in class AbstractGraphReader
Parameters:
monitor - the TaskMonitor to use

setNodeMaps

@Deprecated
public void setNodeMaps(VisualMappingManager vizmapper)
Deprecated. Don't use this. Gone 2/2009.

DOCUMENT ME!

Parameters:
vizmapper - DOCUMENT ME!

setEdgeMaps

@Deprecated
public void setEdgeMaps(VisualMappingManager vizmapper)
Deprecated. Don't use this. Gone 2/2009.

DOCUMENT ME!

Parameters:
vizmapper - DOCUMENT ME!

applyMaps

@Deprecated
public void applyMaps(String mapSuffix,
                                 String VSName)
Deprecated. Don't use this. Gone 2/2009.

DOCUMENT ME!

Parameters:
mapSuffix - DOCUMENT ME!
VSName - DOCUMENT ME!

read

public void read()
DOCUMENT ME!

Specified by:
read in interface GraphReader
Specified by:
read in class AbstractGraphReader

getList

public List getList()
Returns a list containing the gml object tree


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 GML values we read

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

extract

public void extract()
DOCUMENT ME!


getLineType

@Deprecated
public static LineType getLineType(int width)
Deprecated. Don't use this. Set the line width directly. Gone 5/2008.


showMaps

public void showMaps()
DOCUMENT ME!


getNodeIndicesArray

public int[] getNodeIndicesArray()
Part of interface 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!

getColor

public Color getColor(String colorString)
Create a color object from the string like it is stored in a gml file


doPostProcessing

public void doPostProcessing(CyNetwork net)
DOCUMENT ME!

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

www.cytoscape.org