public static class TreeViz.BIFToGraphML
extends java.lang.Object
| Constructor and Description |
|---|
BIFToGraphML() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
convert(java.lang.String input)
Parses the incoming data and writes the generated output.
|
protected java.lang.String |
sanitize(java.lang.String s)
Replaces certain characters with their character entities.
|
protected void |
writeEdges(java.io.BufferedWriter writer,
weka.core.FastVector nodes,
weka.gui.graphvisualizer.GraphEdge edge)
Writes the edge as GraphML.
|
protected void |
writeFooter(java.io.BufferedWriter writer)
Writes the footer of the GraphML file.
|
protected void |
writeHeader(java.io.BufferedWriter writer)
Writes the header of the GraphML file.
|
protected void |
writeNodes(java.io.BufferedWriter writer,
weka.gui.graphvisualizer.GraphNode node)
Writes the node as GraphML.
|
protected java.lang.String sanitize(java.lang.String s)
s - the string to processprotected void writeHeader(java.io.BufferedWriter writer)
throws java.lang.Exception
writer - the writer to usejava.lang.Exception - if an error occursprotected void writeNodes(java.io.BufferedWriter writer,
weka.gui.graphvisualizer.GraphNode node)
throws java.lang.Exception
writer - the writer to usenode - the node to write as GraphMLjava.lang.Exception - if an error occursprotected void writeEdges(java.io.BufferedWriter writer,
weka.core.FastVector nodes,
weka.gui.graphvisualizer.GraphEdge edge)
throws java.lang.Exception
writer - the writer to usenodes - the nodesedge - the edge to writgejava.lang.Exception - if an error occursprotected void writeFooter(java.io.BufferedWriter writer)
throws java.lang.Exception
writer - the writer to usejava.lang.Exception - if an error occurspublic java.lang.String convert(java.lang.String input)
throws java.lang.Exception
input - the string read the BIF data fromjava.lang.Exception - if parsing or writing fails