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
1ac443c8
Commit
1ac443c8
authored
Mar 13, 2026
by
Luna Riegel
Browse files
Refactor: Restructure and add missing Features
parent
03fbe199
Changes
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/PdfStreamReporter.java
View file @
1ac443c8
...
...
@@ -29,17 +29,29 @@ import java.util.Map.Entry;
import
java.util.Set
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
de.hft.stuttgart.citydoctor2.datastructure.AbstractBridgeObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.AbstractBuilding
;
import
de.hft.stuttgart.citydoctor2.datastructure.AbstractBuildingSubdivision
;
import
de.hft.stuttgart.citydoctor2.datastructure.AbstractConstructiveElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.AbstractConstructiveFillingElement
;
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.BridgeConstructiveElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.BoundedSpace
;
import
de.hft.stuttgart.citydoctor2.datastructure.BridgeObjectPart
;
import
de.hft.stuttgart.citydoctor2.datastructure.BuildingUnit
;
import
de.hft.stuttgart.citydoctor2.datastructure.CityFurniture
;
import
de.hft.stuttgart.citydoctor2.datastructure.ConstructionObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.GenericCityObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.OtherConstructionObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.ReliefObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.Storey
;
import
de.hft.stuttgart.citydoctor2.datastructure.TinObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.TopLevelTransportFeature
;
import
de.hft.stuttgart.citydoctor2.datastructure.TrafficAreaObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.TrafficSpaceObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.TransportationSpace
;
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
;
...
...
@@ -117,6 +129,10 @@ public class PdfStreamReporter implements StreamReporter {
private
int
numErrorLand
;
private
int
numOkLand
;
private
Section
relief
;
private
int
numErrorRelief
;
private
int
numOkRelief
;
private
Section
tunnel
;
private
int
numErrorTunnel
;
private
int
numOkTunnel
;
...
...
@@ -129,6 +145,10 @@ public class PdfStreamReporter implements StreamReporter {
private
int
numErrorGenericCityObject
;
private
int
numOkGenericCityObject
;
private
Section
otherConstruction
;
private
int
numErrorOtherConstruction
;
private
int
numOkOtherConstruction
;
private
Section
globalErrors
;
private
final
Map
<
String
,
Section
>
sectionMap
=
new
HashMap
<>();
...
...
@@ -198,35 +218,41 @@ public class PdfStreamReporter implements StreamReporter {
errorCount
.
incrementAndGet
();
}
boolean
hasError
=
containsError
(
co
);
if
(
co
instanceof
Building
)
{
reportBuilding
(
co
,
hasError
);
}
else
if
(
co
instanceof
Vegetation
)
{
reportVegetation
(
co
,
hasError
);
}
else
if
(
co
instanceof
TransportationObject
)
{
reportTrans
(
co
,
hasError
);
}
else
if
(
co
instanceof
BridgeObject
)
{
reportBridge
(
co
,
hasError
);
}
else
if
(
co
instanceof
WaterObject
)
{
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
);
if
(
co
instanceof
Building
bu
)
{
reportBuilding
(
bu
,
hasError
);
}
else
if
(
co
instanceof
Vegetation
ve
)
{
reportVegetation
(
ve
,
hasError
);
}
else
if
(
co
instanceof
TopLevelTransportFeature
to
)
{
reportTopLevelTransportFeature
(
to
,
hasError
);
}
else
if
(
co
instanceof
TransportationObject
to
){
reportTransportationObject
(
to
,
hasError
);
}
else
if
(
co
instanceof
BridgeObject
bo
)
{
reportBridge
(
bo
,
hasError
);
}
else
if
(
co
instanceof
WaterObject
wo
)
{
reportWater
(
wo
,
hasError
);
}
else
if
(
co
instanceof
LandObject
lo
)
{
reportLand
(
lo
,
hasError
);
}
else
if
(
co
instanceof
ReliefObject
ro
)
{
reportRelief
(
ro
,
hasError
);
}
else
if
(
co
instanceof
Tunnel
tu
)
{
reportTunnel
(
tu
,
hasError
);
}
else
if
(
co
instanceof
CityFurniture
cf
)
{
reportCityFurniture
(
cf
,
hasError
);
}
else
if
(
co
instanceof
GenericCityObject
gc
)
{
reportGenericCityObject
(
gc
,
hasError
);
}
else
if
(
co
instanceof
OtherConstructionObject
ot
)
{
reportOtherConstructionObject
(
ot
,
hasError
);
}
else
{
throw
new
IllegalStateException
(
"Unknown City Object found: "
+
co
.
getClass
());
}
}
private
void
reportLand
(
City
Object
c
o
,
boolean
hasError
)
{
private
void
reportLand
(
Land
Object
l
o
,
boolean
hasError
)
{
if
(
land
==
null
)
{
land
=
vr
.
createSubSection
(
"Land Objects"
);
}
Section
lSection
=
land
.
createSubSection
(
c
o
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
c
o
.
getGmlId
().
getGmlString
(),
lSection
);
Section
lSection
=
land
.
createSubSection
(
l
o
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
l
o
.
getGmlId
().
getGmlString
(),
lSection
);
if
(
hasError
)
{
numErrorLand
++;
lSection
.
setHeadlineColor
(
ERROR_COLOR
);
...
...
@@ -234,15 +260,15 @@ public class PdfStreamReporter implements StreamReporter {
numOkLand
++;
lSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
c
o
,
lSection
);
writeErrorForCityObject
(
l
o
,
lSection
);
}
private
void
reportWater
(
City
Object
c
o
,
boolean
hasError
)
{
private
void
reportWater
(
Water
Object
w
o
,
boolean
hasError
)
{
if
(
water
==
null
)
{
water
=
vr
.
createSubSection
(
"Water Objects"
);
}
Section
wSection
=
water
.
createSubSection
(
c
o
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
c
o
.
getGmlId
().
getGmlString
(),
wSection
);
Section
wSection
=
water
.
createSubSection
(
w
o
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
w
o
.
getGmlId
().
getGmlString
(),
wSection
);
if
(
hasError
)
{
numErrorWater
++;
wSection
.
setHeadlineColor
(
ERROR_COLOR
);
...
...
@@ -250,15 +276,16 @@ public class PdfStreamReporter implements StreamReporter {
numOkWater
++;
wSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
co
,
wSection
);
writeErrorForCityObject
(
wo
,
wSection
);
writeCheckResultForBoundedSpace
(
wo
,
wSection
);
}
private
void
reportBridge
(
City
Object
c
o
,
boolean
hasError
)
{
private
void
reportBridge
(
Bridge
Object
b
o
,
boolean
hasError
)
{
if
(
bridge
==
null
)
{
bridge
=
vr
.
createSubSection
(
"Bridge Objects"
);
}
Section
bSection
=
bridge
.
createSubSection
(
c
o
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
c
o
.
getGmlId
().
getGmlString
(),
bSection
);
Section
bSection
=
bridge
.
createSubSection
(
b
o
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
b
o
.
getGmlId
().
getGmlString
(),
bSection
);
if
(
hasError
)
{
numErrorBridge
++;
bSection
.
setHeadlineColor
(
ERROR_COLOR
);
...
...
@@ -266,17 +293,25 @@ public class PdfStreamReporter implements StreamReporter {
numOkBridge
++;
bSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
co
,
bSection
);
BridgeObject
bo
=
(
BridgeObject
)
co
;
writeCheckResultForBridgeObject
(
bo
,
bSection
);
writeCheckResultForAbstractBridgeObject
(
bo
,
bSection
);
for
(
BridgeObjectPart
part
:
bo
.
getParts
())
{
if
(
containsError
(
part
))
{
numErrorBridge
++;
}
else
{
numOkBridge
++;
}
sectionMap
.
put
(
bo
.
getGmlId
().
getGmlString
(),
bSection
);
writeCheckResultForAbstractBridgeObject
(
part
,
bSection
);
}
}
private
void
reportTrans
(
City
Object
c
o
,
boolean
hasError
)
{
private
Section
setupTransportationHeader
(
Transportation
Object
t
o
,
boolean
hasError
)
{
if
(
trans
==
null
)
{
trans
=
vr
.
createSubSection
(
"Transportation Objects"
);
}
Section
tSection
=
trans
.
createSubSection
(
c
o
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
c
o
.
getGmlId
().
getGmlString
(),
tSection
);
Section
tSection
=
trans
.
createSubSection
(
t
o
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
t
o
.
getGmlId
().
getGmlString
(),
tSection
);
if
(
hasError
)
{
numErrorTrans
++;
tSection
.
setHeadlineColor
(
ERROR_COLOR
);
...
...
@@ -284,15 +319,25 @@ public class PdfStreamReporter implements StreamReporter {
numOkTrans
++;
tSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
co
,
tSection
)
;
return
tSection
;
}
private
void
reportVegetation
(
CityObject
co
,
boolean
hasError
)
{
private
void
reportTopLevelTransportFeature
(
TopLevelTransportFeature
top
,
boolean
hasError
)
{
Section
tSection
=
setupTransportationHeader
(
top
,
hasError
);
writeCheckResultForTopLevelTransport
(
top
,
tSection
);
}
private
void
reportTransportationObject
(
TransportationObject
to
,
boolean
hasError
)
{
Section
tSection
=
setupTransportationHeader
(
to
,
hasError
);
writeCheckResultForTransportationObject
(
to
,
tSection
);
}
private
void
reportVegetation
(
Vegetation
ve
,
boolean
hasError
)
{
if
(
vegetation
==
null
)
{
vegetation
=
vr
.
createSubSection
(
"Vegetation"
);
}
Section
vSection
=
vegetation
.
createSubSection
(
co
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
co
.
getGmlId
().
getGmlString
(),
vSection
);
Section
vSection
=
vegetation
.
createSubSection
(
ve
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
ve
.
getGmlId
().
getGmlString
(),
vSection
);
if
(
hasError
)
{
numErrorVegetation
++;
vSection
.
setHeadlineColor
(
ERROR_COLOR
);
...
...
@@ -300,15 +345,16 @@ public class PdfStreamReporter implements StreamReporter {
numOkVegetation
++;
vSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
co
,
vSection
);
writeErrorForCityObject
(
ve
,
vSection
);
writeCheckResultForBoundedSpace
(
ve
,
vSection
);
}
private
void
reportBuilding
(
CityObject
co
,
boolean
hasError
)
{
private
void
reportBuilding
(
Building
bu
,
boolean
hasError
)
{
if
(
buildings
==
null
)
{
buildings
=
vr
.
createSubSection
(
"Buildings"
);
}
Section
bSection
=
buildings
.
createSubSection
(
co
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
co
.
getGmlId
().
getGmlString
(),
bSection
);
Section
bSection
=
buildings
.
createSubSection
(
bu
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
bu
.
getGmlId
().
getGmlString
(),
bSection
);
if
(
hasError
)
{
numErrorBuildings
++;
bSection
.
setHeadlineColor
(
ERROR_COLOR
);
...
...
@@ -316,9 +362,8 @@ public class PdfStreamReporter implements StreamReporter {
numOkBuildings
++;
bSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
co
,
bSection
);
Building
b
=
(
Building
)
co
;
for
(
BuildingPart
bp
:
b
.
getBuildingParts
())
{
writeCheckResultForAbstractBuilding
(
bu
,
bSection
);
for
(
BuildingPart
bp
:
bu
.
getBuildingParts
())
{
if
(
containsError
(
bp
))
{
numErrorBuildings
++;
}
else
{
...
...
@@ -327,15 +372,31 @@ public class PdfStreamReporter implements StreamReporter {
sectionMap
.
put
(
bp
.
getGmlId
().
getGmlString
(),
bSection
);
writeCheckResultForAbstractBuilding
(
bp
,
bSection
);
}
writeCheckResultForAbstractBuilding
(
b
,
bSection
);
}
private
void
reportTunnel
(
CityObject
co
,
boolean
hasError
)
{
private
void
reportRelief
(
ReliefObject
ro
,
boolean
hasError
)
{
if
(
relief
==
null
)
{
relief
=
vr
.
createSubSection
(
"Relief objects"
);
}
Section
lSection
=
relief
.
createSubSection
(
ro
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
ro
.
getGmlId
().
getGmlString
(),
lSection
);
if
(
hasError
)
{
numErrorRelief
++;
lSection
.
setHeadlineColor
(
ERROR_COLOR
);
}
else
{
numOkRelief
++;
lSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeCheckResultForRelief
(
ro
,
lSection
);
}
private
void
reportTunnel
(
Tunnel
tu
,
boolean
hasError
)
{
if
(
tunnel
==
null
)
{
tunnel
=
vr
.
createSubSection
(
"Tunnel"
);
}
Section
tSection
=
tunnel
.
createSubSection
(
co
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
co
.
getGmlId
().
getGmlString
(),
tSection
);
Section
tSection
=
tunnel
.
createSubSection
(
tu
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
tu
.
getGmlId
().
getGmlString
(),
tSection
);
if
(
hasError
)
{
numErrorTunnel
++;
tSection
.
setHeadlineColor
(
ERROR_COLOR
);
...
...
@@ -343,17 +404,25 @@ public class PdfStreamReporter implements StreamReporter {
numOkTunnel
++;
tSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
co
,
tSection
);
Tunnel
t
=
(
Tunnel
)
co
;
writeCheckResultForAbstractTunnel
(
t
,
tSection
);
writeCheckResultForAbstractTunnel
(
tu
,
tSection
);
for
(
TunnelPart
tp
:
tu
.
getTunnelParts
())
{
if
(
containsError
(
tp
))
{
numErrorTunnel
++;
}
else
{
numOkTunnel
++;
}
sectionMap
.
put
(
tp
.
getGmlId
().
getGmlString
(),
tSection
);
writeCheckResultForAbstractTunnel
(
tp
,
tSection
);
}
}
private
void
reportCityFurniture
(
City
Object
c
o
,
boolean
hasError
)
{
private
void
reportCityFurniture
(
City
Furniture
c
f
,
boolean
hasError
)
{
if
(
cityFurniture
==
null
)
{
cityFurniture
=
vr
.
createSubSection
(
"City
F
urniture"
);
cityFurniture
=
vr
.
createSubSection
(
"City
f
urniture"
);
}
Section
cfSection
=
cityFurniture
.
createSubSection
(
c
o
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
c
o
.
getGmlId
().
getGmlString
(),
cfSection
);
Section
cfSection
=
cityFurniture
.
createSubSection
(
c
f
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
c
f
.
getGmlId
().
getGmlString
(),
cfSection
);
if
(
hasError
)
{
numErrorCityFurniture
++;
cfSection
.
setHeadlineColor
(
ERROR_COLOR
);
...
...
@@ -361,15 +430,16 @@ public class PdfStreamReporter implements StreamReporter {
numOkCityFurniture
++;
cfSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
co
,
cfSection
);
writeErrorForCityObject
(
cf
,
cfSection
);
writeCheckResultForBoundedSpace
(
cf
,
cfSection
);
}
private
void
reportGenericCityObject
(
CityObject
c
o
,
boolean
hasError
)
{
private
void
reportGenericCityObject
(
Generic
CityObject
g
c
,
boolean
hasError
)
{
if
(
genericCityObject
==
null
)
{
genericCityObject
=
vr
.
createSubSection
(
"GenericCityObject"
);
genericCityObject
=
vr
.
createSubSection
(
"Generic
CityObject
s
"
);
}
Section
gcSection
=
genericCityObject
.
createSubSection
(
c
o
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
c
o
.
getGmlId
().
getGmlString
(),
gcSection
);
Section
gcSection
=
genericCityObject
.
createSubSection
(
g
c
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
g
c
.
getGmlId
().
getGmlString
(),
gcSection
);
if
(
hasError
)
{
numErrorGenericCityObject
++;
gcSection
.
setHeadlineColor
(
ERROR_COLOR
);
...
...
@@ -377,177 +447,129 @@ public class PdfStreamReporter implements StreamReporter {
numOkGenericCityObject
++;
gcSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
co
,
gcSection
);
writeErrorForCityObject
(
gc
,
gcSection
);
writeCheckResultForBoundedSpace
(
gc
,
gcSection
);
}
private
void
reportOtherConstructionObject
(
OtherConstructionObject
oc
,
boolean
hasError
)
{
if
(
otherConstruction
==
null
)
{
otherConstruction
=
vr
.
createSubSection
(
"Other construction objects"
);
}
Section
ocSection
=
otherConstruction
.
createSubSection
(
oc
.
getGmlId
().
getGmlString
());
sectionMap
.
put
(
oc
.
getGmlId
().
getGmlString
(),
ocSection
);
if
(
hasError
)
{
numErrorOtherConstruction
++;
ocSection
.
setHeadlineColor
(
ERROR_COLOR
);
}
else
{
numOkOtherConstruction
++;
ocSection
.
setHeadlineColor
(
OK_COLOR
);
}
writeErrorForCityObject
(
oc
,
ocSection
);
writeCheckResultForBoundedSpace
(
oc
,
ocSection
);
}
private
void
writeCheckResultForInstallation
(
Installation
bi
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
bi
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
BoundarySurface
bs
:
bi
.
getBoundarySurfaces
())
{
writeCheckResultForBoundarySurface
(
bs
,
root
);
}
writeCheckResultForBoundedSpace
(
bi
,
root
);
}
private
void
writeCheckResultForAbstractBuilding
(
AbstractBuilding
ab
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
ab
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
Geometry
geom
:
ab
.
getGeometries
())
{
writeCheckResultForGeometry
(
geom
,
root
);
}
for
(
AbstractRoom
ar
:
ab
.
getBuildingRooms
())
{
writeCheckResultForRoom
(
ar
,
root
);
}
for
(
AbstractFurniture
af
:
ab
.
getBuildingRoomFurnitureList
())
{
writeCheckResultForAbstractFurniture
(
af
,
root
);
}
for
(
Storey
s
:
ab
.
getBuildingStoreys
())
{
writeCheckResultForStorey
(
s
,
root
);
}
for
(
BuildingUnit
bu
:
ab
.
getBuildingUnits
())
{
writeCheckResultForBuildingUnit
(
bu
,
root
);
}
for
(
BoundarySurface
bs
:
ab
.
getBoundarySurfaces
())
{
private
void
writeCheckResultForBoundedSpace
(
BoundedSpace
space
,
Section
root
)
{
for
(
BoundarySurface
bs:
space
.
getBoundarySurfaces
())
{
writeCheckResultForBoundarySurface
(
bs
,
root
);
}
for
(
Installation
bi
:
ab
.
getBuildingInstallations
())
{
writeCheckResultForInstallation
(
bi
,
root
);
}
}
private
void
writeCheckResultForBridgeObject
(
BridgeObject
bo
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
bo
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
BridgeObject
part
:
bo
.
getParts
())
{
if
(
containsError
(
part
))
{
numErrorBridge
++;
}
else
{
numOkBridge
++;
}
sectionMap
.
put
(
bo
.
getGmlId
().
getGmlString
(),
root
);
writeCheckResultForBridgeObject
(
part
,
root
);
}
for
(
Geometry
geom
:
bo
.
getGeometries
())
{
writeCheckResultForGeometry
(
geom
,
root
);
private
void
writeCheckResultForConstructionObject
(
ConstructionObject
con
,
Section
root
)
{
writeCheckResultForBoundedSpace
(
con
,
root
);
for
(
BoundarySurface
bs
:
con
.
getBoundarySurfaces
())
{
writeCheckResultForBoundarySurface
(
bs
,
root
);
}
for
(
AbstractRoom
ar
:
bo
.
get
Bridge
Rooms
())
{
for
(
AbstractRoom
ar
:
con
.
getRooms
())
{
writeCheckResultForRoom
(
ar
,
root
);
}
for
(
AbstractFurniture
af
:
bo
.
get
Bridge
Furniture
())
{
for
(
AbstractFurniture
af
:
con
.
getFurniture
())
{
writeCheckResultForAbstractFurniture
(
af
,
root
);
}
for
(
Bridge
ConstructiveElement
b
ce
:
bo
.
getConstructiveElements
())
{
writeCheckResultFor
Bridge
ConstructiveElement
(
b
ce
,
root
);
for
(
Abstract
ConstructiveElement
a
ce:
con
.
getConstructiveElements
()){
writeCheckResultFor
Abstract
ConstructiveElement
(
a
ce
,
root
);
}
for
(
BoundarySurface
bs
:
bo
.
getBoundarySurfaces
())
{
writeCheckResultForBoundarySurface
(
bs
,
root
);
}
for
(
Installation
bi
:
bo
.
getBridgeInstallations
())
{
writeCheckResultForInstallation
(
bi
,
root
);
for
(
Installation
inst
:
con
.
getInstallations
())
{
writeCheckResultForInstallation
(
inst
,
root
);
}
}
private
void
writeCheckResultFor
Storey
(
Storey
s
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
s
.
getAllCheckResults
();
private
void
writeCheckResultFor
AbstractConstructiveElement
(
AbstractConstructiveElement
ace
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
ace
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
Geometry
geom
:
s
.
getGeometries
())
{
for
(
Geometry
geom
:
ace
.
getGeometries
())
{
writeCheckResultForGeometry
(
geom
,
root
);
}
for
(
AbstractRoom
ar
:
s
.
getBuildingRooms
())
{
writeCheckResultForRoom
(
ar
,
root
);
}
for
(
BuildingUnit
bu
:
s
.
getBuildingUnits
())
{
writeCheckResultForBuildingUnit
(
bu
,
root
);
}
for
(
AbstractFurniture
af
:
s
.
getBuildingRoomFurnitureList
())
{
writeCheckResultForAbstractFurniture
(
af
,
root
);
}
for
(
BoundarySurface
bs
:
s
.
getBoundarySurfaces
())
{
writeCheckResultForBoundarySurface
(
bs
,
root
);
}
for
(
Installation
bi
:
s
.
getBuildingInstallations
())
{
writeCheckResultForInstallation
(
bi
,
root
);
for
(
AbstractConstructiveFillingElement
fill
:
ace
.
getFillings
()){
writeCheckResultForFillingElement
(
fill
,
root
);
}
writeCheckResultForBoundedSpace
(
ace
,
root
);
}
private
void
writeCheckResultFor
Bu
il
d
ing
Unit
(
Bu
il
d
ing
Unit
bu
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
bu
.
getAllCheckResults
();
private
void
writeCheckResultFor
F
il
l
ing
Element
(
AbstractConstructiveF
il
l
ing
Element
fill
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
fill
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
Geometry
geom
:
bu
.
getGeometries
())
{
for
(
Geometry
geom
:
fill
.
getGeometries
())
{
writeCheckResultForGeometry
(
geom
,
root
);
}
for
(
AbstractRoom
ar
:
bu
.
getBuildingRooms
())
{
writeCheckResultForRoom
(
ar
,
root
);
}
for
(
Storey
s
:
bu
.
getStoreys
())
{
writeCheckResultForBoundedSpace
(
fill
,
root
);
}
private
void
writeCheckResultForAbstractBuilding
(
AbstractBuilding
ab
,
Section
root
)
{
writeErrorForCityObject
(
ab
,
root
);
writeCheckResultForConstructionObject
(
ab
,
root
);
for
(
Storey
s
:
ab
.
getStoreys
())
{
writeCheckResultForStorey
(
s
,
root
);
}
for
(
AbstractFurniture
af
:
bu
.
getBuildingRoomFurnitureList
())
{
writeCheckResultForAbstractFurniture
(
af
,
root
);
}
for
(
BoundarySurface
bs
:
bu
.
getBoundarySurfaces
())
{
writeCheckResultForBoundarySurface
(
bs
,
root
);
}
for
(
Installation
bi
:
bu
.
getBuildingInstallations
())
{
writeCheckResultForInstallation
(
bi
,
root
);
for
(
BuildingUnit
bu
:
ab
.
getBuildingUnits
())
{
writeCheckResultForBuildingUnit
(
bu
,
root
);
}
}
private
void
writeCheckResultForAbstractTunnel
(
AbstractTunnel
at
,
Section
root
)
{
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
);
}
for
(
Geometry
geom
:
at
.
getGeometries
())
{
writeCheckResultForGeometry
(
geom
,
root
);
}
for
(
AbstractRoom
ar
:
at
.
getTunnelHollows
())
{
writeCheckResultForRoom
(
ar
,
root
);
}
for
(
TunnelConstructiveElement
te
:
at
.
getTunnelConstructiveElements
())
{
writeCheckResultForTunnelConstructiveElement
(
te
,
root
);
}
for
(
AbstractFurniture
tf
:
at
.
getTunnelFurniture
())
{
writeCheckResultForAbstractFurniture
(
tf
,
root
);
}
for
(
BoundarySurface
bs
:
at
.
getBoundarySurfaces
())
{
writeCheckResultForBoundarySurface
(
bs
,
root
);
}
for
(
Installation
bi
:
at
.
getTunnelInstallations
())
{
writeCheckResultForInstallation
(
bi
,
root
);
private
void
writeCheckResultForRelief
(
ReliefObject
ro
,
Section
root
)
{
writeErrorForCityObject
(
ro
,
root
);
for
(
TinObject
to:
ro
.
getComponents
())
{
writeErrorForCityObject
(
to
,
root
);
}
}
private
void
writeCheckResultForTunnelConstructiveElement
(
TunnelConstructiveElement
te
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
te
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
Geometry
geom
:
te
.
getGeometries
())
{
writeCheckResultForGeometry
(
geom
,
root
);
}
for
(
BoundarySurface
bs
:
te
.
getBoundarySurfaces
())
{
writeCheckResultForBoundarySurface
(
bs
,
root
);
}
private
void
writeCheckResultForAbstractBridgeObject
(
AbstractBridgeObject
bo
,
Section
root
)
{
writeErrorForCityObject
(
bo
,
root
);
writeCheckResultForConstructionObject
(
bo
,
root
);
}
private
void
writeCheckResultForBridgeConstructiveElement
(
BridgeConstructiveElement
bce
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
bce
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
Geometry
geom
:
bce
.
getGeometries
())
{
writeCheckResultForGeometry
(
geom
,
root
);
private
void
writeCheckResultForAbstractBuildingSubdivision
(
AbstractBuildingSubdivision
abs
,
Section
root
)
{
writeErrorForCityObject
(
abs
,
root
);
writeCheckResultForConstructionObject
(
abs
,
root
);
}
private
void
writeCheckResultForStorey
(
Storey
s
,
Section
root
)
{
writeCheckResultForAbstractBuildingSubdivision
(
s
,
root
);
for
(
BuildingUnit
bu
:
s
.
getBuildingUnits
())
{
writeCheckResultForAbstractBuildingSubdivision
(
bu
,
root
);
}
for
(
BoundarySurface
bs
:
bce
.
getBoundarySurfaces
())
{
writeCheckResultForBoundarySurface
(
bs
,
root
);
}
private
void
writeCheckResultForBuildingUnit
(
BuildingUnit
bu
,
Section
root
)
{
writeCheckResultForAbstractBuildingSubdivision
(
bu
,
root
);
for
(
Storey
s
:
bu
.
getStoreys
())
{
writeCheckResultForAbstractBuildingSubdivision
(
s
,
root
);
}
}
private
void
writeCheckResultForAbstractTunnel
(
AbstractTunnel
at
,
Section
root
)
{
writeErrorForCityObject
(
at
,
root
);
writeCheckResultForConstructionObject
(
at
,
root
);
}
private
void
writeErrorForCityObject
(
CityObject
co
,
Section
section
)
{
Map
<
CheckId
,
CheckResult
>
results
=
co
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
section
);
...
...
@@ -557,35 +579,55 @@ public class PdfStreamReporter implements StreamReporter {
}
private
void
writeCheckResultForBoundarySurface
(
BoundarySurface
bs
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
bs
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
writeErrorForCityObject
(
bs
,
root
);
for
(
Opening
o
:
bs
.
getOpenings
())
{
writeCheckResultForOpening
(
o
,
root
);
}
}
private
void
writeCheckResultForAbstractFurniture
(
AbstractFurniture
af
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
af
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
Geometry
geom
:
af
.
getGeometries
())
{
writeCheckResultForGeometry
(
geom
,
root
);
writeErrorForCityObject
(
af
,
root
);
writeCheckResultForBoundedSpace
(
af
,
root
);
}
private
void
writeCheckResultForRoom
(
AbstractRoom
ar
,
Section
root
)
{
writeErrorForCityObject
(
ar
,
root
);
writeCheckResultForBoundedSpace
(
ar
,
root
);
for
(
Installation
in
:
ar
.
getInstallations
())
{
writeCheckResultForInstallation
(
in
,
root
);
}
for
(
BoundarySurface
bs
:
af
.
getBoundarySurfaces
())
{
writeCheckResultForBoundarySurface
(
bs
,
root
);
}
private
void
writeCheckResultForTransportationObject
(
TransportationObject
to
,
Section
root
)
{
writeErrorForCityObject
(
to
,
root
);
writeCheckResultForBoundedSpace
(
to
,
root
);
}
private
void
writeCheckResultForTopLevelTransport
(
TopLevelTransportFeature
top
,
Section
root
)
{
writeCheckResultForTransportationSpace
(
top
,
root
);
for
(
TransportationSpace
ts
:
top
.
getSections
()){
writeCheckResultForTransportationSpace
(
ts
,
root
);
}
for
(
TransportationSpace
tis:
top
.
getIntersections
()){
writeCheckResultForTransportationSpace
(
tis
,
root
);
}
}
private
void
writeCheckResultForRoom
(
AbstractRoom
ar
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
ar
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
Geometry
geom
:
ar
.
getGeometries
())
{
writeCheckResultForGeometry
(
geom
,
root
);
private
void
writeCheckResultForTransportationSpace
(
TransportationSpace
ts
,
Section
root
)
{
writeCheckResultForTransportationObject
(
ts
,
root
);
for
(
TrafficSpaceObject
tso
:
ts
.
getTrafficSpaces
())
{
writeCheckResultForTrafficSpace
(
tso
,
root
);
}
for
(
Installation
in
:
ar
.
get
RoomInstallation
s
())
{
writeCheckResultFor
Installation
(
in
,
root
);
for
(
TrafficSpaceObject
atso
:
ts
.
get
AuxTrafficSpace
s
()){
writeCheckResultFor
TrafficSpace
(
atso
,
root
);
}
for
(
BoundarySurface
bs
:
ar
.
getBoundarySurfaces
())
{
writeCheckResultForBoundarySurface
(
bs
,
root
);
}
private
void
writeCheckResultForTrafficSpace
(
TrafficSpaceObject
tso
,
Section
root
)
{
writeCheckResultForTransportationObject
(
tso
,
root
);
for
(
TrafficAreaObject
tao
:
tso
.
getTrafficAreas
()){
writeCheckResultForTransportationObject
(
tao
,
root
);
}
}
...
...
@@ -667,6 +709,11 @@ public class PdfStreamReporter implements StreamReporter {
statistics
.
addDistributionBar
(
"Water Objects"
,
numErrorWater
,
numOkWater
);
}
int
numRelief
=
numErrorRelief
+
numOkRelief
;
if
(
numRelief
>
0
)
{
statistics
.
addDistributionBar
(
"Relief Objects"
,
numErrorRelief
,
numOkRelief
);
}
int
numLand
=
numErrorLand
+
numOkLand
;
if
(
numLand
>
0
)
{
statistics
.
addDistributionBar
(
"Land Objects"
,
numErrorLand
,
numOkLand
);
...
...
@@ -687,6 +734,11 @@ public class PdfStreamReporter implements StreamReporter {
statistics
.
addDistributionBar
(
"Generic City Objects"
,
numErrorGenericCityObject
,
numOkGenericCityObject
);
}
int
numOtherConstructionObjects
=
numErrorOtherConstruction
+
numOkOtherConstruction
;
if
(
numOtherConstructionObjects
>
0
)
{
statistics
.
addDistributionBar
(
"Other Construction"
,
numErrorOtherConstruction
,
numOkOtherConstruction
);
}
statistics
.
addTextElement
(
"Error Statistics:"
);
for
(
Entry
<
ErrorId
,
AtomicInteger
>
e
:
errorStatistics
.
entrySet
())
{
statistics
.
add10PtTextElement
(
e
.
getKey
().
toString
()
+
": "
+
e
.
getValue
().
intValue
(),
10
);
...
...
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