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
3f3f5672
Commit
3f3f5672
authored
Apr 15, 2025
by
Riegel
Browse files
Refactor: Implement prepareForChecking with Visitor
parent
67214f92
Changes
29
Show whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/Checkable.java
View file @
3f3f5672
...
@@ -92,7 +92,9 @@ public abstract class Checkable implements Serializable {
...
@@ -92,7 +92,9 @@ public abstract class Checkable implements Serializable {
* method has been enabled. This should create edges and additional meta
* method has been enabled. This should create edges and additional meta
* information necessary to perform checks.
* information necessary to perform checks.
*/
*/
public
abstract
void
prepareForChecking
();
public
void
prepareForChecking
()
{
this
.
accept
(
new
PrepareForCheckingVisitor
());
}
/**
/**
* This should be called after checking has been done. This should remove any
* This should be called after checking has been done. This should remove any
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractBuilding.java
View file @
3f3f5672
...
@@ -387,29 +387,6 @@ public abstract class AbstractBuilding extends CityObject {
...
@@ -387,29 +387,6 @@ public abstract class AbstractBuilding extends CityObject {
return
buildingUnits
;
return
buildingUnits
;
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
prepareForChecking
();
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
prepareForChecking
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
prepareForChecking
();
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
prepareForChecking
();
}
for
(
Storey
storey
:
buildingStoreys
)
{
storey
.
prepareForChecking
();
}
for
(
BuildingUnit
bu
:
buildingUnits
)
{
bu
.
prepareForChecking
();
}
}
@Override
@Override
public
void
clearMetaInformation
()
{
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
super
.
clearMetaInformation
();
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractBuildingSubdivision.java
View file @
3f3f5672
...
@@ -302,22 +302,6 @@ public abstract class AbstractBuildingSubdivision extends CityObject {
...
@@ -302,22 +302,6 @@ public abstract class AbstractBuildingSubdivision extends CityObject {
return
buildingRoomFurnitureList
;
return
buildingRoomFurnitureList
;
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
prepareForChecking
();
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
prepareForChecking
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
prepareForChecking
();
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
prepareForChecking
();
}
}
@Override
@Override
public
void
clearMetaInformation
()
{
public
void
clearMetaInformation
()
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractFurniture.java
View file @
3f3f5672
...
@@ -183,14 +183,6 @@ public abstract class AbstractFurniture extends CityObject {
...
@@ -183,14 +183,6 @@ public abstract class AbstractFurniture extends CityObject {
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
prepareForChecking
();
}
}
@Override
@Override
public
void
clearMetaInformation
()
{
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
super
.
clearMetaInformation
();
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractRoom.java
View file @
3f3f5672
...
@@ -175,17 +175,6 @@ public abstract class AbstractRoom extends CityObject {
...
@@ -175,17 +175,6 @@ public abstract class AbstractRoom extends CityObject {
cgmlRoom
.
setLod3Solid
(
null
);
cgmlRoom
.
setLod3Solid
(
null
);
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
prepareForChecking
();
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
prepareForChecking
();
}
}
@Override
@Override
public
void
clearMetaInformation
()
{
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
super
.
clearMetaInformation
();
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractTunnel.java
View file @
3f3f5672
...
@@ -368,28 +368,6 @@ public abstract class AbstractTunnel extends CityObject {
...
@@ -368,28 +368,6 @@ public abstract class AbstractTunnel extends CityObject {
return
tunnelConstructiveElements
;
return
tunnelConstructiveElements
;
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
Installation
bi
:
tunnelInstallations
)
{
bi
.
prepareForChecking
();
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
prepareForChecking
();
}
for
(
TunnelHollow
th
:
tunnelHollows
)
{
th
.
prepareForChecking
();
}
for
(
TunnelFurniture
tfr
:
tunnelFurnitureList
)
{
tfr
.
prepareForChecking
();
}
for
(
TunnelConstructiveElement
te
:
tunnelConstructiveElements
)
{
te
.
prepareForChecking
();
}
for
(
TunnelPart
tp
:
tunnelParts
)
{
tp
.
prepareForChecking
();
}
}
@Override
@Override
public
void
clearMetaInformation
()
{
public
void
clearMetaInformation
()
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BoundarySurface.java
View file @
3f3f5672
...
@@ -256,13 +256,6 @@ public class BoundarySurface extends CityObject {
...
@@ -256,13 +256,6 @@ public class BoundarySurface extends CityObject {
opening
.
setPartOfSurface
(
this
);
opening
.
setPartOfSurface
(
this
);
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
Opening
o
:
openings
)
{
o
.
prepareForChecking
();
}
}
@Override
@Override
public
void
clearMetaInformation
()
{
public
void
clearMetaInformation
()
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeConstructiveElement.java
View file @
3f3f5672
...
@@ -274,13 +274,6 @@ public class BridgeConstructiveElement extends CityObject {
...
@@ -274,13 +274,6 @@ public class BridgeConstructiveElement extends CityObject {
return
boundarySurfaceList
;
return
boundarySurfaceList
;
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
prepareForChecking
();
}
}
@Override
@Override
public
void
clearMetaInformation
()
{
public
void
clearMetaInformation
()
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeObject.java
View file @
3f3f5672
...
@@ -415,32 +415,6 @@ public class BridgeObject extends CityObject {
...
@@ -415,32 +415,6 @@ public class BridgeObject extends CityObject {
return
"BridgeObject [type="
+
type
+
", id="
+
getGmlId
()
+
"]"
;
return
"BridgeObject [type="
+
type
+
", id="
+
getGmlId
()
+
"]"
;
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
BridgeConstructiveElement
e
:
elements
)
{
e
.
prepareForChecking
();
}
for
(
BridgeObject
part
:
parts
)
{
part
.
prepareForChecking
();
}
for
(
BoundarySurface
bs
:
boundarySurfaces
)
{
bs
.
prepareForChecking
();
}
for
(
Installation
bi
:
bridgeInstallations
)
{
bi
.
prepareForChecking
();
}
for
(
BridgeObject
part
:
parts
)
{
part
.
prepareForChecking
();
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
br
.
prepareForChecking
();
}
for
(
BridgeRoomFurniture
bri
:
bridgeFurniture
)
{
bri
.
prepareForChecking
();
}
}
@Override
@Override
public
void
clearMetaInformation
()
{
public
void
clearMetaInformation
()
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Building.java
View file @
3f3f5672
...
@@ -146,14 +146,6 @@ public class Building extends AbstractBuilding {
...
@@ -146,14 +146,6 @@ public class Building extends AbstractBuilding {
}
}
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
BuildingPart
part
:
buildingParts
)
{
part
.
prepareForChecking
();
}
}
@Override
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
super
.
fillValues
(
original
,
handler
);
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingUnit.java
View file @
3f3f5672
...
@@ -86,14 +86,6 @@ public class BuildingUnit extends AbstractBuildingSubdivision {
...
@@ -86,14 +86,6 @@ public class BuildingUnit extends AbstractBuildingSubdivision {
return
false
;
return
false
;
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
Storey
storey
:
storeys
)
{
storey
.
prepareForChecking
();
}
}
@Override
@Override
public
void
clearMetaInformation
()
{
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
super
.
clearMetaInformation
();
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityObject.java
View file @
3f3f5672
...
@@ -202,13 +202,6 @@ public abstract class CityObject extends GmlElement {
...
@@ -202,13 +202,6 @@ public abstract class CityObject extends GmlElement {
return
null
;
return
null
;
}
}
@Override
public
void
prepareForChecking
()
{
for
(
Geometry
geom
:
geometryList
)
{
geom
.
prepareForChecking
();
}
}
@Override
@Override
public
void
clearMetaInformation
()
{
public
void
clearMetaInformation
()
{
for
(
Geometry
geom
:
geometryList
)
{
for
(
Geometry
geom
:
geometryList
)
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/ConcretePolygon.java
View file @
3f3f5672
...
@@ -195,7 +195,6 @@ public class ConcretePolygon extends Polygon {
...
@@ -195,7 +195,6 @@ public class ConcretePolygon extends Polygon {
lr
.
accept
(
c
);
lr
.
accept
(
c
);
}
}
}
}
setValidated
(
true
);
}
}
@Override
@Override
...
@@ -479,8 +478,8 @@ public class ConcretePolygon extends Polygon {
...
@@ -479,8 +478,8 @@ public class ConcretePolygon extends Polygon {
}
}
@Override
@Override
public
void
prepare
ForChecking
()
{
public
void
prepare
LowMemoryUsageMode
()
{
parent
.
prepareForChecking
();
parent
.
updateEdgesAndVertices
();
}
}
@Override
@Override
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/GenericCityObject.java
View file @
3f3f5672
...
@@ -165,14 +165,6 @@ public class GenericCityObject extends CityObject {
...
@@ -165,14 +165,6 @@ public class GenericCityObject extends CityObject {
return
false
;
return
false
;
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
prepareForChecking
();
}
}
@Override
@Override
public
void
clearMetaInformation
()
{
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
super
.
clearMetaInformation
();
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Geometry.java
View file @
3f3f5672
...
@@ -378,10 +378,6 @@ public class Geometry extends GmlElement {
...
@@ -378,10 +378,6 @@ public class Geometry extends GmlElement {
return
false
;
return
false
;
}
}
@Override
public
void
prepareForChecking
()
{
updateEdgesAndVertices
();
}
@Override
@Override
public
void
clearMetaInformation
()
{
public
void
clearMetaInformation
()
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/ImplicitGeometryHolder.java
View file @
3f3f5672
...
@@ -82,11 +82,6 @@ public class ImplicitGeometryHolder extends Geometry {
...
@@ -82,11 +82,6 @@ public class ImplicitGeometryHolder extends Geometry {
return
prototypeGeometry
.
containsAnyError
();
return
prototypeGeometry
.
containsAnyError
();
}
}
@Override
public
void
prepareForChecking
()
{
this
.
updateEdgesAndVertices
();
prototypeGeometry
.
prepareForChecking
();
}
@Override
@Override
public
boolean
isValidated
()
{
public
boolean
isValidated
()
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Installation.java
View file @
3f3f5672
...
@@ -263,13 +263,6 @@ public class Installation extends CityObject {
...
@@ -263,13 +263,6 @@ public class Installation extends CityObject {
}
}
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
BoundarySurface
bs
:
boundarySurfaces
)
{
bs
.
prepareForChecking
();
}
}
@Override
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/LinearRing.java
View file @
3f3f5672
...
@@ -313,9 +313,8 @@ public class LinearRing extends GmlElement {
...
@@ -313,9 +313,8 @@ public class LinearRing extends GmlElement {
vertices
.
addAll
(
extRing
);
vertices
.
addAll
(
extRing
);
}
}
@Override
public
void
prepareLowMemoryUsageMode
()
{
public
void
prepareForChecking
()
{
parent
.
prepareLowMemoryUsageMode
();
parent
.
getParent
().
prepareForChecking
();
}
}
@Override
@Override
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/LinkedPolygon.java
View file @
3f3f5672
...
@@ -258,8 +258,8 @@ public class LinkedPolygon extends Polygon {
...
@@ -258,8 +258,8 @@ public class LinkedPolygon extends Polygon {
}
}
@Override
@Override
public
void
prepare
ForChecking
()
{
public
void
prepare
LowMemoryUsageMode
()
{
poly
.
prepare
ForChecking
();
poly
.
prepare
LowMemoryUsageMode
();
}
}
@Override
@Override
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Polygon.java
View file @
3f3f5672
...
@@ -80,6 +80,8 @@ public abstract class Polygon extends GmlElement {
...
@@ -80,6 +80,8 @@ public abstract class Polygon extends GmlElement {
public
abstract
ConcretePolygon
getOriginal
();
public
abstract
ConcretePolygon
getOriginal
();
public
abstract
void
prepareLowMemoryUsageMode
();
public
abstract
void
remove
();
public
abstract
void
remove
();
public
abstract
double
getArea
();
public
abstract
double
getArea
();
...
...
Prev
1
2
Next
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