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 BusyDialogprivate JFrameprivate GeometryEditPanelprivate static final intprivate static final intprivate Fileprivate booleanprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ObjectactualResult(TestCaseEdit testCaseEdit, String opName, String first, String second) private voidaddToListMapAndList(String key, Object valueItem, Map stringToList, List keyList) private voidcreateGifFile(String filenameNoPath, Geometry a, Geometry b, Geometry spatialFunction, boolean showingAB, int imageWidth, int imageHeight) private voidcreateGifFile(String filenameNoPath, Geometry a, Geometry b, Geometry result, boolean showingAB, int imageWidth, int imageHeight, boolean zoomToFullExtent) private voidcreateHtmlFile(String filename, String html) private StringdeleteFirstTag(String html) private StringdeleteLastTag(String html) private BooleanResultexpectedPredicateResult(TestCaseEdit testCaseEdit, String opName, String first, String second) private Stringprivate StringhtmlForAB(TestCaseEdit testCaseEdit, int runSkey, int caseSkey) private StringhtmlForBinaryPredicates(TestCaseEdit testCaseEdit, int caseSkey) private StringhtmlForPredicateTest(TestCaseEdit testCaseEdit, int caseSkey, String opName, String first, String second) private StringhtmlForRelateTest(TestCaseEdit testCaseEdit, int caseSkey) private StringhtmlForSpatialFunctionTest(TestCaseEdit testCaseEdit, int runSkey, int caseSkey, String geometryOpName, String first, String second) private StringhtmlForTests(TestCaseEdit testCaseEdit, int runSkey, int caseSkey) private StringhtmlImageHtmlTextTable(String imageFilename, String html, int border) private StringhtmlImageTextTable(String imageFilename, String text, int border) private StringhtmlTitle(PrecisionModel precisionModel) private StringindexHtml(List runs, Map runMap, PrecisionModel precisionModel) private StringinsertParagraphs(String intersectionMatrix) private HtmlWriter.MapAndListrunMapAndRuns(TestCaseList testCaseList) private StringvoidsetBusyDialog(BusyDialog busyDialog) voidsetShowingABwithSpatialFunction(boolean showingABwithSpatialFunction) private Stringprivate Stringvoidwrite(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:
FileNotFoundExceptionIOException
-
createGifFile
private void createGifFile(String filenameNoPath, Geometry a, Geometry b, Geometry result, boolean showingAB, int imageWidth, int imageHeight, boolean zoomToFullExtent) throws FileNotFoundException, IOException - Throws:
FileNotFoundExceptionIOException
-
createHtmlFile
- Throws:
IOException
-
runMapAndRuns
-
addToListMapAndList
-
indexHtml
-
testTopHtml
-
htmlForBinaryPredicates
-