Skip to content
Snippets Groups Projects
Commit 584d447b authored by Lyn Elisa Goltz's avatar Lyn Elisa Goltz
Browse files

XPLANBOX-2652 - removed XML Validierungsreport

parent 70d88061
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,6 @@ package de.latlon.xplan.validator.web.shared;
*/
public enum ArtifactType {
HTML, XML, PDF, SHP
HTML, PDF, SHP
}
......@@ -30,9 +30,9 @@ import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
import de.latlon.xplanbox.core.gwt.commons.shared.ValidationSummary;
import de.latlon.xplanbox.core.gwt.commons.client.ValidatorWebCommonsMessages;
import de.latlon.xplan.validator.web.shared.ArtifactType;
import de.latlon.xplanbox.core.gwt.commons.client.ValidatorWebCommonsMessages;
import de.latlon.xplanbox.core.gwt.commons.shared.ValidationSummary;
import java.util.ArrayList;
import java.util.List;
......@@ -40,7 +40,6 @@ import java.util.List;
import static de.latlon.xplan.validator.web.shared.ArtifactType.HTML;
import static de.latlon.xplan.validator.web.shared.ArtifactType.PDF;
import static de.latlon.xplan.validator.web.shared.ArtifactType.SHP;
import static de.latlon.xplan.validator.web.shared.ArtifactType.XML;
/**
* Encapulates the download options.
......@@ -54,8 +53,6 @@ public class ReportDownloadPanel extends CaptionPanel {
private final CheckBox htmlCheckBox = new CheckBox(messages.reportDownloadHtml());
private final CheckBox xmlCheckBox = new CheckBox(messages.reportDownloadXml());
private final CheckBox pdfCheckBox = new CheckBox(messages.reportDownloadPdf());
private final CheckBox shpCheckBox = new CheckBox(messages.reportDownloadShp());
......@@ -76,7 +73,6 @@ public class ReportDownloadPanel extends CaptionPanel {
mainPanel.add(htmlCheckBox);
mainPanel.add(pdfCheckBox);
mainPanel.add(xmlCheckBox);
mainPanel.add(createGeometryErrorSeperator());
......@@ -115,8 +111,6 @@ public class ReportDownloadPanel extends CaptionPanel {
List<ArtifactType> selectedArtifacts = new ArrayList<ArtifactType>();
if (htmlCheckBox.getValue())
selectedArtifacts.add(HTML);
if (xmlCheckBox.getValue())
selectedArtifacts.add(XML);
if (pdfCheckBox.getValue())
selectedArtifacts.add(PDF);
if (shpCheckBox.getValue())
......
......@@ -24,7 +24,6 @@ import de.latlon.xplan.validator.configuration.ValidatorConfiguration;
import de.latlon.xplan.validator.report.html.HtmlReportGenerator;
import de.latlon.xplan.validator.report.pdf.PdfReportGenerator;
import de.latlon.xplan.validator.report.shapefile.ShapefileGenerator;
import de.latlon.xplan.validator.report.xml.XmlReportGenerator;
import java.io.IOException;
import java.io.OutputStream;
......@@ -40,8 +39,6 @@ import java.util.zip.ZipOutputStream;
*/
public class ReportArchiveGenerator {
private final XmlReportGenerator xmlReportGenerator = new XmlReportGenerator();
private final PdfReportGenerator pdfGenerator = new PdfReportGenerator();
private final HtmlReportGenerator htmlGenerator = new HtmlReportGenerator();
......@@ -71,7 +68,6 @@ public class ReportArchiveGenerator {
Path outputFile = validationReportDirectory.resolve(validationName + ".zip");
try (OutputStream fileOutStream = Files.newOutputStream(outputFile);
ZipOutputStream zipOutStream = new ZipOutputStream(fileOutStream)) {
addXmlEntry(report, validationName, zipOutStream);
addHtmlEntry(report, validationName, zipOutStream);
addPdfEntry(report, validationName, zipOutStream);
addShapeDirectoryEntry(report, validationName, validationReportDirectory, zipOutStream);
......@@ -90,18 +86,6 @@ public class ReportArchiveGenerator {
zipOutStream.closeEntry();
}
/**
* @deprecated will be removed in a future version.
**/
@Deprecated
private void addXmlEntry(ValidatorReport report, String validationName, ZipOutputStream zipOutStream)
throws IOException, ReportGenerationException {
ZipEntry xmlEntry = new ZipEntry(validationName + ".xml");
zipOutStream.putNextEntry(xmlEntry);
xmlReportGenerator.generateXmlReport(report, zipOutStream);
zipOutStream.closeEntry();
}
private void addHtmlEntry(ValidatorReport report, String validationName, ZipOutputStream zipOutStream)
throws IOException, ReportGenerationException {
ZipEntry xmlEntry = new ZipEntry(validationName + ".html");
......
......@@ -23,7 +23,6 @@ package de.latlon.xplan.validator.report;
import de.latlon.xplan.validator.report.html.HtmlReportGenerator;
import de.latlon.xplan.validator.report.pdf.PdfReportGenerator;
import de.latlon.xplan.validator.report.shapefile.ShapefileGenerator;
import de.latlon.xplan.validator.report.xml.XmlReportGenerator;
import de.latlon.xplan.validator.web.shared.ArtifactType;
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
......@@ -59,8 +58,6 @@ public class ReportWriter {
public static final String ERROR_LOG_FILENAME = "error.log";
private final XmlReportGenerator xmlReportGenerator = new XmlReportGenerator();
private final PdfReportGenerator pdfGenerator = new PdfReportGenerator();
private final HtmlReportGenerator htmlGenerator = new HtmlReportGenerator();
......@@ -76,7 +73,6 @@ public class ReportWriter {
*/
public void writeArtefacts(ValidatorReport report, Path targetDirectory) {
List<String> failures = new ArrayList<>();
addXmlEntry(report, targetDirectory, failures);
addHtmlEntry(report, targetDirectory, failures);
addPdfEntry(report, targetDirectory, failures);
addShapeDirectoryEntry(report, targetDirectory, failures);
......@@ -112,23 +108,6 @@ public class ReportWriter {
}
}
/**
* @deprecated will be removed in a future version.
**/
@Deprecated
private void addXmlEntry(ValidatorReport report, Path directoryToCreateZip, List<String> failures) {
String validationName = report.getValidationName();
Path xmlFile = directoryToCreateZip.resolve(validationName + ".xml");
try (OutputStream outputStream = Files.newOutputStream(xmlFile)) {
xmlReportGenerator.generateXmlReport(report, outputStream);
}
catch (Exception e) {
failures.add(e.getMessage());
LOG.error("XML Entry of the validtion report could not be created.", e);
}
}
private void addHtmlEntry(ValidatorReport report, Path directoryToCreateZip, List<String> failures) {
String validationName = report.getValidationName();
Path htmlFile = directoryToCreateZip.resolve(validationName + ".html");
......@@ -174,7 +153,6 @@ public class ReportWriter {
addShpArtifact(zipOutputStream, sourceDirectory);
break;
case HTML:
case XML:
case PDF:
addSimpleArtifact(artifactType, validationName, zipOutputStream, sourceDirectory);
break;
......
......@@ -84,7 +84,6 @@ public class ReportWriterTest {
assertThat(targetDirectory, containsFile(VALIDATION_NAME + ".html"));
assertThat(targetDirectory, containsFile(VALIDATION_NAME + ".pdf"));
assertThat(targetDirectory, containsFile(VALIDATION_NAME + ".xml"));
assertThat(targetDirectory, containsDirectory("shapes"));
}
......
......@@ -253,12 +253,9 @@ Der Validierungsbericht kann in den Formaten:
* HTML
* PDF
* XML (veraltet)
exportiert werden.
IMPORTANT: Die Ausgabe des Validierungsberichts im Format XML ist veraltet und wird in zukünftigen Versionen der xPlanBox entfernt!
Geometriefehler können zusätzlich auch als Shape-Datei gespeichert werden.
NOTE: Derzeit werden ausschließlich Schnittpunkte in der Shape-Datei ausgegeben, also die Punkte an denen sich die Umgrenzungslinie der betroffenen Geometrie und die des Geltungsbereichs schneiden. Linienförmige Schnittbereiche werden derzeit nicht ausgegeben.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.