Class 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.String checkTime​(int nrDecimals, PredictionType classType, java.lang.String label)
      Check is value is in highest possible time format
      java.lang.String convert​(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.String convertTime​(java.lang.String time, int nrDecimals, PredictionType classType)  
      protected java.lang.String sanitize​(java.lang.String s)
      Replaces certain characters with their character entities.
      protected void writeEdge​(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 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 writeNode​(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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NewDottyToTree

        public NewDottyToTree()
    • 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.Exception
        Writes 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.Exception
        Writes the node as GraphML.
        Parameters:
        writer - the writer to use
        node - the node to write as GraphML
        classType -
        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.Exception
        Writes 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 use
        edge - the edge to write
        classType -
        predictionTypes -
        config -
        Throws:
        java.lang.Exception - if an error occurs
      • writeFooter

        protected void writeFooter​(java.io.BufferedWriter writer)
                            throws java.lang.Exception
        Writes 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.Exception
        Parses the incoming data and writes the generated output.
        Parameters:
        dotty - the graph in dotty format
        classType -
        predictionTypes -
        config -
        Returns:
        the TreeML data
        Throws:
        java.lang.Exception - if parsing or writing fails