Class NewDottyToTree
- java.lang.Object
-
- org.processmining.prediction.newPrefuseTreeVis.NewDottyToTree
-
public class NewDottyToTree extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NewDottyToTree()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringcheckTime(int nrDecimals, PredictionType classType, java.lang.String label)Check is value is in highest possible time formatjava.lang.Stringconvert(java.lang.String dotty, PredictionType classType, java.util.HashMap<java.lang.String,PredictionType> predictionTypes, VisConfigurables config)Parses the incoming data and writes the generated output.protected java.lang.StringconvertTime(java.lang.String time, int nrDecimals, PredictionType classType)protected java.lang.Stringsanitize(java.lang.String s)Replaces certain characters with their character entities.protected voidwriteEdge(java.io.BufferedWriter writer, weka.gui.treevisualizer.Edge edge, PredictionType classType, java.util.HashMap<java.lang.String,PredictionType> predictionTypes, VisConfigurables config)Writes the edge as GraphML.protected voidwriteFooter(java.io.BufferedWriter writer)Writes the footer of the GraphML file.protected voidwriteHeader(java.io.BufferedWriter writer)Writes the header of the GraphML file.protected voidwriteNode(java.io.BufferedWriter writer, weka.gui.treevisualizer.Node node, PredictionType classType, java.util.HashMap<java.lang.String,PredictionType> predictionTypes, VisConfigurables config)Writes the node as GraphML.
-
-
-
Method Detail
-
sanitize
protected java.lang.String sanitize(java.lang.String s)
Replaces certain characters with their character entities.- Parameters:
s- the string to process- Returns:
- the processed string
-
convertTime
protected java.lang.String convertTime(java.lang.String time, int nrDecimals, PredictionType classType)
-
checkTime
protected java.lang.String checkTime(int nrDecimals, PredictionType classType, java.lang.String label)Check is value is in highest possible time format- Parameters:
b-nrDecimals-classType-s- the string to process- Returns:
- the processed string
-
writeHeader
protected void writeHeader(java.io.BufferedWriter writer) throws java.lang.ExceptionWrites the header of the GraphML file.- Parameters:
writer- the writer to use- Throws:
java.lang.Exception- if an error occurs
-
writeNode
protected void writeNode(java.io.BufferedWriter writer, weka.gui.treevisualizer.Node node, PredictionType classType, java.util.HashMap<java.lang.String,PredictionType> predictionTypes, VisConfigurables config) throws java.lang.ExceptionWrites the node as GraphML.- Parameters:
writer- the writer to usenode- the node to write as GraphMLclassType-predictionTypes-config-nrDecimals-nullLeaves-- Throws:
java.lang.Exception- if an error occurs
-
writeEdge
protected void writeEdge(java.io.BufferedWriter writer, weka.gui.treevisualizer.Edge edge, PredictionType classType, java.util.HashMap<java.lang.String,PredictionType> predictionTypes, VisConfigurables config) throws java.lang.ExceptionWrites the edge as GraphML. Since prefuse doesn't seem to offer edge labels, the edges get inserted as nodes as well.- Parameters:
writer- the writer to useedge- the edge to writeclassType-predictionTypes-config-- Throws:
java.lang.Exception- if an error occurs
-
writeFooter
protected void writeFooter(java.io.BufferedWriter writer) throws java.lang.ExceptionWrites the footer of the GraphML file.- Parameters:
writer- the writer to use- Throws:
java.lang.Exception- if an error occurs
-
convert
public java.lang.String convert(java.lang.String dotty, PredictionType classType, java.util.HashMap<java.lang.String,PredictionType> predictionTypes, VisConfigurables config) throws java.lang.ExceptionParses the incoming data and writes the generated output.- Parameters:
dotty- the graph in dotty formatclassType-predictionTypes-config-- Returns:
- the TreeML data
- Throws:
java.lang.Exception- if parsing or writing fails
-
-