From 6d02b6f963b4ecaf9c1ed0d2885a969b3739b373 Mon Sep 17 00:00:00 2001 From: Matthias Betz Date: Fri, 16 Apr 2021 12:41:48 +0200 Subject: [PATCH] fixed an issue with parameter in the validation ADE structure missing the uom tag --- CityDoctorParent/CityDoctorValidation/pom.xml | 8 ++++++++ .../hft/stuttgart/citydoctor2/check/Checker.java | 14 +++++++------- CityDoctorParent/pom.xml | 5 +++++ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/CityDoctorParent/CityDoctorValidation/pom.xml b/CityDoctorParent/CityDoctorValidation/pom.xml index fade6738..b4c53dba 100644 --- a/CityDoctorParent/CityDoctorValidation/pom.xml +++ b/CityDoctorParent/CityDoctorValidation/pom.xml @@ -15,6 +15,10 @@ de.hft.stuttgart CityDoctorModel + + de.hft.stuttgart + CityDoctorEdge + de.hft.stuttgart CityDoctorCheckResult @@ -52,6 +56,10 @@ org.locationtech.jts jts-core + + de.hft.stuttgart + citygml4j-quality-ade + diff --git a/CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/Checker.java b/CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/Checker.java index c24700df..3668db56 100644 --- a/CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/Checker.java +++ b/CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/Checker.java @@ -241,6 +241,7 @@ public class Checker { ValidationPlan plan = new ValidationPlan(); List filter = createFilter(); + Map reqs = Checks.getAvailableRequirements(); for (Entry e : config.getRequirements().entrySet()) { RequirementId reqId = mapToRequirement(e.getKey()); if (reqId == null) { @@ -251,13 +252,13 @@ public class Checker { req.setEnabled(e.getValue().isEnabled()); plan.getRequirements().add(req); Map parameters = e.getValue().getParameters(); - Map reqs = Checks.getAvailableRequirements(); if (parameters != null) { for (Entry param : parameters.entrySet()) { Parameter p = new Parameter(); - DefaultParameter defaultP = getDefaultParameter(param.getKey(), reqs); + DefaultParameter defaultP = getDefaultParameter(e.getKey(), reqs, param.getKey()); if (defaultP != null) { p.setUom(defaultP.getUnitType().getGmlRepresentation()); + System.out.println(p.getUom()); } p.setName(param.getKey()); p.setValue(param.getValue()); @@ -292,12 +293,12 @@ public class Checker { return plan; } - private DefaultParameter getDefaultParameter(String key, - Map reqs) { - de.hft.stuttgart.citydoctor2.check.Requirement requirement = reqs.get(key); + private DefaultParameter getDefaultParameter(String reqKey, + Map reqs, String paramName) { + de.hft.stuttgart.citydoctor2.check.Requirement requirement = reqs.get(reqKey); if (requirement != null) { for (DefaultParameter param : requirement.getDefaultParameter()) { - if (param.getName().equals(key)) { + if (param.getName().equals(paramName)) { return param; } } @@ -741,7 +742,6 @@ public class Checker { // execute schematron first SvrlContentHandler handler = executeSchematronValidationIfAvailable(config, inputFile); CityGmlConsumer con = new StreamCityGmlConsumer(c, xmlReporter, pdfReporter, handler, config, l); - // parse and validate CityGmlParser.streamCityGml(inputFile, config.getParserConfiguration(), con, outputFile); diff --git a/CityDoctorParent/pom.xml b/CityDoctorParent/pom.xml index b830010f..a9608473 100644 --- a/CityDoctorParent/pom.xml +++ b/CityDoctorParent/pom.xml @@ -60,6 +60,11 @@ CityDoctorGUI ${revision} + + de.hft.stuttgart + CityDoctorEdge + ${revision} + de.hft.stuttgart CityDoctorCheckResult -- GitLab