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
02c78271
Commit
02c78271
authored
1 month ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Fix: Add missing Building subfeatures to Pdf reporter
parent
261e35aa
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
+144
-7
...tuttgart/citydoctor2/reporting/pdf/PdfStreamReporter.java
with
144 additions
and
7 deletions
+144
-7
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/PdfStreamReporter.java
+
144
-
7
View file @
02c78271
...
...
@@ -29,6 +29,11 @@ import java.util.Map.Entry;
import
java.util.Set
;
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.BuildingUnit
;
import
de.hft.stuttgart.citydoctor2.datastructure.Storey
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -290,14 +295,9 @@ public class PdfStreamReporter implements StreamReporter {
Building
b
=
(
Building
)
co
;
for
(
BuildingPart
bp
:
b
.
getBuildingParts
())
{
sectionMap
.
put
(
bp
.
getGmlId
().
getGmlString
(),
bSection
);
writeCheckResultForBuildingPart
(
bp
,
bSection
);
}
for
(
BoundarySurface
bs
:
b
.
getBoundarySurfaces
())
{
writeCheckResultForBoundarySurface
(
bs
,
bSection
);
}
for
(
Installation
bi
:
b
.
getBuildingInstallations
())
{
writeCheckResultForInstallation
(
bi
,
bSection
);
writeCheckResultForAbstractBuilding
(
bp
,
bSection
);
}
writeCheckResultForAbstractBuilding
(
b
,
bSection
);
}
private
void
writeCheckResultForInstallation
(
Installation
bi
,
Section
root
)
{
...
...
@@ -327,6 +327,118 @@ public class PdfStreamReporter implements StreamReporter {
}
}
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
())
{
writeCheckResultForBoundarySurface
(
bs
,
root
);
}
for
(
Installation
bi
:
ab
.
getBuildingInstallations
())
{
writeCheckResultForInstallation
(
bi
,
root
);
}
}
private
void
writeCheckResultForStorey
(
Storey
s
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
s
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
Geometry
geom
:
s
.
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
);
}
}
private
void
writeCheckResultForBuildingUnit
(
BuildingUnit
bu
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
bu
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
Geometry
geom
:
bu
.
getGeometries
())
{
writeCheckResultForGeometry
(
geom
,
root
);
}
for
(
AbstractRoom
ar
:
bu
.
getBuildingRooms
())
{
writeCheckResultForRoom
(
ar
,
root
);
}
for
(
Storey
s
:
bu
.
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
);
}
}
private
void
writeCheckResultForAbstractTunnel
(
AbstractTunnel
at
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
at
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
root
);
for
(
TunnelPart
tp
:
at
.
getTunnelParts
())
{
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
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
writeErrorForCityObject
(
CityObject
co
,
Section
section
)
{
Map
<
CheckId
,
CheckResult
>
results
=
co
.
getAllCheckResults
();
writeCheckResults
(
results
.
values
(),
section
);
...
...
@@ -343,6 +455,31 @@ public class PdfStreamReporter implements StreamReporter {
}
}
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
);
}
for
(
BoundarySurface
bs
:
af
.
getBoundarySurfaceList
())
{
writeCheckResultForBoundarySurface
(
bs
,
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
);
}
for
(
Installation
in
:
ar
.
getRoomInstallations
())
{
writeCheckResultForInstallation
(
in
,
root
);
}
for
(
BoundarySurface
bs
:
ar
.
getBoundarySurfaces
())
{
writeCheckResultForBoundarySurface
(
bs
,
root
);
}
}
private
void
writeCheckResultForOpening
(
Opening
o
,
Section
root
)
{
Map
<
CheckId
,
CheckResult
>
results
=
o
.
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