Class HtmlWriter
java.lang.Object
org.locationtech.jtstest.testbuilder.model.HtmlWriter
An object that creates an .html file describing the test cases. .gif files
are also created.
- Version:
- 1.7
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BusyDialog
private JFrame
private GeometryEditPanel
private static final int
private static final int
private File
private boolean
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Object
actualResult
(TestCaseEdit testCaseEdit, String opName, String first, String second) private void
addToListMapAndList
(String key, Object valueItem, Map stringToList, List keyList) private void
createGifFile
(String filenameNoPath, Geometry a, Geometry b, Geometry spatialFunction, boolean showingAB, int imageWidth, int imageHeight) private void
createGifFile
(String filenameNoPath, Geometry a, Geometry b, Geometry result, boolean showingAB, int imageWidth, int imageHeight, boolean zoomToFullExtent) private void
createHtmlFile
(String filename, String html) private String
deleteFirstTag
(String html) private String
deleteLastTag
(String html) private BooleanResult
expectedPredicateResult
(TestCaseEdit testCaseEdit, String opName, String first, String second) private String
private String
htmlForAB
(TestCaseEdit testCaseEdit, int runSkey, int caseSkey) private String
htmlForBinaryPredicates
(TestCaseEdit testCaseEdit, int caseSkey) private String
htmlForPredicateTest
(TestCaseEdit testCaseEdit, int caseSkey, String opName, String first, String second) private String
htmlForRelateTest
(TestCaseEdit testCaseEdit, int caseSkey) private String
htmlForSpatialFunctionTest
(TestCaseEdit testCaseEdit, int runSkey, int caseSkey, String geometryOpName, String first, String second) private String
htmlForTests
(TestCaseEdit testCaseEdit, int runSkey, int caseSkey) private String
htmlImageHtmlTextTable
(String imageFilename, String html, int border) private String
htmlImageTextTable
(String imageFilename, String text, int border) private String
htmlTitle
(PrecisionModel precisionModel) private String
indexHtml
(List runs, Map runMap, PrecisionModel precisionModel) private String
insertParagraphs
(String intersectionMatrix) private HtmlWriter.MapAndList
runMapAndRuns
(TestCaseList testCaseList) private String
void
setBusyDialog
(BusyDialog busyDialog) void
setShowingABwithSpatialFunction
(boolean showingABwithSpatialFunction) private String
private String
void
write
(File outputDirectory, TestCaseList testCaseList, PrecisionModel precisionModel)
-
Field Details
-
IMAGE_WIDTH
private static final int IMAGE_WIDTH- See Also:
-
IMAGE_HEIGHT
private static final int IMAGE_HEIGHT- See Also:
-
STACK_TRACE_DEPTH
private static final int STACK_TRACE_DEPTH- See Also:
-
showingABwithSpatialFunction
private boolean showingABwithSpatialFunction -
geometryEditPanel
-
frame
-
outputDirectory
-
busyDialog
-
-
Constructor Details
-
HtmlWriter
public HtmlWriter()
-
-
Method Details
-
setShowingABwithSpatialFunction
public void setShowingABwithSpatialFunction(boolean showingABwithSpatialFunction) -
setBusyDialog
-
write
public void write(File outputDirectory, TestCaseList testCaseList, PrecisionModel precisionModel) throws IOException - Throws:
IOException
-
html
- Throws:
IOException
-
deleteLastTag
-
deleteFirstTag
-
htmlForTests
private String htmlForTests(TestCaseEdit testCaseEdit, int runSkey, int caseSkey) throws IOException - Throws:
IOException
-
htmlForSpatialFunctionTest
private String htmlForSpatialFunctionTest(TestCaseEdit testCaseEdit, int runSkey, int caseSkey, String geometryOpName, String first, String second) -
htmlForRelateTest
-
insertParagraphs
-
htmlForPredicateTest
private String htmlForPredicateTest(TestCaseEdit testCaseEdit, int caseSkey, String opName, String first, String second) -
actualResult
private Object actualResult(TestCaseEdit testCaseEdit, String opName, String first, String second) throws Exception - Throws:
Exception
-
expectedPredicateResult
private BooleanResult expectedPredicateResult(TestCaseEdit testCaseEdit, String opName, String first, String second) -
htmlForAB
- Throws:
IOException
-
htmlImageTextTable
-
htmlImageHtmlTextTable
-
testName
-
runName
-
htmlTitle
-
createGifFile
private void createGifFile(String filenameNoPath, Geometry a, Geometry b, Geometry spatialFunction, boolean showingAB, int imageWidth, int imageHeight) throws FileNotFoundException, IOException - Throws:
FileNotFoundException
IOException
-
createGifFile
private void createGifFile(String filenameNoPath, Geometry a, Geometry b, Geometry result, boolean showingAB, int imageWidth, int imageHeight, boolean zoomToFullExtent) throws FileNotFoundException, IOException - Throws:
FileNotFoundException
IOException
-
createHtmlFile
- Throws:
IOException
-
runMapAndRuns
-
addToListMapAndList
-
indexHtml
-
testTopHtml
-
htmlForBinaryPredicates
-