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
efa04ffb
Commit
efa04ffb
authored
Apr 16, 2025
by
Riegel
Browse files
Refactor: Rework clearMetaInformation with Visitor
parent
79a65e32
Pipeline
#11063
failed with stage
in 46 seconds
Changes
28
Pipelines
1
Show whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TopLevelTransportFeature.java
View file @
efa04ffb
...
@@ -123,17 +123,6 @@ public class TopLevelTransportFeature extends TransportationSpace {
...
@@ -123,17 +123,6 @@ public class TopLevelTransportFeature extends TransportationSpace {
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
TransportSection
section
:
sections
)
{
section
.
clearMetaInformation
();
}
for
(
TransportSection
section
:
intersections
)
{
section
.
clearMetaInformation
();
}
}
@Override
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
super
.
collectInstances
(
handler
);
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TrafficSpaceObject.java
View file @
efa04ffb
...
@@ -119,14 +119,6 @@ public class TrafficSpaceObject extends TransportationObject {
...
@@ -119,14 +119,6 @@ public class TrafficSpaceObject extends TransportationObject {
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
TrafficAreaObject
tao
:
trafficAreas
)
{
tao
.
clearMetaInformation
();
}
}
@Override
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
super
.
collectInstances
(
handler
);
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TransportationSpace.java
View file @
efa04ffb
...
@@ -143,18 +143,6 @@ public abstract class TransportationSpace extends TransportationObject {
...
@@ -143,18 +143,6 @@ public abstract class TransportationSpace extends TransportationObject {
return
"TransportationSpace [id="
+
getGmlId
()
+
"]"
;
return
"TransportationSpace [id="
+
getGmlId
()
+
"]"
;
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
TrafficSpaceObject
to
:
trafficSpaces
)
{
to
.
clearMetaInformation
();
}
for
(
TrafficSpaceObject
to
:
auxTrafficSpaces
)
{
to
.
clearMetaInformation
();
}
}
@Override
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
super
.
collectInstances
(
handler
);
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Tunnel.java
View file @
efa04ffb
...
@@ -83,14 +83,6 @@ public class Tunnel extends AbstractTunnel {
...
@@ -83,14 +83,6 @@ public class Tunnel extends AbstractTunnel {
setCityGmlBuilding
(
gmlT
);
setCityGmlBuilding
(
gmlT
);
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
TunnelPart
tp
:
tunnelParts
)
{
tp
.
clearMetaInformation
();
}
}
@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/TunnelConstructiveElement.java
View file @
efa04ffb
...
@@ -181,15 +181,6 @@ public class TunnelConstructiveElement extends CityObject {
...
@@ -181,15 +181,6 @@ public class TunnelConstructiveElement extends CityObject {
return
boundarySurfaceList
;
return
boundarySurfaceList
;
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
clearMetaInformation
();
}
}
@Override
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
super
.
collectInstances
(
handler
);
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/WaterObject.java
View file @
efa04ffb
...
@@ -142,33 +142,10 @@ public class WaterObject extends CityObject {
...
@@ -142,33 +142,10 @@ public class WaterObject extends CityObject {
}
}
@Override
public
boolean
containsAnyError
()
{
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
)
{
return
true
;
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
if
(
bs
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
@Override
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
boundarySurfaceList
);
handler
.
addInstance
(
boundarySurfaceList
);
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
clearMetaInformation
();
}
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/visitors/ClearMetaInformationVisitor.java
View file @
efa04ffb
...
@@ -7,7 +7,7 @@ public class ClearMetaInformationVisitor extends AbstractCheck {
...
@@ -7,7 +7,7 @@ public class ClearMetaInformationVisitor extends AbstractCheck {
@Override
@Override
public
void
check
(
Geometry
geometry
)
{
public
void
check
(
Geometry
geometry
)
{
geometry
.
clearMeta
Information
();
geometry
.
clearMeta
Data
();
}
}
}
}
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/Renderer.java
View file @
efa04ffb
...
@@ -248,7 +248,7 @@ public class Renderer {
...
@@ -248,7 +248,7 @@ public class Renderer {
if
(
geom
.
getEdges
()
==
null
&&
currentGeometry
!=
null
)
{
if
(
geom
.
getEdges
()
==
null
&&
currentGeometry
!=
null
)
{
// if there are no edges available low memory mode is enabled
// if there are no edges available low memory mode is enabled
// clear the old geometry of all meta information
// clear the old geometry of all meta information
currentGeometry
.
clearMeta
Information
();
currentGeometry
.
clearMeta
Data
();
}
}
errVisitor
.
setGeometry
(
currentTriGeom
);
errVisitor
.
setGeometry
(
currentTriGeom
);
Platform
.
runLater
(()
->
{
Platform
.
runLater
(()
->
{
...
...
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