Class HtmlWriter


  • public class HtmlWriter
    extends java.lang.Object
    An object that creates an .html file describing the test cases. .gif files are also created.
    Version:
    1.7
    • Field Detail

      • showingABwithSpatialFunction

        private boolean showingABwithSpatialFunction
      • frame

        private javax.swing.JFrame frame
      • outputDirectory

        private java.io.File outputDirectory
    • Constructor Detail

      • HtmlWriter

        public HtmlWriter()
    • Method Detail

      • setShowingABwithSpatialFunction

        public void setShowingABwithSpatialFunction​(boolean showingABwithSpatialFunction)
      • setBusyDialog

        public void setBusyDialog​(BusyDialog busyDialog)
      • write

        public void write​(java.io.File outputDirectory,
                          TestCaseList testCaseList,
                          PrecisionModel precisionModel)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • html

        private java.lang.String html​(Testable testable,
                                      int runSkey,
                                      int caseSkey)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • deleteLastTag

        private java.lang.String deleteLastTag​(java.lang.String html)
      • deleteFirstTag

        private java.lang.String deleteFirstTag​(java.lang.String html)
      • htmlForTests

        private java.lang.String htmlForTests​(TestCaseEdit testCaseEdit,
                                              int runSkey,
                                              int caseSkey)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • htmlForSpatialFunctionTest

        private java.lang.String htmlForSpatialFunctionTest​(TestCaseEdit testCaseEdit,
                                                            int runSkey,
                                                            int caseSkey,
                                                            java.lang.String geometryOpName,
                                                            java.lang.String first,
                                                            java.lang.String second)
      • htmlForRelateTest

        private java.lang.String htmlForRelateTest​(TestCaseEdit testCaseEdit,
                                                   int caseSkey)
      • insertParagraphs

        private java.lang.String insertParagraphs​(java.lang.String intersectionMatrix)
      • htmlForPredicateTest

        private java.lang.String htmlForPredicateTest​(TestCaseEdit testCaseEdit,
                                                      int caseSkey,
                                                      java.lang.String opName,
                                                      java.lang.String first,
                                                      java.lang.String second)
      • actualResult

        private java.lang.Object actualResult​(TestCaseEdit testCaseEdit,
                                              java.lang.String opName,
                                              java.lang.String first,
                                              java.lang.String second)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • expectedPredicateResult

        private BooleanResult expectedPredicateResult​(TestCaseEdit testCaseEdit,
                                                      java.lang.String opName,
                                                      java.lang.String first,
                                                      java.lang.String second)
      • htmlForAB

        private java.lang.String htmlForAB​(TestCaseEdit testCaseEdit,
                                           int runSkey,
                                           int caseSkey)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • htmlImageTextTable

        private java.lang.String htmlImageTextTable​(java.lang.String imageFilename,
                                                    java.lang.String text,
                                                    int border)
      • htmlImageHtmlTextTable

        private java.lang.String htmlImageHtmlTextTable​(java.lang.String imageFilename,
                                                        java.lang.String html,
                                                        int border)
      • testName

        private java.lang.String testName​(Testable testable,
                                          int caseSkey)
      • runName

        private java.lang.String runName​(java.lang.String runDescription,
                                         int runSkey)
      • htmlTitle

        private java.lang.String htmlTitle​(PrecisionModel precisionModel)
      • createGifFile

        private void createGifFile​(java.lang.String filenameNoPath,
                                   Geometry a,
                                   Geometry b,
                                   Geometry spatialFunction,
                                   boolean showingAB,
                                   int imageWidth,
                                   int imageHeight)
                            throws java.io.FileNotFoundException,
                                   java.io.IOException
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
      • createGifFile

        private void createGifFile​(java.lang.String filenameNoPath,
                                   Geometry a,
                                   Geometry b,
                                   Geometry result,
                                   boolean showingAB,
                                   int imageWidth,
                                   int imageHeight,
                                   boolean zoomToFullExtent)
                            throws java.io.FileNotFoundException,
                                   java.io.IOException
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
      • createHtmlFile

        private void createHtmlFile​(java.lang.String filename,
                                    java.lang.String html)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • addToListMapAndList

        private void addToListMapAndList​(java.lang.String key,
                                         java.lang.Object valueItem,
                                         java.util.Map stringToList,
                                         java.util.List keyList)
      • indexHtml

        private java.lang.String indexHtml​(java.util.List runs,
                                           java.util.Map runMap,
                                           PrecisionModel precisionModel)
      • testTopHtml

        private java.lang.String testTopHtml()
      • htmlForBinaryPredicates

        private java.lang.String htmlForBinaryPredicates​(TestCaseEdit testCaseEdit,
                                                         int caseSkey)