Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
1 month ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Fix: Add missing top-level types to switch case
parent
02c78271
master
dev
dev_gui_features_zip_loading
archive/dev_gui_features_zip_loading
2 merge requests
!28
Version 3.17.0 Release
,
!26
Add ZIP-archive support
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/XmlStreamReporter.java
+18
-0
...ft/stuttgart/citydoctor2/reporting/XmlStreamReporter.java
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/PdfStreamReporter.java
+33
-0
...tuttgart/citydoctor2/reporting/pdf/PdfStreamReporter.java
with
51 additions
and
0 deletions
+51
-0
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/XmlStreamReporter.java
+
18
-
0
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
);
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/PdfStreamReporter.java
+
33
-
0
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
);
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets