|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcytoscape.data.readers.AbstractGraphReader
cytoscape.data.readers.GMLReader
public class GMLReader
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.
Field Summary | |
---|---|
protected static String |
ARROW
|
protected static String |
ARROW_BOTH
|
protected static String |
ARROW_FIRST
|
protected static String |
ARROW_LAST
|
protected static String |
ARROW_NONE
|
protected static String |
COMMENT
|
protected static String |
CREATOR
|
protected static String |
CURVED_LINES
|
protected static String |
DEFAULT_EDGE_INTERACTION
|
protected static String |
DIAMOND
|
protected static String |
EDGE
|
protected static String |
ELLIPSE
|
protected static String |
FILL
|
protected static String |
GRAPH
|
protected static String |
GRAPHICS
|
protected static String |
H
|
protected static String |
HEXAGON
|
protected static String |
ID
The following are all taken to be reserved keywords for gml (note that not all of them are actually keywords according to the spec) Currently, only keywords below are supported by the Visual Style generation methods. |
protected static String |
LABEL
|
protected static String |
LINE
|
protected static String |
NAME
|
protected static String |
NODE
|
protected static String |
OCTAGON
|
protected static String |
OUTLINE
|
protected static String |
OUTLINE_WIDTH
|
protected static String |
PARALELLOGRAM
|
protected static String |
POINT
|
protected static String |
RECTANGLE
|
protected static String |
ROOT_INDEX
|
protected static String |
SOURCE
|
protected static String |
SOURCE_ARROW
|
protected static String |
STRAIGHT_LINES
|
protected static String |
TARGET
|
protected static String |
TARGET_ARROW
|
protected static String |
TITLE
|
protected static String |
TRIANGLE
|
protected static String |
TYPE
|
protected static String |
VERSION
|
protected static String |
W
|
protected static String |
WIDTH
|
protected static String |
X
|
protected static String |
Y
|
protected static String |
YED_DELTA
|
protected static String |
YED_DIAMOND
|
protected static String |
YED_SHORT
|
protected static String |
YED_SOURCE_ARROW
|
protected static String |
YED_STANDARD
|
protected static String |
YED_TARGET_ARROW
|
protected static String |
YED_WHITE_DELTA
|
protected static String |
YED_WHITE_DIAMOND
|
Fields inherited from class cytoscape.data.readers.AbstractGraphReader |
---|
fileName, title |
Constructor Summary | |
---|---|
GMLReader(InputStream is,
String name)
Constructor. This is usually used for remote file loading. |
|
GMLReader(String filename)
Constructor. |
|
GMLReader(String filename,
TaskMonitor taskMonitor)
Constructor. |
Method Summary | |
---|---|
protected void |
createGraph()
This will create the graph model objects. |
void |
doPostProcessing(CyNetwork net)
DOCUMENT ME! |
void |
extract()
DOCUMENT ME! |
protected void |
extractEdge(List<KeyValue> list,
String edgeName)
|
protected void |
extractEdgeAttributes(List<KeyValue> list,
String edgeName)
|
protected void |
extractGraph(List list)
|
protected void |
extractNode(List list)
|
protected void |
extractNodeAttributes(List list,
String nodeName)
|
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. |
List<KeyValue> |
getList()
Returns a list containing the gml object tree |
int[] |
getNodeIndicesArray()
Part of interface contract |
protected void |
initializeStructures()
|
void |
layout(CyNetworkView myView)
layout the graph based on the GML values we read |
protected void |
layoutEdge(GraphView myView,
List list,
String edgeName)
Assign edge visual properties based on pairs in the list matched to the "edge" key world |
protected void |
layoutEdgeGraphics(GraphView myView,
List<KeyValue> list,
EdgeView edgeView)
Assign edge graphics properties |
protected void |
layoutEdgeGraphicsLine(GraphView myView,
List list,
EdgeView edgeView)
Assign bend points based on the contents of the list associated with a "Line" key We make sure that there is both an x,y present in the underlying point list before trying to generate a bend point |
protected void |
layoutGraph(GraphView myView,
List list)
Lays Out the Graph, based on GML. |
protected void |
layoutNode(GraphView myView,
List list)
Assign node properties based on the values in the list matched to the "node" key. |
protected void |
layoutNodeGraphics(GraphView myView,
List list,
NodeView nodeView)
This will assign node graphic properties based on the values in the list matches to the "graphics" key word |
void |
read()
Read GML file contents |
protected void |
readEdge(List<KeyValue> list)
This will extract the model information from the list which is matched to an "edge" key. |
protected void |
readGML(List<KeyValue> list)
This function takes the root level list which defines a gml objec tree |
protected void |
readGraph(List<KeyValue> list)
This function takes in a list which was given as the value to a "graph" key underneath the main gml list |
protected void |
releaseStructures()
|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String ID
protected static final String NAME
protected static final String LABEL
protected static final String COMMENT
protected static final String VERSION
protected static final String CREATOR
protected static final String TITLE
protected static final String GRAPH
protected static final String NODE
protected static final String EDGE
protected static final String GRAPHICS
protected static final String SOURCE
protected static final String TARGET
protected static final String X
protected static final String Y
protected static final String H
protected static final String W
protected static final String TYPE
protected static final String ROOT_INDEX
protected static final String RECTANGLE
protected static final String ELLIPSE
protected static final String LINE
protected static final String POINT
protected static final String DIAMOND
protected static final String HEXAGON
protected static final String OCTAGON
protected static final String PARALELLOGRAM
protected static final String TRIANGLE
protected static final String FILL
protected static final String WIDTH
protected static final String STRAIGHT_LINES
protected static final String CURVED_LINES
protected static final String SOURCE_ARROW
protected static final String TARGET_ARROW
protected static final String YED_SOURCE_ARROW
protected static final String YED_TARGET_ARROW
protected static final String YED_DELTA
protected static final String YED_STANDARD
protected static final String YED_DIAMOND
protected static final String YED_SHORT
protected static final String YED_WHITE_DELTA
protected static final String YED_WHITE_DIAMOND
protected static final String ARROW
protected static final String ARROW_NONE
protected static final String ARROW_FIRST
protected static final String ARROW_LAST
protected static final String ARROW_BOTH
protected static final String OUTLINE
protected static final String OUTLINE_WIDTH
protected static final String DEFAULT_EDGE_INTERACTION
Constructor Detail |
---|
public GMLReader(String filename)
filename
- File name.public GMLReader(InputStream is, String name)
is
- Input stream of GML file,public GMLReader(String filename, TaskMonitor taskMonitor)
filename
- File name.taskMonitor
- TaskMonitor Object.Method Detail |
---|
public void setTaskMonitor(TaskMonitor monitor)
setTaskMonitor
in class AbstractGraphReader
monitor
- the TaskMonitor to usepublic void read()
read
in interface GraphReader
read
in class AbstractGraphReader
public List<KeyValue> getList()
protected void initializeStructures()
protected void releaseStructures()
protected void createGraph()
protected void readGML(List<KeyValue> list)
protected void readGraph(List<KeyValue> list)
protected void readEdge(List<KeyValue> list)
public CyLayoutAlgorithm getLayoutAlgorithm()
getLayoutAlgorithm
in interface GraphReader
getLayoutAlgorithm
in class AbstractGraphReader
public void layout(CyNetworkView myView)
myView
- the view of the network we want to layoutpublic void extract()
protected void extractGraph(List list)
protected void extractNode(List list)
protected void extractEdge(List<KeyValue> list, String edgeName)
protected void layoutGraph(GraphView myView, List list)
protected void layoutNode(GraphView myView, List list)
protected void layoutNodeGraphics(GraphView myView, List list, NodeView nodeView)
protected void extractNodeAttributes(List list, String nodeName)
protected void extractEdgeAttributes(List<KeyValue> list, String edgeName)
public void showMaps()
protected void layoutEdge(GraphView myView, List list, String edgeName)
protected void layoutEdgeGraphics(GraphView myView, List<KeyValue> list, EdgeView edgeView)
protected void layoutEdgeGraphicsLine(GraphView myView, List list, EdgeView edgeView)
public int[] getNodeIndicesArray()
getNodeIndicesArray
in interface GraphReader
getNodeIndicesArray
in class AbstractGraphReader
public int[] getEdgeIndicesArray()
getEdgeIndicesArray
in interface GraphReader
getEdgeIndicesArray
in class AbstractGraphReader
public Color getColor(String colorString)
public void doPostProcessing(CyNetwork net)
doPostProcessing
in interface GraphReader
doPostProcessing
in class AbstractGraphReader
net
- DOCUMENT ME!
|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |