|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcytoscape.data.readers.GMLReader2
public class GMLReader2
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 |
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
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 |
GRAPHICS
|
protected static String |
H
|
protected static String |
HEXAGON
|
protected static String |
ID
|
protected static String |
LABEL
|
protected static String |
LINE
|
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 |
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
|
Constructor Summary | |
---|---|
GMLReader2(String filename)
Constructor. |
|
GMLReader2(String filename,
cytoscape.task.TaskMonitor taskMonitor)
Constructor. |
Method Summary | |
---|---|
void |
applyMaps(String mapSuffix,
String VSName)
|
protected void |
createGraph()
This will create the graph model objects. |
void |
extract()
|
protected void |
extractEdge(List list,
String edgeName)
|
protected void |
extractEdgeAttributes(List 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 |
CyAttributes |
getEdgeAttributes()
|
int[] |
getEdgeIndicesArray()
Part of interace contract |
static LineType |
getLineType(int width)
|
List |
getList()
Returns a list containing the gml object tree |
CyAttributes |
getNodeAttributes()
|
int[] |
getNodeIndicesArray()
Part of interface contract |
giny.model.RootGraph |
getRootGraph()
|
protected void |
initializeStructures()
|
void |
layout(giny.view.GraphView myView)
|
protected void |
layoutEdge(giny.view.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(giny.view.GraphView myView,
List list,
giny.view.EdgeView edgeView)
Assign edge graphics properties |
protected void |
layoutEdgeGraphicsLine(giny.view.GraphView myView,
List list,
giny.view.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(giny.view.GraphView myView,
List list)
Lays Out the Graph, based on GML. |
protected void |
layoutNode(giny.view.GraphView myView,
List list)
Assign node properties based on the values in the list matched to the "node" key. |
protected void |
layoutNodeGraphics(giny.view.GraphView myView,
List list,
giny.view.NodeView nodeView)
This will assign node graphic properties based on the values in the list matches to the "graphics" key word |
void |
read()
|
void |
read(boolean canonicalize)
|
protected void |
readEdge(List list)
This will extract the model information from the list which is matched to an "edge" key. |
protected void |
readGML(List list)
This function takes the root level list which defines a gml objec tree |
protected void |
readGraph(List list)
This function takes in a list which was given as the value to a "graph" key underneath the main gml list |
protected void |
readNode(List list)
This will extract the model information from the list which is matched a "node" key |
protected void |
releaseStructures()
|
void |
setEdgeMaps(VisualMappingManager vizmapper)
|
void |
setNodeMaps(VisualMappingManager vizmapper)
|
void |
showMaps()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static String GRAPH
protected static String NODE
protected static String EDGE
protected static String GRAPHICS
protected static String LABEL
protected static String SOURCE
protected static String TARGET
protected static String X
protected static String Y
protected static String H
protected static String W
protected static String TYPE
protected static String ID
protected static String ROOT_INDEX
protected static String RECTANGLE
protected static String ELLIPSE
protected static String LINE
protected static String POINT
protected static String DIAMOND
protected static String HEXAGON
protected static String OCTAGON
protected static String PARALELLOGRAM
protected static String TRIANGLE
protected static String FILL
protected static String WIDTH
protected static String STRAIGHT_LINES
protected static String CURVED_LINES
protected static String SOURCE_ARROW
protected static String TARGET_ARROW
protected static String ARROW
protected static String ARROW_NONE
protected static String ARROW_FIRST
protected static String ARROW_LAST
protected static String ARROW_BOTH
protected static String OUTLINE
protected static String OUTLINE_WIDTH
protected static String DEFAULT_EDGE_INTERACTION
protected static String VERSION
protected static String CREATOR
Constructor Detail |
---|
public GMLReader2(String filename)
filename
- File name.public GMLReader2(String filename, cytoscape.task.TaskMonitor taskMonitor)
filename
- File name.taskMonitor
- TaskMonitor Object.Method Detail |
---|
public void setNodeMaps(VisualMappingManager vizmapper)
public void setEdgeMaps(VisualMappingManager vizmapper)
public void applyMaps(String mapSuffix, String VSName)
public void read(boolean canonicalize)
read
in interface GraphReader
public void read()
read
in interface GraphReader
public List getList()
protected void initializeStructures()
protected void releaseStructures()
protected void createGraph()
protected void readGML(List list)
protected void readGraph(List list)
protected void readNode(List list)
protected void readEdge(List list)
public void layout(giny.view.GraphView myView)
layout
in interface GraphReader
public void extract()
protected void extractGraph(List list)
protected void extractNode(List list)
protected void extractEdge(List list, String edgeName)
protected void layoutGraph(giny.view.GraphView myView, List list)
protected void layoutNode(giny.view.GraphView myView, List list)
protected void layoutNodeGraphics(giny.view.GraphView myView, List list, giny.view.NodeView nodeView)
protected void extractNodeAttributes(List list, String nodeName)
protected void extractEdgeAttributes(List list, String edgeName)
public static LineType getLineType(int width)
public void showMaps()
protected void layoutEdge(giny.view.GraphView myView, List list, String edgeName)
protected void layoutEdgeGraphics(giny.view.GraphView myView, List list, giny.view.EdgeView edgeView)
protected void layoutEdgeGraphicsLine(giny.view.GraphView myView, List list, giny.view.EdgeView edgeView)
public int[] getNodeIndicesArray()
getNodeIndicesArray
in interface GraphReader
public int[] getEdgeIndicesArray()
getEdgeIndicesArray
in interface GraphReader
public giny.model.RootGraph getRootGraph()
getRootGraph
in interface GraphReader
public CyAttributes getNodeAttributes()
getNodeAttributes
in interface GraphReader
public CyAttributes getEdgeAttributes()
getEdgeAttributes
in interface GraphReader
public Color getColor(String colorString)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |