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
04387e46
Commit
04387e46
authored
1 month ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Fix: Rework error counting in PDF reporter
parent
3260bb7e
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
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/PdfStreamReporter.java
+29
-6
...tuttgart/citydoctor2/reporting/pdf/PdfStreamReporter.java
with
29 additions
and
6 deletions
+29
-6
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/PdfStreamReporter.java
+
29
-
6
View file @
04387e46
...
...
@@ -314,13 +314,20 @@ public class PdfStreamReporter implements StreamReporter {
Section
bSection
=
buildings
.
createSubSection
(
co
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
co
.
getGmlId
().
getGmlString
(),
bSection
);
if
(
hasError
)
{
numErrorBuildings
++;
bSection
.
setHeadlineColor
(
ERROR_COLOR
);
}
else
{
numOkBuildings
++;
bSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
co
,
bSection
);
Building
b
=
(
Building
)
co
;
for
(
BuildingPart
bp
:
b
.
getBuildingParts
())
{
if
(
containsError
(
bp
))
{
numErrorBuildings
++;
}
else
{
numOkBuildings
++;
}
sectionMap
.
put
(
bp
.
getGmlId
().
getGmlString
(),
bSection
);
writeCheckResultForAbstractBuilding
(
bp
,
bSection
);
}
...
...
@@ -334,8 +341,10 @@ public class PdfStreamReporter implements StreamReporter {
Section
tSection
=
tunnel
.
createSubSection
(
co
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
co
.
getGmlId
().
getGmlString
(),
tSection
);
if
(
hasError
)
{
numErrorTunnel
++;
tSection
.
setHeadlineColor
(
ERROR_COLOR
);
}
else
{
numOkTunnel
++;
tSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
co
,
tSection
);
...
...
@@ -350,8 +359,10 @@ public class PdfStreamReporter implements StreamReporter {
Section
cfSection
=
cityFurniture
.
createSubSection
(
co
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
co
.
getGmlId
().
getGmlString
(),
cfSection
);
if
(
hasError
)
{
numErrorCityFurniture
++;
cfSection
.
setHeadlineColor
(
ERROR_COLOR
);
}
else
{
numOkCityFurniture
++;
cfSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
co
,
cfSection
);
...
...
@@ -364,8 +375,10 @@ public class PdfStreamReporter implements StreamReporter {
Section
gcSection
=
genericCityObject
.
createSubSection
(
co
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
co
.
getGmlId
().
getGmlString
(),
gcSection
);
if
(
hasError
)
{
numErrorGenericCityObject
++;
gcSection
.
setHeadlineColor
(
ERROR_COLOR
);
}
else
{
numOkGenericCityObject
++;
gcSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
co
,
gcSection
);
...
...
@@ -410,7 +423,6 @@ public class PdfStreamReporter implements StreamReporter {
for
(
AbstractFurniture
af
:
ab
.
getBuildingRoomFurnitureList
())
{
writeCheckResultForAbstractFurniture
(
af
,
root
);
}
for
(
Storey
s
:
ab
.
getBuildingStoreys
())
{
writeCheckResultForStorey
(
s
,
root
);
}
...
...
@@ -428,9 +440,14 @@ public class PdfStreamReporter implements StreamReporter {
private
void
writeCheckResultForBridgeObject
(
BridgeObject
bo
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
bo
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
BridgeObject
parts
:
bo
.
getParts
())
{
for
(
BridgeObject
part
:
bo
.
getParts
())
{
if
(
containsError
(
part
))
{
numErrorBridge
++;
}
else
{
numOkBridge
++;
}
sectionMap
.
put
(
bo
.
getGmlId
().
getGmlString
(),
root
);
writeCheckResultForBridgeObject
(
part
s
,
root
);
writeCheckResultForBridgeObject
(
part
,
root
);
}
for
(
Geometry
geom
:
bo
.
getGeometries
())
{
writeCheckResultForGeometry
(
geom
,
root
);
...
...
@@ -503,6 +520,11 @@ public class PdfStreamReporter implements StreamReporter {
Map
<
CheckId
,
CheckResult
>
results
=
at
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
TunnelPart
tp
:
at
.
getTunnelParts
())
{
if
(
containsError
(
tp
))
{
numErrorTunnel
++;
}
else
{
numOkTunnel
++;
}
sectionMap
.
put
(
tp
.
getGmlId
().
getGmlString
(),
root
);
writeCheckResultForAbstractTunnel
(
tp
,
root
);
}
...
...
@@ -639,9 +661,10 @@ public class PdfStreamReporter implements StreamReporter {
@Override
public
void
finishReport
()
throws
CheckReportWriteException
{
if
(
buildings
!=
null
)
{
countFinishedReportBuildings
();
}
//if (buildings != null) {
// countFinishedReportBuildings();
//}
int
numBuildings
=
numErrorBuildings
+
numOkBuildings
;
if
(
numBuildings
>
0
)
{
statistics
.
addDistributionBar
(
"Buildings"
,
numErrorBuildings
,
numOkBuildings
);
...
...
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