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
c42d600d
Commit
c42d600d
authored
Mar 11, 2026
by
Luna Riegel
Browse files
Refactor: Unify methods
parent
2d2568b9
Changes
41
Show whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Installation.java
View file @
c42d600d
...
@@ -39,7 +39,7 @@ import java.io.Serial;
...
@@ -39,7 +39,7 @@ import java.io.Serial;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
public
class
Installation
extends
CityObject
{
public
class
Installation
extends
CityObject
implements
BoundedSpace
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
1576237433322680191L
;
private
static
final
long
serialVersionUID
=
1576237433322680191L
;
...
@@ -216,6 +216,7 @@ public class Installation extends CityObject {
...
@@ -216,6 +216,7 @@ public class Installation extends CityObject {
return
FeatureType
.
INSTALLATION
;
return
FeatureType
.
INSTALLATION
;
}
}
@Override
public
List
<
BoundarySurface
>
getBoundarySurfaces
()
{
public
List
<
BoundarySurface
>
getBoundarySurfaces
()
{
if
(
boundarySurfaces
==
null
)
{
if
(
boundarySurfaces
==
null
)
{
boundarySurfaces
=
new
ArrayList
<>(
4
);
boundarySurfaces
=
new
ArrayList
<>(
4
);
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/OtherConstructionObject.java
View file @
c42d600d
...
@@ -18,7 +18,7 @@ import java.io.Serial;
...
@@ -18,7 +18,7 @@ import java.io.Serial;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
public
class
OtherConstructionObject
extends
CityObject
{
public
class
OtherConstructionObject
extends
CityObject
implements
BoundedSpace
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
-
3885206364978761701L
;
private
static
final
long
serialVersionUID
=
-
3885206364978761701L
;
...
@@ -136,6 +136,7 @@ public class OtherConstructionObject extends CityObject{
...
@@ -136,6 +136,7 @@ public class OtherConstructionObject extends CityObject{
bs
.
setParent
(
this
);
bs
.
setParent
(
this
);
}
}
@Override
public
List
<
BoundarySurface
>
getBoundarySurfaces
()
{
public
List
<
BoundarySurface
>
getBoundarySurfaces
()
{
return
boundarySurfaceList
;
return
boundarySurfaceList
;
}
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Storey.java
View file @
c42d600d
...
@@ -32,4 +32,8 @@ public class Storey extends AbstractBuildingSubdivision {
...
@@ -32,4 +32,8 @@ public class Storey extends AbstractBuildingSubdivision {
public
List
<
BuildingUnit
>
getBuildingUnits
()
{
public
List
<
BuildingUnit
>
getBuildingUnits
()
{
return
buildingUnits
;
return
buildingUnits
;
}
}
public
void
addBuildingUnit
(
BuildingUnit
buildingUnit
)
{
buildingUnits
.
add
(
buildingUnit
);
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TransportationObject.java
View file @
c42d600d
...
@@ -31,7 +31,7 @@ import java.util.List;
...
@@ -31,7 +31,7 @@ import java.util.List;
*
*
* @author Matthias Betz
* @author Matthias Betz
*/
*/
public
abstract
class
TransportationObject
extends
CityObject
{
public
abstract
class
TransportationObject
extends
CityObject
implements
BoundedSpace
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
-
2698907271726700390L
;
private
static
final
long
serialVersionUID
=
-
2698907271726700390L
;
...
@@ -43,6 +43,7 @@ public abstract class TransportationObject extends CityObject {
...
@@ -43,6 +43,7 @@ public abstract class TransportationObject extends CityObject {
private
AbstractCityObject
ato
;
private
AbstractCityObject
ato
;
protected
TransportationType
type
;
protected
TransportationType
type
;
private
List
<
BoundarySurface
>
boundarySurfaces
=
new
ArrayList
<>();
public
TransportationObject
(
TransportationType
type
)
{
public
TransportationObject
(
TransportationType
type
)
{
this
.
type
=
type
;
this
.
type
=
type
;
...
@@ -65,6 +66,16 @@ public abstract class TransportationObject extends CityObject {
...
@@ -65,6 +66,16 @@ public abstract class TransportationObject extends CityObject {
return
ato
;
return
ato
;
}
}
@Override
public
List
<
BoundarySurface
>
getBoundarySurfaces
()
{
return
boundarySurfaces
;
}
public
void
addBoundarySurface
(
BoundarySurface
b
)
{
boundarySurfaces
.
add
(
b
);
b
.
setParent
(
this
);
}
@Override
@Override
public
Color
getRenderColor
()
{
public
Color
getRenderColor
()
{
return
switch
(
type
)
{
return
switch
(
type
)
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TransportationSpace.java
View file @
c42d600d
...
@@ -14,7 +14,7 @@ import org.xmlobjects.gml.model.geometry.primitives.SolidProperty;
...
@@ -14,7 +14,7 @@ import org.xmlobjects.gml.model.geometry.primitives.SolidProperty;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
public
abstract
class
TransportationSpace
extends
TransportationObject
{
public
abstract
class
TransportationSpace
extends
TransportationObject
{
private
final
List
<
TrafficSpaceObject
>
trafficSpaces
=
new
ArrayList
<>();
private
final
List
<
TrafficSpaceObject
>
trafficSpaces
=
new
ArrayList
<>();
private
final
List
<
TrafficSpaceObject
>
auxTrafficSpaces
=
new
ArrayList
<>();
private
final
List
<
TrafficSpaceObject
>
auxTrafficSpaces
=
new
ArrayList
<>();
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Tunnel.java
View file @
c42d600d
...
@@ -37,6 +37,7 @@ public class Tunnel extends AbstractTunnel {
...
@@ -37,6 +37,7 @@ public class Tunnel extends AbstractTunnel {
}
}
}
}
public
void
addTunnelPart
(
TunnelPart
tunnelPart
)
{
public
void
addTunnelPart
(
TunnelPart
tunnelPart
)
{
tunnelParts
.
add
(
tunnelPart
);
tunnelParts
.
add
(
tunnelPart
);
}
}
...
@@ -52,7 +53,7 @@ public class Tunnel extends AbstractTunnel {
...
@@ -52,7 +53,7 @@ public class Tunnel extends AbstractTunnel {
}
}
org
.
citygml4j
.
core
.
model
.
tunnel
.
Tunnel
gmlT
=
new
org
.
citygml4j
.
core
.
model
.
tunnel
.
Tunnel
();
org
.
citygml4j
.
core
.
model
.
tunnel
.
Tunnel
gmlT
=
new
org
.
citygml4j
.
core
.
model
.
tunnel
.
Tunnel
();
gmlT
.
setId
(
GmlId
.
generateId
().
getGmlString
());
gmlT
.
setId
(
GmlId
.
generateId
().
getGmlString
());
for
(
Installation
ti
:
get
Tunnel
Installations
())
{
for
(
Installation
ti
:
getInstallations
())
{
ti
.
anonymize
();
ti
.
anonymize
();
gmlT
.
getTunnelInstallations
().
add
(
new
TunnelInstallationProperty
((
TunnelInstallation
)
ti
.
getGmlObject
()));
gmlT
.
getTunnelInstallations
().
add
(
new
TunnelInstallationProperty
((
TunnelInstallation
)
ti
.
getGmlObject
()));
}
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TunnelConstructiveElement.java
View file @
c42d600d
...
@@ -17,7 +17,7 @@ import java.io.Serial;
...
@@ -17,7 +17,7 @@ import java.io.Serial;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
public
class
TunnelConstructiveElement
extends
CityObject
{
public
class
TunnelConstructiveElement
extends
AbstractConstructiveElement
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
TunnelConstructiveElement
.
class
);
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
TunnelConstructiveElement
.
class
);
...
@@ -27,8 +27,6 @@ public class TunnelConstructiveElement extends CityObject {
...
@@ -27,8 +27,6 @@ public class TunnelConstructiveElement extends CityObject {
private
static
final
long
serialVersionUID
=
7353233899458901155L
;
private
static
final
long
serialVersionUID
=
7353233899458901155L
;
private
final
org
.
citygml4j
.
core
.
model
.
tunnel
.
TunnelConstructiveElement
gmlTunnelElement
;
private
final
org
.
citygml4j
.
core
.
model
.
tunnel
.
TunnelConstructiveElement
gmlTunnelElement
;
private
final
List
<
BoundarySurface
>
boundarySurfaceList
=
new
ArrayList
<>();
private
final
List
<
AbstractConstructiveFillingElement
>
fillings
=
new
ArrayList
<>();
private
AbstractTunnel
parent
;
private
AbstractTunnel
parent
;
public
TunnelConstructiveElement
(
org
.
citygml4j
.
core
.
model
.
tunnel
.
TunnelConstructiveElement
gmlObject
)
{
public
TunnelConstructiveElement
(
org
.
citygml4j
.
core
.
model
.
tunnel
.
TunnelConstructiveElement
gmlObject
)
{
...
@@ -74,7 +72,7 @@ public class TunnelConstructiveElement extends CityObject {
...
@@ -74,7 +72,7 @@ public class TunnelConstructiveElement extends CityObject {
}
}
private
void
removeEmptyBoundarySurfaces
()
{
private
void
removeEmptyBoundarySurfaces
()
{
for
(
BoundarySurface
bs
:
b
oundarySurface
List
)
{
for
(
BoundarySurface
bs
:
super
.
getB
oundarySurface
s
()
)
{
if
(
bs
.
getGeometries
().
isEmpty
())
{
if
(
bs
.
getGeometries
().
isEmpty
())
{
for
(
AbstractSpaceBoundaryProperty
bsp
:
gmlTunnelElement
.
getBoundaries
())
{
for
(
AbstractSpaceBoundaryProperty
bsp
:
gmlTunnelElement
.
getBoundaries
())
{
if
(
bsp
.
getObject
()
!=
null
&&
bsp
.
getObject
()
==
bs
.
getGmlObject
())
{
if
(
bsp
.
getObject
()
!=
null
&&
bsp
.
getObject
()
==
bs
.
getGmlObject
())
{
...
@@ -87,17 +85,6 @@ public class TunnelConstructiveElement extends CityObject {
...
@@ -87,17 +85,6 @@ public class TunnelConstructiveElement extends CityObject {
}
}
}
}
@Override
public
void
accept
(
CheckableVisitor
c
)
{
super
.
accept
(
c
);
if
(
c
.
canExecute
(
this
))
{
c
.
check
(
this
);
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
accept
(
c
);
}
}
private
void
reCreateBoundarySurface
(
GeometryFactory
factory
,
ParserConfiguration
config
,
BoundarySurface
bs
)
{
private
void
reCreateBoundarySurface
(
GeometryFactory
factory
,
ParserConfiguration
config
,
BoundarySurface
bs
)
{
if
(
bs
.
getGeometries
().
isEmpty
())
{
if
(
bs
.
getGeometries
().
isEmpty
())
{
for
(
AbstractSpaceBoundaryProperty
bsp
:
gmlTunnelElement
.
getBoundaries
())
{
for
(
AbstractSpaceBoundaryProperty
bsp
:
gmlTunnelElement
.
getBoundaries
())
{
...
@@ -170,23 +157,4 @@ public class TunnelConstructiveElement extends CityObject {
...
@@ -170,23 +157,4 @@ public class TunnelConstructiveElement extends CityObject {
return
FeatureType
.
TUNNEL_CONSTRUCTION_ELEMENT
;
return
FeatureType
.
TUNNEL_CONSTRUCTION_ELEMENT
;
}
}
public
void
addBoundarySurface
(
BoundarySurface
bs
)
{
boundarySurfaceList
.
add
(
bs
);
bs
.
setParent
(
this
);
}
public
List
<
BoundarySurface
>
getBoundarySurfaces
()
{
return
boundarySurfaceList
;
}
public
void
addFilling
(
AbstractConstructiveFillingElement
fe
)
{
fillings
.
add
(
fe
);
fe
.
setParent
(
this
);
}
public
List
<
AbstractConstructiveFillingElement
>
getFillings
()
{
return
fillings
;
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TunnelFurniture.java
View file @
c42d600d
...
@@ -7,9 +7,27 @@ public class TunnelFurniture extends AbstractFurniture {
...
@@ -7,9 +7,27 @@ public class TunnelFurniture extends AbstractFurniture {
@Serial
@Serial
private
static
final
long
serialVersionUID
=
-
4667219019432204174L
;
private
static
final
long
serialVersionUID
=
-
4667219019432204174L
;
private
CityObject
parent
;
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
tunnel
.
TunnelFurniture
gmlObject
)
{
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
tunnel
.
TunnelFurniture
gmlObject
)
{
super
.
setGmlObject
(
gmlObject
);
super
.
setGmlObject
(
gmlObject
);
}
}
public
void
setParent
(
AbstractTunnel
parent
)
{
this
.
parent
=
parent
;
}
public
void
setParent
(
TunnelHollow
parent
)
{
this
.
parent
=
parent
;
}
@Override
public
CityObject
getParent
()
{
return
parent
;
}
@Override
public
CityObject
getTopLevelCityObject
()
{
return
parent
.
getTopLevelCityObject
();
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/TunnelHollow.java
View file @
c42d600d
...
@@ -10,27 +10,30 @@ import java.util.List;
...
@@ -10,27 +10,30 @@ import java.util.List;
public
class
TunnelHollow
extends
AbstractRoom
{
public
class
TunnelHollow
extends
AbstractRoom
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
-
276088332165299253L
;
private
static
final
long
serialVersionUID
=
-
276088332165299253L
;
private
final
List
<
TunnelFurniture
Property
>
furniture
Refs
=
new
ArrayList
<>(
2
);
private
final
List
<
TunnelFurniture
>
furniture
List
=
new
ArrayList
<>(
2
);
private
CityObject
parent
;
private
AbstractTunnel
parent
;
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
tunnel
.
HollowSpace
gmlHollowSpace
)
{
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
tunnel
.
HollowSpace
gmlHollowSpace
)
{
super
.
cgmlRoom
=
gmlHollowSpace
;
super
.
cgmlRoom
=
gmlHollowSpace
;
}
}
public
void
setParent
(
CityObject
parent
)
{
public
void
setParent
(
AbstractTunnel
parent
)
{
this
.
parent
=
parent
;
this
.
parent
=
parent
;
}
}
public
void
addFurniture
Ref
(
TunnelFurniture
Property
furniture
Ref
)
{
public
void
addFurniture
(
TunnelFurniture
furniture
)
{
furniture
Refs
.
add
(
furniture
Ref
);
furniture
List
.
add
(
furniture
);
}
}
public
List
<
TunnelFurnitureProperty
>
getFurnitureRefs
()
{
return
furnitureRefs
;
@Override
public
List
<
TunnelFurniture
>
getFurniture
()
{
return
furnitureList
;
}
}
public
CityObject
getParent
()
{
@Override
public
AbstractTunnel
getParent
()
{
return
parent
;
return
parent
;
}
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Vegetation.java
View file @
c42d600d
...
@@ -33,13 +33,15 @@ import org.xmlobjects.gml.model.geometry.primitives.Solid;
...
@@ -33,13 +33,15 @@ import org.xmlobjects.gml.model.geometry.primitives.Solid;
import
org.xmlobjects.gml.model.geometry.primitives.SolidProperty
;
import
org.xmlobjects.gml.model.geometry.primitives.SolidProperty
;
import
java.io.Serial
;
import
java.io.Serial
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
/**
* Representation of CityGML vegetation objects
* Representation of CityGML vegetation objects
*
*
* @author Matthias Betz
* @author Matthias Betz
*/
*/
public
class
Vegetation
extends
CityObject
{
public
class
Vegetation
extends
CityObject
implements
BoundedSpace
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
-
5136358065541704146L
;
private
static
final
long
serialVersionUID
=
-
5136358065541704146L
;
...
@@ -55,6 +57,17 @@ public class Vegetation extends CityObject {
...
@@ -55,6 +57,17 @@ public class Vegetation extends CityObject {
this
.
type
=
type
;
this
.
type
=
type
;
}
}
private
final
List
<
BoundarySurface
>
boundarySurfaces
=
new
ArrayList
<>();
@Override
public
List
<
BoundarySurface
>
getBoundarySurfaces
()
{
return
boundarySurfaces
;
}
public
void
addBoundarySurface
(
BoundarySurface
boundarySurface
){
boundarySurfaces
.
add
(
boundarySurface
);
}
@Override
@Override
public
FeatureType
getFeatureType
()
{
public
FeatureType
getFeatureType
()
{
return
FeatureType
.
VEGETATION
;
return
FeatureType
.
VEGETATION
;
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/WaterObject.java
View file @
c42d600d
...
@@ -42,7 +42,7 @@ import java.util.List;
...
@@ -42,7 +42,7 @@ import java.util.List;
*
*
* @author Matthias Betz
* @author Matthias Betz
*/
*/
public
class
WaterObject
extends
CityObject
{
public
class
WaterObject
extends
CityObject
implements
BoundedSpace
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
-
3821060595086337424L
;
private
static
final
long
serialVersionUID
=
-
3821060595086337424L
;
...
@@ -121,11 +121,7 @@ public class WaterObject extends CityObject {
...
@@ -121,11 +121,7 @@ public class WaterObject extends CityObject {
}
}
}
}
/**
@Override
* Getter for all boundary surfaces contained in this building.
*
* @return the boundary surfaces
*/
public
List
<
BoundarySurface
>
getBoundarySurfaces
()
{
public
List
<
BoundarySurface
>
getBoundarySurfaces
()
{
return
boundarySurfaceList
;
return
boundarySurfaceList
;
}
}
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractBuildingTest.java
View file @
c42d600d
...
@@ -54,8 +54,8 @@ public class AbstractBuildingTest {
...
@@ -54,8 +54,8 @@ public class AbstractBuildingTest {
public
void
testAccept
()
{
public
void
testAccept
()
{
AbstractBuilding
ab
=
createAbstractBuilding
();
AbstractBuilding
ab
=
createAbstractBuilding
();
ab
.
addBoundarySurface
(
new
BoundarySurface
(
null
));
ab
.
addBoundarySurface
(
new
BoundarySurface
(
null
));
ab
.
add
Building
Installation
(
new
Installation
());
ab
.
addInstallation
(
new
Installation
());
ab
.
add
Building
Installation
(
new
Installation
());
ab
.
addInstallation
(
new
Installation
());
AtomicInteger
abCounter
=
new
AtomicInteger
(
0
);
AtomicInteger
abCounter
=
new
AtomicInteger
(
0
);
AtomicInteger
bsCounter
=
new
AtomicInteger
(
0
);
AtomicInteger
bsCounter
=
new
AtomicInteger
(
0
);
AtomicInteger
biCounter
=
new
AtomicInteger
(
0
);
AtomicInteger
biCounter
=
new
AtomicInteger
(
0
);
...
@@ -99,10 +99,10 @@ public class AbstractBuildingTest {
...
@@ -99,10 +99,10 @@ public class AbstractBuildingTest {
BoundarySurface
mockBSurface
=
mock
(
BoundarySurface
.
class
);
BoundarySurface
mockBSurface
=
mock
(
BoundarySurface
.
class
);
Geometry
mockGeometry
=
mock
(
Geometry
.
class
);
Geometry
mockGeometry
=
mock
(
Geometry
.
class
);
ab
.
add
Building
Room
(
mockRoom
);
ab
.
addRoom
(
mockRoom
);
ab
.
add
Building
Installation
(
mockInstallation
);
ab
.
addInstallation
(
mockInstallation
);
ab
.
addConstructiveElement
(
mockConstructiveElement
);
ab
.
addConstructiveElement
(
mockConstructiveElement
);
ab
.
add
BuildingRoom
Furniture
(
mockBuildingRoomFurniture
);
ab
.
addFurniture
(
mockBuildingRoomFurniture
);
ab
.
addBuildingUnit
(
mockBuildingUnit
);
ab
.
addBuildingUnit
(
mockBuildingUnit
);
ab
.
addStorey
(
mockStorey
);
ab
.
addStorey
(
mockStorey
);
ab
.
addBoundarySurface
(
mockBSurface
);
ab
.
addBoundarySurface
(
mockBSurface
);
...
@@ -253,7 +253,7 @@ public class AbstractBuildingTest {
...
@@ -253,7 +253,7 @@ public class AbstractBuildingTest {
public
void
testReCreateGeometriesEmptyBi
()
{
public
void
testReCreateGeometriesEmptyBi
()
{
Installation
biMock
=
mock
(
Installation
.
class
);
Installation
biMock
=
mock
(
Installation
.
class
);
AbstractBuilding
ab
=
createAbstractBuilding
();
AbstractBuilding
ab
=
createAbstractBuilding
();
ab
.
add
Building
Installation
(
biMock
);
ab
.
addInstallation
(
biMock
);
GeometryFactory
factory
=
GeometryFactory
.
newInstance
();
GeometryFactory
factory
=
GeometryFactory
.
newInstance
();
ParserConfiguration
config
=
new
ParserConfiguration
(
8
,
false
);
ParserConfiguration
config
=
new
ParserConfiguration
(
8
,
false
);
org
.
citygml4j
.
core
.
model
.
building
.
AbstractBuilding
gmlAb
=
new
org
.
citygml4j
.
core
.
model
.
building
.
Building
();
org
.
citygml4j
.
core
.
model
.
building
.
AbstractBuilding
gmlAb
=
new
org
.
citygml4j
.
core
.
model
.
building
.
Building
();
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractRoomTest.java
View file @
c42d600d
...
@@ -32,6 +32,16 @@ public class AbstractRoomTest {
...
@@ -32,6 +32,16 @@ public class AbstractRoomTest {
@Before
@Before
public
void
setUp
()
{
public
void
setUp
()
{
abRoom
=
new
AbstractRoom
()
{
abRoom
=
new
AbstractRoom
()
{
@Override
public
List
<?
extends
AbstractFurniture
>
getFurniture
()
{
return
List
.
of
();
}
@Override
public
CityObject
getParent
()
{
return
null
;
}
@Override
@Override
public
CityObject
getTopLevelCityObject
()
{
public
CityObject
getTopLevelCityObject
()
{
return
null
;
return
null
;
...
@@ -46,7 +56,7 @@ public class AbstractRoomTest {
...
@@ -46,7 +56,7 @@ public class AbstractRoomTest {
BoundarySurface
mockBoundarySurface
=
Mockito
.
mock
(
BoundarySurface
.
class
);
BoundarySurface
mockBoundarySurface
=
Mockito
.
mock
(
BoundarySurface
.
class
);
Geometry
geometry
=
Mockito
.
mock
(
Geometry
.
class
);
Geometry
geometry
=
Mockito
.
mock
(
Geometry
.
class
);
abRoom
.
add
Room
Installation
(
mockInstallation
);
abRoom
.
addInstallation
(
mockInstallation
);
abRoom
.
addBoundarySurface
(
mockBoundarySurface
);
abRoom
.
addBoundarySurface
(
mockBoundarySurface
);
abRoom
.
addGeometry
(
geometry
);
abRoom
.
addGeometry
(
geometry
);
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeObjectTest.java
View file @
c42d600d
...
@@ -94,10 +94,10 @@ public class BridgeObjectTest {
...
@@ -94,10 +94,10 @@ public class BridgeObjectTest {
Geometry
geomMock
=
mock
(
Geometry
.
class
);
Geometry
geomMock
=
mock
(
Geometry
.
class
);
bo
.
addBridgePart
(
partMock
);
bo
.
addBridgePart
(
partMock
);
bo
.
add
Bridge
Room
(
mockRoom
);
bo
.
addRoom
(
mockRoom
);
bo
.
add
Bridge
Furniture
(
mockFurn
);
bo
.
addFurniture
(
mockFurn
);
bo
.
addConstructiveElement
(
ceMock
);
bo
.
addConstructiveElement
(
ceMock
);
bo
.
add
Bridge
Installation
(
instMock
);
bo
.
addInstallation
(
instMock
);
bo
.
addBoundarySurface
(
bsMock
);
bo
.
addBoundarySurface
(
bsMock
);
bo
.
addGeometry
(
geomMock
);
bo
.
addGeometry
(
geomMock
);
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingTest.java
View file @
c42d600d
...
@@ -141,14 +141,14 @@ public class BuildingTest {
...
@@ -141,14 +141,14 @@ public class BuildingTest {
BuildingUnit
mockBuildingUnit
=
mock
(
BuildingUnit
.
class
);
BuildingUnit
mockBuildingUnit
=
mock
(
BuildingUnit
.
class
);
Storey
mockStorey
=
mock
(
Storey
.
class
);
Storey
mockStorey
=
mock
(
Storey
.
class
);
b
.
add
Building
Room
(
mockRoom
);
b
.
addRoom
(
mockRoom
);
b
.
add
Building
Installation
(
mockInstallation
);
b
.
addInstallation
(
mockInstallation
);
b
.
add
BuildingRoom
Furniture
(
mockBuildingRoomFurniture
);
b
.
addFurniture
(
mockBuildingRoomFurniture
);
b
.
addBuildingUnit
(
mockBuildingUnit
);
b
.
addBuildingUnit
(
mockBuildingUnit
);
b
.
addStorey
(
mockStorey
);
b
.
addStorey
(
mockStorey
);
bp
.
add
Building
Room
(
mockRoom
);
bp
.
addRoom
(
mockRoom
);
bp
.
add
Building
Installation
(
mockInstallation
);
bp
.
addInstallation
(
mockInstallation
);
bp
.
add
BuildingRoom
Furniture
(
mockBuildingRoomFurniture
);
bp
.
addFurniture
(
mockBuildingRoomFurniture
);
bp
.
addBuildingUnit
(
mockBuildingUnit
);
bp
.
addBuildingUnit
(
mockBuildingUnit
);
bp
.
addStorey
(
mockStorey
);
bp
.
addStorey
(
mockStorey
);
...
...
CityDoctorParent/Extensions/CityDoctorAutoPro/src/main/java/de/hft/stuttgart/citydoctor2/gui/AutoProWindow.java
View file @
c42d600d
...
@@ -654,9 +654,9 @@ public class AutoProWindow extends JDialog implements ItemListener {
...
@@ -654,9 +654,9 @@ public class AutoProWindow extends JDialog implements ItemListener {
}
}
}
}
}
}
else
if
(
0
!=
building
.
get
Building
Installations
().
size
())
else
if
(
0
!=
building
.
getInstallations
().
size
())
{
{
for
(
Installation
buildingInstallation:
building
.
get
Building
Installations
())
for
(
Installation
buildingInstallation:
building
.
getInstallations
())
{
{
for
(
Geometry
geometry
:
buildingInstallation
.
getGeometries
())
for
(
Geometry
geometry
:
buildingInstallation
.
getGeometries
())
{
{
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/main/java/de/hft/stuttgart/citydoctor2/healing/HealMainBuilding.java
View file @
c42d600d
...
@@ -67,7 +67,7 @@ public class HealMainBuilding implements HealingMethod {
...
@@ -67,7 +67,7 @@ public class HealMainBuilding implements HealingMethod {
b
.
getGeometries
().
addAll
(
largestPart
.
getGeometries
());
b
.
getGeometries
().
addAll
(
largestPart
.
getGeometries
());
b
.
getBoundarySurfaces
().
addAll
(
largestPart
.
getBoundarySurfaces
());
b
.
getBoundarySurfaces
().
addAll
(
largestPart
.
getBoundarySurfaces
());
b
.
get
Building
Installations
().
addAll
(
largestPart
.
get
Building
Installations
());
b
.
getInstallations
().
addAll
(
largestPart
.
getInstallations
());
org
.
citygml4j
.
core
.
model
.
building
.
BuildingPart
partObject
=
buildingPartProp
.
getObject
();
org
.
citygml4j
.
core
.
model
.
building
.
BuildingPart
partObject
=
buildingPartProp
.
getObject
();
gmlBuilding
.
getBoundaries
().
addAll
(
partObject
.
getBoundaries
());
gmlBuilding
.
getBoundaries
().
addAll
(
partObject
.
getBoundaries
());
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/main/java/de/hft/stuttgart/citydoctor2/healing/HealMissingSolid.java
View file @
c42d600d
...
@@ -149,7 +149,7 @@ public class HealMissingSolid implements HealingMethod {
...
@@ -149,7 +149,7 @@ public class HealMissingSolid implements HealingMethod {
for
(
BoundarySurface
bs
:
feature
.
getBoundarySurfaces
())
{
for
(
BoundarySurface
bs
:
feature
.
getBoundarySurfaces
())
{
collectPolygons
(
bs
,
lod
,
polygons
,
solidGeometry
);
collectPolygons
(
bs
,
lod
,
polygons
,
solidGeometry
);
}
}
for
(
Installation
bi
:
feature
.
get
Building
Installations
())
{
for
(
Installation
bi
:
feature
.
getInstallations
())
{
collectPolygons
(
bi
,
lod
,
polygons
,
solidGeometry
);
collectPolygons
(
bi
,
lod
,
polygons
,
solidGeometry
);
for
(
BoundarySurface
bs
:
bi
.
getBoundarySurfaces
())
{
for
(
BoundarySurface
bs
:
bi
.
getBoundarySurfaces
())
{
collectPolygons
(
bs
,
lod
,
polygons
,
solidGeometry
);
collectPolygons
(
bs
,
lod
,
polygons
,
solidGeometry
);
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/main/java/de/hft/stuttgart/citydoctor2/optimization/MeshGenerator.java
View file @
c42d600d
...
@@ -50,7 +50,7 @@ public class MeshGenerator {
...
@@ -50,7 +50,7 @@ public class MeshGenerator {
for
(
BoundarySurface
bs
:
b
.
getBoundarySurfaces
())
{
for
(
BoundarySurface
bs
:
b
.
getBoundarySurfaces
())
{
replacePolygonsInGeometry
(
bs
,
maxArea
);
replacePolygonsInGeometry
(
bs
,
maxArea
);
}
}
for
(
Installation
bi
:
b
.
get
Building
Installations
())
{
for
(
Installation
bi
:
b
.
getInstallations
())
{
replacePolygonsInGeometry
(
bi
,
maxArea
);
replacePolygonsInGeometry
(
bi
,
maxArea
);
for
(
BoundarySurface
bs
:
bi
.
getBoundarySurfaces
())
{
for
(
BoundarySurface
bs
:
bi
.
getBoundarySurfaces
())
{
replacePolygonsInGeometry
(
bs
,
maxArea
);
replacePolygonsInGeometry
(
bs
,
maxArea
);
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealMissingSolidTest.java
View file @
c42d600d
...
@@ -98,7 +98,7 @@ public class HealMissingSolidTest {
...
@@ -98,7 +98,7 @@ public class HealMissingSolidTest {
geom
.
addPolygon
(
p5
);
geom
.
addPolygon
(
p5
);
Installation
bi
=
new
Installation
();
Installation
bi
=
new
Installation
();
b
.
add
Building
Installation
(
bi
);
b
.
addInstallation
(
bi
);
Geometry
geom3
=
new
Geometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD2
,
Orientation
.
OUTWARD
);
Geometry
geom3
=
new
Geometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD2
,
Orientation
.
OUTWARD
);
bi
.
addGeometry
(
geom3
);
bi
.
addGeometry
(
geom3
);
ConcretePolygon
p3
=
new
ConcretePolygon
();
ConcretePolygon
p3
=
new
ConcretePolygon
();
...
...
Prev
1
2
3
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