Commit 5d40c7b6 authored by Matthias Betz's avatar Matthias Betz
Browse files

CityDoctor2 validation open source release

parents
# Created by https://www.gitignore.io/api/java,maven,macos,linux,eclipse,windows,netbeans,intellij
# Edit at https://www.gitignore.io/?templates=java,maven,macos,linux,eclipse,windows,netbeans,intellij
# User specific
.sonarlint/
Servers/
### Eclipse ###
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# CDT- autotools
.autotools
# Java annotation processor (APT)
.factorypath
# PDT-specific (PHP Development Tools)
.buildpath
# sbteclipse plugin
.target
# Tern plugin
.tern-project
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans
# Code Recommenders
.recommenders/
# Annotation Processing
.apt_generated/
# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
### Eclipse Patch ###
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath
# Annotation Processing
.apt_generated
.sts4-cache/
### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
.idea/sonarlint
### Java ###
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Maven ###
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
### NetBeans ###
**/nbproject/private/
**/nbproject/Makefile-*.mk
**/nbproject/Package-*.bash
build/
nbbuild/
dist/
nbdist/
.nb-gradle/
### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# End of https://www.gitignore.io/api/java,maven,macos,linux,eclipse,windows,netbeans,intellij
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorParent</artifactId>
<version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>CityDoctorCheckResult</artifactId>
<dependencies>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-core -->
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import org.xml.sax.InputSource;
import de.hft.stuttgart.citydoctor2.checkresult.utility.CheckReportParseException;
import de.hft.stuttgart.citydoctor2.checkresult.utility.CheckReportWriteException;
import de.hft.stuttgart.citydoctor2.checkresult.utility.IndentationXmlStreamWriter;
@XmlRootElement(name = "error_report")
@XmlAccessorType(XmlAccessType.FIELD)
public class CheckReport {
private static JAXBContext context;
private static final Object lock = new Object();
@XmlElement(name = "header", required = true)
private Header header;
@XmlElement(name = "global_statistics", required = true)
private GlobalStatistics globalStatistics;
@XmlElement(name = "validation_plan", required = true)
private ValidationPlan validationPlan;
@XmlElement(name = "validation_results", required = true)
private ValidationResults validationResults;
private Map<String, FeatureReport> featureReports;
public static CheckReport load(String file) throws CheckReportParseException {
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
CheckReport report = (CheckReport) getContext().createUnmarshaller().unmarshal(new InputSource(reader));
enrichReportStructure(report);
return report;
} catch (JAXBException | IOException e) {
throw new CheckReportParseException(e);
}
}
private static JAXBContext getContext() throws JAXBException {
synchronized (lock) {
if (context == null) {
context = JAXBContext.newInstance(CheckReport.class);
}
}
return context;
}
public void saveAs(OutputStream output) throws CheckReportWriteException {
try {
Marshaller marshaller = getContext().createMarshaller();
XMLOutputFactory factory = XMLOutputFactory.newInstance();
XMLStreamWriter writer = factory.createXMLStreamWriter(output, "UTF-8");
writer = new IndentationXmlStreamWriter(writer);
marshaller.marshal(this, writer);
} catch (JAXBException | XMLStreamException e) {
throw new CheckReportWriteException(e);
}
}
private static void enrichReportStructure(CheckReport report) {
report.featureReports = new HashMap<>();
ValidationResults valResults = report.getValidationResults();
if (valResults != null) {
addFeatureReports(report, valResults.getBridgeReports());
addFeatureReports(report, valResults.getBuildingReports());
addFeatureReports(report, valResults.getLandReports());
addFeatureReports(report, valResults.getTransportationReports());
addFeatureReports(report, valResults.getVegetationReports());
addFeatureReports(report, valResults.getWaterReports());
}
}
private static void addFeatureReports(CheckReport report, List<? extends FeatureReport> reportList) {
if (reportList == null) {
return;
}
for (FeatureReport fr : reportList) {
if (fr.getGmlId() != null) {
report.featureReports.put(fr.getGmlId(), fr);
}
}
}
public FeatureReport getFeatureReportForId(String gmlId) {
return featureReports.get(gmlId);
}
public Header getHeader() {
return header;
}
public void setHeader(Header header) {
this.header = header;
}
public GlobalStatistics getGlobalStatistics() {
return globalStatistics;
}
public void setGlobalStatistics(GlobalStatistics globalStatistics) {
this.globalStatistics = globalStatistics;
}
public ValidationPlan getValidationPlan() {
return validationPlan;
}
public void setValidationPlan(ValidationPlan validationPlan) {
this.validationPlan = validationPlan;
}
public ValidationResults getValidationResults() {
return validationResults;
}
public void setValidationResults(ValidationResults validationResults) {
this.validationResults = validationResults;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
@XmlAccessorType(XmlAccessType.FIELD)
public class EdgeReport {
@XmlAttribute(name="name", required=false)
private String name;
@XmlElement(name="from", required = false)
private VertexReport from;
@XmlElement(name="to", required = false)
private VertexReport to;
public void setName(String name) {
this.name = name;
}
public void setFrom(VertexReport from) {
this.from = from;
}
public void setTo(VertexReport to) {
this.to = to;
}
public VertexReport getFrom() {
return from;
}
public String getName() {
return name;
}
public VertexReport getTo() {
return to;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
@XmlAccessorType(XmlAccessType.FIELD)
public class EdgesReport {
@XmlAttribute(name = "name", required = false)
private String name;
@XmlElement(name = "edge", required = true)
private List<EdgeReport> edges;
public void setEdges(List<EdgeReport> edges) {
this.edges = edges;
}
public void setName(String name) {
this.name = name;
}
public List<EdgeReport> getEdges() {
if (edges == null) {
edges = new ArrayList<>();
}
return edges;
}
public String getName() {
return name;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@XmlAccessorType(XmlAccessType.FIELD)
public class Environment {
@XmlElement(name = "city_doctor_validation_version")
private String validationVersion;
@XmlElement(name = "java_vm_version")
private String javaVmVersion;
@XmlElement(name = "java_vm_vendor")
private String javaVmVendor;
@XmlElement(name = "java_version")
private String javaVersion;
@XmlElement(name = "os_name")
private String osName;
@XmlElement(name = "os_arch")
private String osArch;
public String getValidationVersion() {
return validationVersion;
}
public void setValidationVersion(String validationVersion) {
this.validationVersion = validationVersion;
}
public String getJavaVmVersion() {
return javaVmVersion;
}
public void setJavaVmVersion(String javaVmVersion) {
this.javaVmVersion = javaVmVersion;
}
public String getJavaVmVendor() {
return javaVmVendor;
}
public void setJavaVmVendor(String javaVmVendor) {
this.javaVmVendor = javaVmVendor;
}
public String getJavaVersion() {
return javaVersion;
}
public void setJavaVersion(String javaVersion) {
this.javaVersion = javaVersion;
}
public String getOsName() {
return osName;
}
public void setOsName(String osName) {
this.osName = osName;
}
public String getOsArch() {
return osArch;
}
public void setOsArch(String osArch) {
this.osArch = osArch;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@XmlAccessorType(XmlAccessType.FIELD)
public class ErrorDetails {
@XmlElement(name = "polygon", required = false)
private List<PolygonReport> polygon;
@XmlElement(name = "ring", required = false)
private List<RingReport> ring;
@XmlElement(name = "geometry", required = false)
private List<GeometryReport> geometry;
@XmlElement(name = "vertex", required = false)
private List<VertexReport> vertex;
@XmlElement(name = "edge", required = false)
private List<EdgeReport> edge;
@XmlElement(name = "parameter", required = false)
private List<ParameterReport> parameter;
@XmlElement(name = "polygons", required = false)
private List<PolygonsReport> polygons;
@XmlElement(name = "edges", required = false)
private List<EdgesReport> edges;
@XmlElement(name = "surface", required = false)
private List<SurfaceReport> surface;
public void setEdge(List<EdgeReport> edge) {
this.edge = edge;
}
public void setRing(List<RingReport> ring) {
this.ring = ring;
}
public void setEdges(List<EdgesReport> edges) {
this.edges = edges;
}
public void setGeometry(List<GeometryReport> geometry) {
this.geometry = geometry;
}
public void setParameter(List<ParameterReport> parameter) {
this.parameter = parameter;
}
public void setPolygon(List<PolygonReport> polygon) {
this.polygon = polygon;
}
public void setPolygons(List<PolygonsReport> polygons) {
this.polygons = polygons;
}
public void setSurface(List<SurfaceReport> surface) {
this.surface = surface;
}
public void setVertex(List<VertexReport> vertex) {
this.vertex = vertex;
}
public List<RingReport> getRing() {
if (ring == null) {
ring = new ArrayList<>();
}
return ring;
}
public List<EdgeReport> getEdge() {
if (edge == null) {
edge = new ArrayList<>();
}
return edge;
}
public List<EdgesReport> getEdges() {
if (edges == null) {
edges = new ArrayList<>();
}
return edges;
}
public List<GeometryReport> getGeometry() {
if (geometry == null) {
geometry = new ArrayList<>();
}
return geometry;
}
public List<ParameterReport> getParameter() {
if (parameter == null) {
parameter = new ArrayList<>();
}
return parameter;
}
public List<PolygonReport> getPolygon() {
if (polygon == null) {
polygon = new ArrayList<>();
}
return polygon;
}
public List<PolygonsReport> getPolygons() {
if (polygons == null) {
polygons = new ArrayList<>();
}
return polygons;
}
public List<SurfaceReport> getSurface() {
if (surface == null) {
surface = new ArrayList<>();
}
return surface;
}
public List<VertexReport> getVertex() {
if (vertex == null) {
vertex = new ArrayList<>();
}
return vertex;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
@XmlAccessorType(XmlAccessType.FIELD)
public class ErrorReport {
@XmlAttribute
private String id;
@XmlAttribute
private ErrorStatus status;
@XmlElement(name = "feature", required = false)
private Feature feature;
@XmlElement(name = "error_details", required = false)
private ErrorDetails errorDetails;
public ErrorDetails getErrorDetails() {
return errorDetails;
}
public void setErrorDetails(ErrorDetails errorDetails) {
this.errorDetails = errorDetails;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public ErrorStatus getStatus() {
return status;
}
public void setStatus(ErrorStatus status) {
this.status = status;
}
public Feature getFeature() {
return feature;
}
public void setFeature(Feature feature) {
this.feature = feature;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlValue;
@XmlAccessorType(XmlAccessType.FIELD)
public class ErrorStatistic {
@XmlValue
private int count;
@XmlAttribute
private String name;
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
public enum ErrorStatus {
WARNING, ERROR
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@XmlAccessorType(XmlAccessType.FIELD)
public class Feature {
@XmlAttribute(name = "gml_id")
private String gmlId;
@XmlAttribute(name = "feature_type")
private String type;
public String getGmlId() {
return gmlId;
}
public void setGmlId(String gmlId) {
this.gmlId = gmlId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
@XmlAccessorType(XmlAccessType.FIELD)
public class FeatureReport {
@XmlAttribute(name = "gml_id", required = true)
private String gmlId;
@XmlElement(required = true)
private Statistics statistics;
@XmlElementWrapper(name = "errors")
@XmlElement(name = "error")
private List<ErrorReport> errors;
public String getGmlId() {
return gmlId;
}
public void setGmlId(String gmlId) {
this.gmlId = gmlId;
}
public Statistics getStatistics() {
return statistics;
}
public void setStatistics(Statistics statistics) {
this.statistics = statistics;
}
public List<ErrorReport> getErrors() {
if (errors == null) {
errors = new ArrayList<>();
}
return errors;
}
public void setErrors(List<ErrorReport> errors) {
this.errors = errors;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
@XmlAccessorType(XmlAccessType.FIELD)
public class GeometryReport {
@XmlAttribute(name = "type", required = true)
private GeometryReportType type;
@XmlAttribute(name = "gml_id", required = false)
private String gmlId;
@XmlAttribute(name = "lod", required = true)
private GeometryReportLod lod;
@XmlElement(name = "parent", required = true)
private ParentReport parent;
public void setGmlId(String gmlId) {
this.gmlId = gmlId;
}
public void setLod(GeometryReportLod lod) {
this.lod = lod;
}
public void setParent(ParentReport parent) {
this.parent = parent;
}
public void setType(GeometryReportType type) {
this.type = type;
}
public String getGmlId() {
return gmlId;
}
public GeometryReportLod getLod() {
return lod;
}
public ParentReport getParent() {
return parent;
}
public GeometryReportType getType() {
return type;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
public enum GeometryReportLod {
LOD1, LOD2, LOD3, LOD4, LOD0
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
public enum GeometryReportType {
SOLID, MULTI_SURFACE, COMPOSITE_SURFACE
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@XmlAccessorType(XmlAccessType.FIELD)
public class GlobalErrorStatistics {
@XmlElement(name = "num_error_buildings")
private int numErrorBuildings;
@XmlElement(name = "num_error_vegetation")
private int numErrorVegetation;
@XmlElement(name = "num_error_land_objects")
private int numErrorLandObjects;
@XmlElement(name = "num_error_bridge_objects")
private int numErrorBridgeObjects;
@XmlElement(name = "num_error_water_objects")
private int numErrorWaterObjects;
@XmlElement(name = "num_error_transportation")
private int numErrorTransportation;
public int getNumErrorBuildings() {
return numErrorBuildings;
}
public void setNumErrorBuildings(int numErrorBuildings) {
this.numErrorBuildings = numErrorBuildings;
}
public int getNumErrorVegetation() {
return numErrorVegetation;
}
public void setNumErrorVegetation(int numErrorVegetation) {
this.numErrorVegetation = numErrorVegetation;
}
public int getNumErrorLandObjects() {
return numErrorLandObjects;
}
public void setNumErrorLandObjects(int numErrorLandObjects) {
this.numErrorLandObjects = numErrorLandObjects;
}
public int getNumErrorBridgeObjects() {
return numErrorBridgeObjects;
}
public void setNumErrorBridgeObjects(int numErrorBridgeObjects) {
this.numErrorBridgeObjects = numErrorBridgeObjects;
}
public int getNumErrorWaterObjects() {
return numErrorWaterObjects;
}
public void setNumErrorWaterObjects(int numErrorWaterObjects) {
this.numErrorWaterObjects = numErrorWaterObjects;
}
public int getNumErrorTransportation() {
return numErrorTransportation;
}
public void setNumErrorTransportation(int numErrorTransportation) {
this.numErrorTransportation = numErrorTransportation;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
@XmlAccessorType(XmlAccessType.FIELD)
public class GlobalStatistics {
@XmlElement(name = "model_statistics", required = true)
private ModelStatistics modelStats;
@XmlElement(name = "global_error_statistics", required = true)
private GlobalErrorStatistics globalErrorStats;
@XmlElementWrapper(name = "errors")
@XmlElement(name = "error", required = true)
private List<ErrorStatistic> errorStats;
public ModelStatistics getModelStats() {
return modelStats;
}
public void setModelStats(ModelStatistics modelStats) {
this.modelStats = modelStats;
}
public GlobalErrorStatistics getGlobalErrorStats() {
return globalErrorStats;
}
public void setGlobalErrorStats(GlobalErrorStatistics globalErrorStats) {
this.globalErrorStats = globalErrorStats;
}
public List<ErrorStatistic> getErrorStats() {
if (errorStats == null) {
errorStats = new ArrayList<>();
}
return errorStats;
}
public void setErrorStats(List<ErrorStatistic> errorStats) {
this.errorStats = errorStats;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import java.time.ZonedDateTime;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import de.hft.stuttgart.citydoctor2.marshaller.ZonedDateTimeAdapter;
@XmlAccessorType(XmlAccessType.FIELD)
public class Header {
@XmlElement(required = true)
private String file;
@XmlElement(required = true)
private Environment environment;
@XmlJavaTypeAdapter(ZonedDateTimeAdapter.class)
@XmlElement(required = true)
private ZonedDateTime date;
public String getFile() {
return file;
}
public void setFile(String file) {
this.file = file;
}
public Environment getEnvironment() {
return environment;
}
public void setEnvironment(Environment environment) {
this.environment = environment;
}
public ZonedDateTime getDate() {
return date;
}
public void setDate(ZonedDateTime date) {
this.date = date;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@XmlAccessorType(XmlAccessType.FIELD)
public class ModelStatistics {
@XmlElement(name = "num_buildings", required = true)
private int numBuildings;
@XmlElement(name = "num_vegetation", required = true)
private int numVegetation;
@XmlElement(name = "num_transportation", required = true)
private int numTransportation;
@XmlElement(name = "num_land_objects", required = true)
private int numLandObjects;
@XmlElement(name = "num_bridge_objects", required = true)
private int numBridgeObjects;
@XmlElement(name = "num_water_objects", required = true)
private int numWaterObjects;
public int getNumBuildings() {
return numBuildings;
}
public void setNumBuildings(int numBuildings) {
this.numBuildings = numBuildings;
}
public int getNumVegetation() {
return numVegetation;
}
public void setNumVegetation(int numVegetation) {
this.numVegetation = numVegetation;
}
public int getNumTransportation() {
return numTransportation;
}
public void setNumTransportation(int numTransportation) {
this.numTransportation = numTransportation;
}
public int getNumLandObjects() {
return numLandObjects;
}
public void setNumLandObjects(int numLandObjects) {
this.numLandObjects = numLandObjects;
}
public int getNumBridgeObjects() {
return numBridgeObjects;
}
public void setNumBridgeObjects(int numBridgeObjects) {
this.numBridgeObjects = numBridgeObjects;
}
public int getNumWaterObjects() {
return numWaterObjects;
}
public void setNumWaterObjects(int numWaterObjects) {
this.numWaterObjects = numWaterObjects;
}
}
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package de.hft.stuttgart.citydoctor2.checkresult;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlValue;
@XmlAccessorType(XmlAccessType.FIELD)
public class ParameterReport {
@XmlAttribute(name = "name", required = true)
private String name;
@XmlValue
private String value;
public void setName(String name) {
this.name = name;
}
public void setValue(String value) {
this.value = value;
}
public String getName() {
return name;
}
public String getValue() {
return value;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment