cytoscape.data.writers
Class XGMMLWriter

java.lang.Object
  extended by cytoscape.data.writers.XGMMLWriter

public class XGMMLWriter
extends Object

Write network and attributes in a streme.

Author:
kono

Field Summary
static String BACKGROUND
           
protected static String BOOLEAN_TYPE
           
protected static String COMPLEX_TYPE
           
protected static String DIAMOND
           
protected static int EDGE
           
protected static String ELLIPSE
           
protected static String FLOAT_TYPE
           
static String GRAPH_VIEW_CENTER_X
           
static String GRAPH_VIEW_CENTER_Y
           
static String GRAPH_VIEW_ZOOM
           
protected static String HEXAGON
           
protected static String INT_TYPE
           
protected static String LINE
           
protected static String LIST_TYPE
           
protected static String MAP_TYPE
           
protected static String METANODE
           
protected static int NETWORK
           
protected static int NODE
           
protected static String NORMAL
           
protected static String OCTAGON
           
protected static String PARALELLOGRAM
           
protected static String POINT
           
protected static String RECTANGLE
           
protected static String REFERENCE
           
protected static String STRING_TYPE
           
protected static String TRIANGLE
           
 
Constructor Summary
XGMMLWriter(CyNetwork network, CyNetworkView view)
           
 
Method Summary
protected  void attributeWriter(int type, String id, Object target)
          Extract attributes and map it to JAXB object
protected  void expand(CyNode node, Node metanode, int[] childrenIndices)
           
protected  Graphics getGraphics(int type, Object target)
           
protected  String number2shape(int type)
           
protected  String paint2string(Paint p)
           
 void write(Writer writer)
          Write the XGMML file.
protected  void writeMetanode()
           
protected  void writeNetworkAttributes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

NORMAL

protected static String NORMAL

METANODE

protected static String METANODE

REFERENCE

protected static String REFERENCE

NODE

protected static int NODE

EDGE

protected static int EDGE

NETWORK

protected static int NETWORK

BACKGROUND

public static final String BACKGROUND
See Also:
Constant Field Values

GRAPH_VIEW_ZOOM

public static final String GRAPH_VIEW_ZOOM
See Also:
Constant Field Values

GRAPH_VIEW_CENTER_X

public static final String GRAPH_VIEW_CENTER_X
See Also:
Constant Field Values

GRAPH_VIEW_CENTER_Y

public static final String GRAPH_VIEW_CENTER_Y
See Also:
Constant Field Values

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

XGMMLWriter

public XGMMLWriter(CyNetwork network,
                   CyNetworkView view)
Method Detail

write

public void write(Writer writer)
           throws javax.xml.bind.JAXBException,
                  IOException
Write the XGMML file.

Parameters:
writer - :Witer to create XGMML file
Throws:
javax.xml.bind.JAXBException
IOException

writeNetworkAttributes

protected void writeNetworkAttributes()
                               throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

writeMetanode

protected void writeMetanode()

attributeWriter

protected void attributeWriter(int type,
                               String id,
                               Object target)
                        throws javax.xml.bind.JAXBException
Extract attributes and map it to JAXB object

Parameters:
type - - type of attribute (node, edge, network)
id - - id of node, edge, network (key into CyAttributes)
target - - jaxb object
Throws:
javax.xml.bind.JAXBException

getGraphics

protected Graphics getGraphics(int type,
                               Object target)
                        throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

expand

protected void expand(CyNode node,
                      Node metanode,
                      int[] childrenIndices)
               throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

number2shape

protected String number2shape(int type)

paint2string

protected String paint2string(Paint p)