cytoscape.data.readers
Class XGMMLReader

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

public class XGMMLReader
extends Object
implements GraphReader

XGMMLReader. This version is Metanode-compatible.

Author:
kono

Field Summary
protected static String BOOLEAN_TYPE
           
protected static String COMPLEX_TYPE
           
protected static String DIAMOND
           
protected static String EDGE
           
protected static String ELLIPSE
           
protected static String FLOAT_TYPE
           
protected static String GRAPH
           
protected static String GRAPHICS
           
protected static String HEXAGON
           
protected static String INT_TYPE
           
protected static String LABEL
           
protected static String LINE
           
protected static String LIST_TYPE
           
protected static String MAP_TYPE
           
protected static String NODE
           
protected static String OCTAGON
           
protected static String PARALELLOGRAM
           
protected static String POINT
           
protected static String RECTANGLE
           
protected static String SOURCE
           
protected static String STRING_TYPE
           
protected static String TARGET
           
protected static String TRIANGLE
           
 
Constructor Summary
XGMMLReader(InputStream is)
           
XGMMLReader(InputStream is, List view)
           
XGMMLReader(String fileName)
           
 
Method Summary
protected  void createGraph(Graph network)
          Create graph directly from JAXB objects
 Color getBackgroundColor()
           
 Color getColor(String colorString)
           
 CyAttributes getEdgeAttributes()
           
 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()
           
 RdfRDF getNetworkMetadata()
           
 String getNetworkName()
           
 CyAttributes getNodeAttributes()
           
 int[] getNodeIndicesArray()
          Part of interface contract
 giny.model.RootGraph getRootGraph()
           
 void layout(giny.view.GraphView myView)
          Based on the graphic attribute, layout the graph.
protected  void layoutEdge(giny.view.GraphView myView)
           
protected  void layoutEdgeGraphics(giny.view.GraphView myView, Graphics graphics, giny.view.EdgeView edgeView)
           
protected  void layoutNode(giny.view.GraphView myView)
          Layout nodes
protected  void layoutNodeGraphics(giny.view.GraphView myView, Graphics graphics, giny.view.NodeView nodeView)
           
 void read()
           
 void read(boolean canonicalizeNodeNames)
           
protected  void readAttributes()
           
protected  void readEdge()
           
 void readIndex()
           
protected  void readNode()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GRAPH

protected static String GRAPH

NODE

protected static String NODE

EDGE

protected static String EDGE

GRAPHICS

protected static String GRAPHICS

LABEL

protected static String LABEL

SOURCE

protected static String SOURCE

TARGET

protected static String TARGET

RECTANGLE

protected static String RECTANGLE

ELLIPSE

protected static String ELLIPSE

LINE

protected static String LINE

POINT

protected static String POINT

DIAMOND

protected static String DIAMOND

HEXAGON

protected static String HEXAGON

OCTAGON

protected static String OCTAGON

PARALELLOGRAM

protected static String PARALELLOGRAM

TRIANGLE

protected static String TRIANGLE

FLOAT_TYPE

protected static final String FLOAT_TYPE
See Also:
Constant Field Values

INT_TYPE

protected static final String INT_TYPE
See Also:
Constant Field Values

STRING_TYPE

protected static final String STRING_TYPE
See Also:
Constant Field Values

LIST_TYPE

protected static final String LIST_TYPE
See Also:
Constant Field Values

BOOLEAN_TYPE

protected static final String BOOLEAN_TYPE
See Also:
Constant Field Values

MAP_TYPE

protected static final String MAP_TYPE
See Also:
Constant Field Values

COMPLEX_TYPE

protected static final String COMPLEX_TYPE
See Also:
Constant Field Values
Constructor Detail

XGMMLReader

public XGMMLReader(String fileName)

XGMMLReader

public XGMMLReader(InputStream is)

XGMMLReader

public XGMMLReader(InputStream is,
                   List view)
Method Detail

readIndex

public void readIndex()
               throws javax.xml.bind.JAXBException,
                      FileNotFoundException
Throws:
javax.xml.bind.JAXBException
FileNotFoundException

read

public void read()
          throws IOException
Specified by:
read in interface GraphReader
Throws:
IOException

createGraph

protected void createGraph(Graph network)
Create graph directly from JAXB objects

Parameters:
network -

getMetanodeList

public List getMetanodeList()

readAttributes

protected void readAttributes()

readNode

protected void readNode()

readEdge

protected void readEdge()

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(giny.view.GraphView myView)
Based on the graphic attribute, layout the graph.

Specified by:
layout in interface GraphReader
Parameters:
myView -

layoutNode

protected void layoutNode(giny.view.GraphView myView)
Layout nodes


layoutNodeGraphics

protected void layoutNodeGraphics(giny.view.GraphView myView,
                                  Graphics graphics,
                                  giny.view.NodeView nodeView)

layoutEdge

protected void layoutEdge(giny.view.GraphView myView)

layoutEdgeGraphics

protected void layoutEdgeGraphics(giny.view.GraphView myView,
                                  Graphics graphics,
                                  giny.view.EdgeView edgeView)

getNodeIndicesArray

public int[] getNodeIndicesArray()
Part of interface contract

Specified by:
getNodeIndicesArray in interface GraphReader

getEdgeIndicesArray

public int[] getEdgeIndicesArray()
Part of interace contract

Specified by:
getEdgeIndicesArray in interface GraphReader

getNetworkID

public String getNetworkID()

getNetworkName

public String getNetworkName()

getNetworkMetadata

public RdfRDF getNetworkMetadata()

getColor

public Color getColor(String colorString)

getBackgroundColor

public Color getBackgroundColor()

read

public void read(boolean canonicalizeNodeNames)
          throws IOException
Specified by:
read in interface GraphReader
Throws:
IOException

getRootGraph

public giny.model.RootGraph getRootGraph()
Specified by:
getRootGraph in interface GraphReader

getNodeAttributes

public CyAttributes getNodeAttributes()
Specified by:
getNodeAttributes in interface GraphReader

getEdgeAttributes

public CyAttributes getEdgeAttributes()
Specified by:
getEdgeAttributes in interface GraphReader