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

Fix: Add missing top-level types to switch case

parent 02c78271
...@@ -29,6 +29,9 @@ import java.util.Map.Entry; ...@@ -29,6 +29,9 @@ import java.util.Map.Entry;
import java.util.Set; import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger; 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.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
...@@ -153,6 +156,12 @@ public class XmlStreamReporter implements StreamReporter { ...@@ -153,6 +156,12 @@ public class XmlStreamReporter implements StreamReporter {
reportWater(wo); reportWater(wo);
} else if (co instanceof LandObject lo) { } else if (co instanceof LandObject lo) {
reportLand(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 { } else {
throw new IllegalStateException("Not reportable CityObject found: " + co.getClass().getSimpleName()); throw new IllegalStateException("Not reportable CityObject found: " + co.getClass().getSimpleName());
} }
...@@ -196,6 +205,15 @@ public class XmlStreamReporter implements StreamReporter { ...@@ -196,6 +205,15 @@ public class XmlStreamReporter implements StreamReporter {
report.getValidationResults().getBuildingReports().add(fr); 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) { private FeatureReport createCityObjectReportNode(CityObject co) {
FeatureReport fr = new FeatureReport(); FeatureReport fr = new FeatureReport();
reportMap.put(co.getGmlId().getGmlString(), fr); reportMap.put(co.getGmlId().getGmlString(), fr);
......
...@@ -32,8 +32,14 @@ import java.util.concurrent.atomic.AtomicInteger; ...@@ -32,8 +32,14 @@ import java.util.concurrent.atomic.AtomicInteger;
import de.hft.stuttgart.citydoctor2.datastructure.AbstractBuilding; import de.hft.stuttgart.citydoctor2.datastructure.AbstractBuilding;
import de.hft.stuttgart.citydoctor2.datastructure.AbstractFurniture; import de.hft.stuttgart.citydoctor2.datastructure.AbstractFurniture;
import de.hft.stuttgart.citydoctor2.datastructure.AbstractRoom; 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.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.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.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
...@@ -110,6 +116,18 @@ public class PdfStreamReporter implements StreamReporter { ...@@ -110,6 +116,18 @@ public class PdfStreamReporter implements StreamReporter {
private int numErrorLand; private int numErrorLand;
private int numOkLand; 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 Section globalErrors;
private final Map<String, Section> sectionMap = new HashMap<>(); private final Map<String, Section> sectionMap = new HashMap<>();
...@@ -191,6 +209,12 @@ public class PdfStreamReporter implements StreamReporter { ...@@ -191,6 +209,12 @@ public class PdfStreamReporter implements StreamReporter {
reportWater(co, hasError); reportWater(co, hasError);
} else if (co instanceof LandObject) { } else if (co instanceof LandObject) {
reportLand(co, hasError); 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 { } else {
throw new IllegalStateException("Unknown City Object found: " + co.getClass()); throw new IllegalStateException("Unknown City Object found: " + co.getClass());
} }
...@@ -300,6 +324,15 @@ public class PdfStreamReporter implements StreamReporter { ...@@ -300,6 +324,15 @@ public class PdfStreamReporter implements StreamReporter {
writeCheckResultForAbstractBuilding(b, bSection); 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) { private void writeCheckResultForInstallation(Installation bi, Section root) {
Map<CheckId, CheckResult> results = bi.getAllCheckResults(); Map<CheckId, CheckResult> results = bi.getAllCheckResults();
writeCheckResults(results.values(), root); 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