Commit 1a72243a authored by Riegel's avatar Riegel
Browse files

Fix: Add missing top-level types to switch case

2 merge requests!28Version 3.17.0 Release,!26Add ZIP-archive support
Showing with 51 additions and 0 deletions
+51 -0
......@@ -29,6 +29,9 @@ import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import de.hft.stuttgart.citydoctor2.datastructure.CityFurniture;
import de.hft.stuttgart.citydoctor2.datastructure.GenericCityObject;
import de.hft.stuttgart.citydoctor2.datastructure.Tunnel;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
......@@ -153,6 +156,12 @@ public class XmlStreamReporter implements StreamReporter {
reportWater(wo);
} else if (co instanceof LandObject lo) {
reportLand(lo);
} else if (co instanceof Tunnel to) {
reportTunnel(to);
} else if (co instanceof CityFurniture cf) {
reportCityFurniture(cf);
} else if (co instanceof GenericCityObject gco) {
reportGenericCityObject(gco);
} else {
throw new IllegalStateException("Not reportable CityObject found: " + co.getClass().getSimpleName());
}
......@@ -196,6 +205,15 @@ public class XmlStreamReporter implements StreamReporter {
report.getValidationResults().getBuildingReports().add(fr);
}
private void reportTunnel(Tunnel to) {
}
private void reportCityFurniture(CityFurniture cf) {
}
private void reportGenericCityObject(GenericCityObject gco) {
}
private FeatureReport createCityObjectReportNode(CityObject co) {
FeatureReport fr = new FeatureReport();
reportMap.put(co.getGmlId().getGmlString(), fr);
......
......@@ -32,8 +32,14 @@ import java.util.concurrent.atomic.AtomicInteger;
import de.hft.stuttgart.citydoctor2.datastructure.AbstractBuilding;
import de.hft.stuttgart.citydoctor2.datastructure.AbstractFurniture;
import de.hft.stuttgart.citydoctor2.datastructure.AbstractRoom;
import de.hft.stuttgart.citydoctor2.datastructure.AbstractTunnel;
import de.hft.stuttgart.citydoctor2.datastructure.BuildingUnit;
import de.hft.stuttgart.citydoctor2.datastructure.CityFurniture;
import de.hft.stuttgart.citydoctor2.datastructure.GenericCityObject;
import de.hft.stuttgart.citydoctor2.datastructure.Storey;
import de.hft.stuttgart.citydoctor2.datastructure.Tunnel;
import de.hft.stuttgart.citydoctor2.datastructure.TunnelConstructiveElement;
import de.hft.stuttgart.citydoctor2.datastructure.TunnelPart;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
......@@ -110,6 +116,18 @@ public class PdfStreamReporter implements StreamReporter {
private int numErrorLand;
private int numOkLand;
private Section tunnel;
private int numErrorTunnel;
private int numOkTunnel;
private Section cityFurniture;
private int numErrorCityFurniture;
private int numOkCityFurniture;
private Section genericCityObject;
private int numErrorGenericCityObject;
private int numOkGenericCityObject;
private Section globalErrors;
private final Map<String, Section> sectionMap = new HashMap<>();
......@@ -191,6 +209,12 @@ public class PdfStreamReporter implements StreamReporter {
reportWater(co, hasError);
} else if (co instanceof LandObject) {
reportLand(co, hasError);
} else if (co instanceof Tunnel) {
reportTunnel(co, hasError);
} else if (co instanceof CityFurniture) {
reportCityFurniture(co, hasError);
} else if (co instanceof GenericCityObject) {
reportGenericCityObject(co, hasError);
} else {
throw new IllegalStateException("Unknown City Object found: " + co.getClass());
}
......@@ -300,6 +324,15 @@ public class PdfStreamReporter implements StreamReporter {
writeCheckResultForAbstractBuilding(b, bSection);
}
private void reportTunnel(CityObject co, boolean hasError) {
}
private void reportCityFurniture(CityObject co, boolean hasError) {
}
private void reportGenericCityObject(CityObject co, boolean hasError) {
}
private void writeCheckResultForInstallation(Installation bi, Section root) {
Map<CheckId, CheckResult> results = bi.getAllCheckResults();
writeCheckResults(results.values(), root);
......
Supports Markdown
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