Cytoscape 2.8.0 API

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

Field Summary
protected static String BOX
           
protected static String CIRCLE
           
protected static String CY_NAMESPACE
           
protected static String DIAMOND
           
protected static String EDGE
           
protected static String ELLIPSE
           
protected static String GRAPH
           
protected static String GRAPHICS
           
protected static String HELLIPSIS
           
protected static String HEXAGON
           
protected static String LABEL
           
protected static String LINE
           
protected static String NODE
           
protected static String OCTAGON
           
protected static String PARALELLOGRAM
           
protected static String PENTAGON
           
protected static String POINT
           
protected static String RECTANGLE
           
protected static String RHOMBUS
           
protected static String ROUNDED_RECTANGLE
           
protected static String SOURCE
           
protected static String TARGET
           
protected static String TRIANGLE
           
protected static String VEE
           
protected static String VELLIPSIS
           
 
Fields inherited from class cytoscape.data.readers.AbstractGraphReader
fileName, title
 
Constructor Summary
XGMMLReader(InputStream is)
          Constructor.
This is usually used for remote file loading.
XGMMLReader(InputStream is, String name)
          Constructor.
This is usually used for remote file loading.
XGMMLReader(String fileName)
          Constructor.
This is for local XGMML file.
XGMMLReader(String fileName, TaskMonitor monitor)
          Creates a new XGMMLReader object.
 
Method Summary
 void doPostProcessing(CyNetwork network)
          This method does all of our postprocessing after reading and parsing the file
 int[] getEdgeIndicesArray()
          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!
 String getNetworkName()
          DOCUMENT ME!
 int[] getNodeIndicesArray()
          DOCUMENT ME!
 void read()
          DOCUMENT ME!
 void setTaskMonitor(TaskMonitor monitor)
          Sets the task monitor we want to use
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GRAPH

protected static final String GRAPH
See Also:
Constant Field Values

NODE

protected static final String NODE
See Also:
Constant Field Values

EDGE

protected static final String EDGE
See Also:
Constant Field Values

GRAPHICS

protected static final String GRAPHICS
See Also:
Constant Field Values

LABEL

protected static final String LABEL
See Also:
Constant Field Values

SOURCE

protected static final String SOURCE
See Also:
Constant Field Values

TARGET

protected static final String TARGET
See Also:
Constant Field Values

RECTANGLE

protected static final String RECTANGLE
See Also:
Constant Field Values

ELLIPSE

protected static final String ELLIPSE
See Also:
Constant Field Values

LINE

protected static final String LINE
See Also:
Constant Field Values

POINT

protected static final String POINT
See Also:
Constant Field Values

DIAMOND

protected static final String DIAMOND
See Also:
Constant Field Values

HEXAGON

protected static final String HEXAGON
See Also:
Constant Field Values

OCTAGON

protected static final String OCTAGON
See Also:
Constant Field Values

PARALELLOGRAM

protected static final String PARALELLOGRAM
See Also:
Constant Field Values

TRIANGLE

protected static final String TRIANGLE
See Also:
Constant Field Values

VEE

protected static final String VEE
See Also:
Constant Field Values

ROUNDED_RECTANGLE

protected static final String ROUNDED_RECTANGLE
See Also:
Constant Field Values

BOX

protected static final String BOX
See Also:
Constant Field Values

CIRCLE

protected static final String CIRCLE
See Also:
Constant Field Values

VELLIPSIS

protected static final String VELLIPSIS
See Also:
Constant Field Values

HELLIPSIS

protected static final String HELLIPSIS
See Also:
Constant Field Values

RHOMBUS

protected static final String RHOMBUS
See Also:
Constant Field Values

PENTAGON

protected static final String PENTAGON
See Also:
Constant Field Values

CY_NAMESPACE

protected static final String CY_NAMESPACE
See Also:
Constant Field Values
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(InputStream is,
                   String name)
Constructor.
This is usually used for remote file loading.

Parameters:
is - Input stream of XGMML file,

XGMMLReader

public XGMMLReader(String fileName,
                   TaskMonitor monitor)
Creates a new XGMMLReader object.

Parameters:
fileName - DOCUMENT ME!
monitor - DOCUMENT ME!
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

read

public void read()
          throws IOException
DOCUMENT ME!

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

getNodeIndicesArray

public int[] getNodeIndicesArray()
Description copied from class: AbstractGraphReader
DOCUMENT ME!

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

getEdgeIndicesArray

public int[] getEdgeIndicesArray()
Description copied from class: AbstractGraphReader
DOCUMENT ME!

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.

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

doPostProcessing

public void doPostProcessing(CyNetwork network)
This method does all of our postprocessing after reading and parsing the file

Specified by:
doPostProcessing in interface GraphReader
Overrides:
doPostProcessing in class AbstractGraphReader
Parameters:
network - the network we've read in

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.