Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
1a72243a
Commit
1a72243a
authored
Jan 21, 2025
by
Riegel
Browse files
Fix: Add missing top-level types to switch case
parent
02c78271
Changes
2
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/XmlStreamReporter.java
View file @
1a72243a
...
...
@@ -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
);
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/PdfStreamReporter.java
View file @
1a72243a
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment