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
2c171abe
Commit
2c171abe
authored
Sep 19, 2024
by
Riegel
Browse files
Add support for CityGML 3.0 Room and Furniture features
parent
ec3bffa6
Pipeline
#10224
passed with stage
in 1 minute and 21 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractBuilding.java
View file @
2c171abe
...
...
@@ -55,6 +55,7 @@ public abstract class AbstractBuilding extends CityObject {
private
final
List
<
Installation
>
buildingInstallations
=
new
ArrayList
<>(
2
);
private
final
List
<
BoundarySurface
>
boundarySurfaceList
=
new
ArrayList
<>();
private
final
List
<
BuildingRoom
>
buildingRooms
=
new
ArrayList
<>();
private
org
.
citygml4j
.
core
.
model
.
building
.
AbstractBuilding
ab
;
...
...
@@ -94,6 +95,9 @@ public abstract class AbstractBuilding extends CityObject {
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
unsetGmlGeometries
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
unsetGmlGeometries
();
}
}
@Override
...
...
@@ -113,6 +117,9 @@ public abstract class AbstractBuilding extends CityObject {
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
reCreateGeometries
(
factory
,
config
);
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
reCreateGeometries
(
factory
,
config
);
}
}
private
void
reCreateBoundarySurface
(
GeometryFactory
factory
,
ParserConfiguration
config
,
BoundarySurface
bs
)
{
...
...
@@ -182,6 +189,9 @@ public abstract class AbstractBuilding extends CityObject {
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
accept
(
c
);
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
accept
(
c
);
}
}
@Override
...
...
@@ -193,6 +203,9 @@ public abstract class AbstractBuilding extends CityObject {
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
collectContainedErrors
(
errors
);
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
collectContainedErrors
(
errors
);
}
}
@Override
...
...
@@ -204,6 +217,9 @@ public abstract class AbstractBuilding extends CityObject {
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
clearAllContainedCheckResults
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
clearAllContainedCheckResults
();
}
}
@Override
...
...
@@ -222,6 +238,11 @@ public abstract class AbstractBuilding extends CityObject {
return
true
;
}
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
if
(
br
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
return
false
;
}
...
...
@@ -241,6 +262,11 @@ public abstract class AbstractBuilding extends CityObject {
return
true
;
}
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
if
(
br
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
...
...
@@ -258,6 +284,10 @@ public abstract class AbstractBuilding extends CityObject {
coBi
.
setParent
(
this
);
}
public
void
addBuildingRoom
(
BuildingRoom
room
)
{
buildingRooms
.
add
(
room
);
}
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
building
.
AbstractBuilding
ab
)
{
this
.
ab
=
ab
;
}
...
...
@@ -265,7 +295,11 @@ public abstract class AbstractBuilding extends CityObject {
public
List
<
Installation
>
getBuildingInstallations
()
{
return
buildingInstallations
;
}
public
List
<
BuildingRoom
>
getBuildingRooms
()
{
return
buildingRooms
;
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
...
...
@@ -275,6 +309,9 @@ public abstract class AbstractBuilding extends CityObject {
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
prepareForChecking
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
prepareForChecking
();
}
}
@Override
...
...
@@ -286,6 +323,9 @@ public abstract class AbstractBuilding extends CityObject {
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
clearMetaInformation
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
clearMetaInformation
();
}
}
@Override
...
...
@@ -293,6 +333,7 @@ public abstract class AbstractBuilding extends CityObject {
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
boundarySurfaceList
);
handler
.
addInstance
(
buildingInstallations
);
handler
.
addInstance
(
buildingRooms
);
}
@Override
...
...
@@ -305,6 +346,9 @@ public abstract class AbstractBuilding extends CityObject {
for
(
Installation
originalBi
:
originalAb
.
buildingInstallations
)
{
buildingInstallations
.
add
(
handler
.
getCopyInstance
(
originalBi
));
}
for
(
BuildingRoom
originalBr
:
originalAb
.
buildingRooms
)
{
buildingRooms
.
add
(
handler
.
getCopyInstance
(
originalBr
));
}
ab
=
originalAb
.
ab
;
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractFurniture.java
0 → 100644
View file @
2c171abe
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.utils.CityGmlUtils
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurface
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurfaceProperty
;
import
org.xmlobjects.gml.model.geometry.primitives.Solid
;
import
org.xmlobjects.gml.model.geometry.primitives.SolidProperty
;
import
java.io.Serial
;
/**
* Represents all types of furniture used inside Buildings.
*/
public
abstract
class
AbstractFurniture
extends
CityObject
{
@Serial
private
static
final
long
serialVersionUID
=
-
9050689238027190674L
;
private
AbstractRoom
parent
;
private
org
.
citygml4j
.
core
.
model
.
construction
.
AbstractFurniture
af
;
@Override
public
org
.
citygml4j
.
core
.
model
.
construction
.
AbstractFurniture
getGmlObject
(){
return
af
;
}
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
MultiSurface
ms
=
CityGmlUtils
.
createMultiSurface
(
geom
,
factory
,
config
);
setMultiSurfaceAccordingToLod
(
geom
,
ms
);
}
else
{
Solid
solid
=
CityGmlUtils
.
createSolid
(
geom
,
factory
,
config
);
setSolidAccordingToLod
(
geom
,
solid
);
}
}
}
public
void
setParent
(
AbstractRoom
room
)
{
if
(
parent
==
null
)
{
parent
=
room
;
}
else
if
(
parent
!=
room
)
{
parent
.
removeFurniture
(
this
);
room
.
addRoomFurniture
(
this
);
parent
=
room
;
}
}
@Override
public
void
unsetGmlGeometries
()
{
af
.
setLod0MultiSurface
(
null
);
af
.
setLod2MultiSurface
(
null
);
af
.
setLod3MultiSurface
(
null
);
af
.
setLod1Solid
(
null
);
af
.
setLod2Solid
(
null
);
af
.
setLod3Solid
(
null
);
}
private
void
setMultiSurfaceAccordingToLod
(
Geometry
geom
,
MultiSurface
ms
)
{
switch
(
geom
.
getLod
())
{
case
LOD0:
af
.
setLod0MultiSurface
(
new
MultiSurfaceProperty
(
ms
));
break
;
case
LOD2:
af
.
setLod2MultiSurface
(
new
MultiSurfaceProperty
(
ms
));
break
;
case
LOD3:
af
.
setLod3MultiSurface
(
new
MultiSurfaceProperty
(
ms
));
break
;
default
:
throw
new
IllegalStateException
(
"Cannot add "
+
geom
.
getLod
()
+
" multi surface to buildings"
);
}
}
private
void
setSolidAccordingToLod
(
Geometry
geom
,
Solid
solid
)
{
switch
(
geom
.
getLod
())
{
case
LOD1:
af
.
setLod1Solid
(
new
SolidProperty
(
solid
));
break
;
case
LOD2:
af
.
setLod2Solid
(
new
SolidProperty
(
solid
));
break
;
case
LOD3:
af
.
setLod3Solid
(
new
SolidProperty
(
solid
));
break
;
default
:
throw
new
IllegalStateException
(
"Cannot add "
+
geom
.
getLod
()
+
" solid to buildings"
);
}
}
@Override
public
FeatureType
getFeatureType
()
{
return
FeatureType
.
FURNITURE
;
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
){
super
.
fillValues
(
original
,
handler
);
AbstractFurniture
originalAf
=
(
AbstractFurniture
)
original
;
af
=
originalAf
.
af
;
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractRoom.java
0 → 100644
View file @
2c171abe
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.utils.CityGmlUtils
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.citygml4j.core.model.core.AbstractCityObject
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurface
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurfaceProperty
;
import
org.xmlobjects.gml.model.geometry.primitives.Solid
;
import
org.xmlobjects.gml.model.geometry.primitives.SolidProperty
;
import
java.io.Serial
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Abstract base class for rooms inside CityGML 3.0 construction objects.
*/
public
abstract
class
AbstractRoom
extends
CityObject
{
@Serial
private
static
final
long
serialVersionUID
=
-
1730625513988944329L
;
private
final
List
<
Installation
>
roomInstallations
=
new
ArrayList
<>(
2
);
private
final
List
<
AbstractFurniture
>
abstractFurnitureList
=
new
ArrayList
<>(
2
);
private
final
List
<
BoundarySurface
>
boundarySurfaceList
=
new
ArrayList
<>();
protected
org
.
citygml4j
.
core
.
model
.
core
.
AbstractUnoccupiedSpace
cgmlRoom
;
@Override
public
void
accept
(
Check
c
)
{
super
.
accept
(
c
);
if
(
c
.
canExecute
(
this
))
{
c
.
check
(
this
);
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
accept
(
c
);
}
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
accept
(
c
);
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
accept
(
c
);
}
}
@Override
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
){
super
.
collectContainedErrors
(
errors
);
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
collectContainedErrors
(
errors
);
}
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
collectContainedErrors
(
errors
);
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
collectContainedErrors
(
errors
);
}
}
@Override
public
void
clearAllContainedCheckResults
(){
super
.
clearAllContainedCheckResults
();
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
clearAllContainedCheckResults
();
}
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
clearAllContainedCheckResults
();
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
clearAllContainedCheckResults
();
}
}
@Override
public
boolean
containsError
(
CheckId
checkIdentifier
){
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
if
(
hasError
){
return
true
;
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
if
(
roomInstallation
.
containsError
(
checkIdentifier
)){
return
true
;
}
}
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
if
(
abstractFurniture
.
containsError
(
checkIdentifier
)){
return
true
;
}
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
if
(
boundarySurface
.
containsError
(
checkIdentifier
)){
return
true
;
}
}
return
false
;
}
@Override
public
boolean
containsAnyError
(){
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
){
return
true
;
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
if
(
roomInstallation
.
containsAnyError
()){
return
true
;
}
}
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
if
(
abstractFurniture
.
containsAnyError
()){
return
true
;
}
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
if
(
boundarySurface
.
containsAnyError
()){
return
true
;
}
}
return
false
;
}
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
MultiSurface
ms
=
CityGmlUtils
.
createMultiSurface
(
geom
,
factory
,
config
);
setMultiSurfaceAccordingToLod
(
geom
,
ms
);
}
else
{
Solid
solid
=
CityGmlUtils
.
createSolid
(
geom
,
factory
,
config
);
setSolidAccordingToLod
(
geom
,
solid
);
}
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
reCreateGeometries
(
factory
,
config
);
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
reCreateGeometries
(
factory
,
config
);
}
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
reCreateGeometries
(
factory
,
config
);
}
}
private
void
setMultiSurfaceAccordingToLod
(
Geometry
geom
,
MultiSurface
ms
)
{
switch
(
geom
.
getLod
())
{
case
LOD0:
cgmlRoom
.
setLod0MultiSurface
(
new
MultiSurfaceProperty
(
ms
));
break
;
case
LOD2:
cgmlRoom
.
setLod2MultiSurface
(
new
MultiSurfaceProperty
(
ms
));
break
;
case
LOD3:
cgmlRoom
.
setLod3MultiSurface
(
new
MultiSurfaceProperty
(
ms
));
break
;
default
:
throw
new
IllegalStateException
(
"Cannot add "
+
geom
.
getLod
()
+
" multi surface to rooms"
);
}
}
private
void
setSolidAccordingToLod
(
Geometry
geom
,
Solid
solid
)
{
switch
(
geom
.
getLod
())
{
case
LOD1:
cgmlRoom
.
setLod1Solid
(
new
SolidProperty
(
solid
));
break
;
case
LOD2:
cgmlRoom
.
setLod2Solid
(
new
SolidProperty
(
solid
));
break
;
case
LOD3:
cgmlRoom
.
setLod3Solid
(
new
SolidProperty
(
solid
));
break
;
default
:
throw
new
IllegalStateException
(
"Cannot add "
+
geom
.
getLod
()
+
" solid to rooms"
);
}
}
@Override
public
void
unsetGmlGeometries
()
{
cgmlRoom
.
setLod0MultiSurface
(
null
);
cgmlRoom
.
setLod2MultiSurface
(
null
);
cgmlRoom
.
setLod3MultiSurface
(
null
);
cgmlRoom
.
setLod1Solid
(
null
);
cgmlRoom
.
setLod2Solid
(
null
);
cgmlRoom
.
setLod3Solid
(
null
);
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
unsetGmlGeometries
();
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
unsetGmlGeometries
();
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
unsetGmlGeometries
();
}
}
@Override
public
void
prepareForChecking
(){
super
.
prepareForChecking
();
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
prepareForChecking
();
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
prepareForChecking
();
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
prepareForChecking
();
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
clearMetaInformation
();
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
clearMetaInformation
();
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
clearMetaInformation
();
}
}
@Override
public
AbstractCityObject
getGmlObject
()
{
return
cgmlRoom
;
}
public
void
removeFurniture
(
AbstractFurniture
furniture
)
{
abstractFurnitureList
.
remove
(
furniture
);
}
public
List
<
Installation
>
getRoomInstallations
()
{
return
roomInstallations
;
}
public
List
<
AbstractFurniture
>
getRoomFurnitureList
()
{
return
abstractFurnitureList
;
}
public
List
<
BoundarySurface
>
getBoundarySurfaceList
()
{
return
boundarySurfaceList
;
}
public
void
addRoomInstallation
(
Installation
roomInstallation
)
{
roomInstallations
.
add
(
roomInstallation
);
roomInstallation
.
setParent
(
this
);
}
public
void
addBoundarySurface
(
BoundarySurface
boundarySurface
)
{
boundarySurfaceList
.
add
(
boundarySurface
);
boundarySurface
.
setParent
(
this
);
}
public
void
addRoomFurniture
(
AbstractFurniture
abstractFurniture
)
{
abstractFurnitureList
.
add
(
abstractFurniture
);
}
@Override
public
FeatureType
getFeatureType
()
{
return
FeatureType
.
ROOM
;
}
@Override
public
void
collectInstances
(
CopyHandler
handler
){
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
roomInstallations
);
handler
.
addInstance
(
abstractFurnitureList
);
handler
.
addInstance
(
boundarySurfaceList
);
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
){
super
.
fillValues
(
original
,
handler
);
AbstractRoom
originalAr
=
(
AbstractRoom
)
original
;
for
(
BoundarySurface
originalBs
:
originalAr
.
boundarySurfaceList
)
{
boundarySurfaceList
.
add
(
handler
.
getCopyInstance
(
originalBs
));
}
for
(
Installation
originalRi
:
originalAr
.
roomInstallations
)
{
roomInstallations
.
add
(
handler
.
getCopyInstance
(
originalRi
));
}
for
(
AbstractFurniture
originalAb
:
originalAr
.
abstractFurnitureList
)
{
abstractFurnitureList
.
add
(
handler
.
getCopyInstance
(
originalAb
));
}
cgmlRoom
=
originalAr
.
cgmlRoom
;
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeFurniture.java
0 → 100644
View file @
2c171abe
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
java.io.Serial
;
public
class
BridgeFurniture
extends
AbstractFurniture
{
@Serial
private
static
final
long
serialVersionUID
=
2450802405053172352L
;
public
BridgeFurniture
(
BridgeRoom
parent
)
{
setParent
(
parent
);
parent
.
addRoomFurniture
(
this
);
}
private
BridgeFurniture
(){}
@Override
public
Copyable
createCopyInstance
(){
return
new
BridgeFurniture
();
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeObject.java
View file @
2c171abe
...
...
@@ -52,6 +52,7 @@ public class BridgeObject extends CityObject {
private
final
List
<
BridgeConstructiveElement
>
elements
=
new
ArrayList
<>(
2
);
private
final
List
<
BoundarySurface
>
boundarySurfaces
=
new
ArrayList
<>(
2
);
private
final
List
<
Installation
>
bridgeInstallations
=
new
ArrayList
<>(
2
);
private
final
List
<
BridgeRoom
>
bridgeRooms
=
new
ArrayList
<>(
2
);
private
AbstractBridge
ab
;
private
BridgeType
type
;
public
BridgeObject
(
BridgeType
type
,
AbstractBridge
ab
)
{
...
...
@@ -72,6 +73,10 @@ public class BridgeObject extends CityObject {
return
bridgeInstallations
;
}
public
List
<
BridgeRoom
>
getBridgeRooms
()
{
return
bridgeRooms
;
}
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
...
...
@@ -95,6 +100,9 @@ public class BridgeObject extends CityObject {
for
(
BridgeConstructiveElement
ele
:
elements
)
{
ele
.
reCreateGeometries
(
factory
,
config
);
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
br
.
reCreateGeometries
(
factory
,
config
);
}
}
...
...
@@ -140,6 +148,10 @@ public class BridgeObject extends CityObject {
coBi
.
setParent
(
this
);
}
public
void
addBridgeRoom
(
BridgeRoom
room
)
{
bridgeRooms
.
add
(
room
);
}
@Override
public
void
clearAllContainedCheckResults
()
{
super
.
clearAllContainedCheckResults
();
...
...
@@ -155,6 +167,9 @@ public class BridgeObject extends CityObject {
for
(
BridgeConstructiveElement
ele
:
elements
)
{
ele
.
clearAllContainedCheckResults
();
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
br
.
clearAllContainedCheckResults
();
}
}
@Override
...
...
@@ -172,6 +187,9 @@ public class BridgeObject extends CityObject {
for
(
BridgeConstructiveElement
ele
:
elements
)
{
ele
.
collectContainedErrors
(
errors
);
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
br
.
collectContainedErrors
(
errors
);
}
}
...
...
@@ -199,6 +217,11 @@ public class BridgeObject extends CityObject {
return
true
;
}
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
if
(
br
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
...
...
@@ -236,6 +259,11 @@ public class BridgeObject extends CityObject {
return
true
;
}
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
if
(
br
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
return
false
;
}
...
...
@@ -267,6 +295,9 @@ public class BridgeObject extends CityObject {
for
(
BridgeConstructiveElement
ele
:
elements
)
{
ele
.
accept
(
c
);
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
br
.
accept
(
c
);
}
}
...
...
@@ -324,6 +355,9 @@ public class BridgeObject extends CityObject {
for
(
BridgeConstructiveElement
ele
:
elements
)
{
ele
.
unsetGmlGeometries
();
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
br
.
unsetGmlGeometries
();
}
}
...
...
@@ -348,6 +382,9 @@ public class BridgeObject extends CityObject {
for
(
Installation
bi
:
bridgeInstallations
)
{
bi
.
prepareForChecking
();
}
for
(
BridgeObject
part
:
parts
)
{
part
.
prepareForChecking
();
}
}
@Override
...
...
@@ -369,6 +406,10 @@ public class BridgeObject extends CityObject {
ele
.
clearMetaInformation
();
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
br
.
clearMetaInformation
();
}
}
@Override
...
...
@@ -390,6 +431,10 @@ public class BridgeObject extends CityObject {
handler
.
addInstance
(
ele
);
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
handler
.
addInstance
(
br
);
}
}
public
void
anonymize
()
{
...
...
@@ -429,6 +474,10 @@ public class BridgeObject extends CityObject {
getConstructiveElements
().
add
(
handler
.
getCopyInstance
(
ele
));
}
for
(
BridgeRoom
br
:
originalBo
.
bridgeRooms
)
{
getBridgeRooms
().
add
(
handler
.
getCopyInstance
(
br
));
}
}
public
List
<
BoundarySurface
>
getBoundarySurfaces
()
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeRoom.java
0 → 100644
View file @
2c171abe
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
java.io.Serial
;
public
class
BridgeRoom
extends
AbstractRoom
{
@Serial
private
static
final
long
serialVersionUID
=
-
276088332165299253L
;
private
BridgeObject
parent
;
private
BridgeRoom
(){}
public
BridgeRoom
(
BridgeObject
parent
)
{
this
.
parent
=
parent
;
parent
.
addBridgeRoom
(
this
);
}
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
bridge
.
BridgeRoom
cgmlRoom
){
super
.
cgmlRoom
=
cgmlRoom
;
}
public
BridgeObject
getParent
()
{
return
parent
;
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
){
super
.
fillValues
(
original
,
handler
);
BridgeRoom
oRoom
=
(
BridgeRoom
)
original
;
parent
=
handler
.
getCopyInstance
(
oRoom
.
getParent
());
}
@Override
public
void
collectInstances
(
CopyHandler
handler
){
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
parent
);
}
@Override
public
Copyable
createCopyInstance
()
{
return
new
BridgeRoom
();
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingFurniture.java
0 → 100644
View file @
2c171abe
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
java.io.Serial
;
public
class
BuildingFurniture
extends
AbstractFurniture
{
@Serial
private
static
final
long
serialVersionUID
=
-
1046265159354525567L
;
public
BuildingFurniture
(
BuildingRoom
parent
)
{
setParent
(
parent
);
parent
.
addRoomFurniture
(
this
);
}
private
BuildingFurniture
(){}
@Override
public
Copyable
createCopyInstance
(){
return
new
BuildingFurniture
();
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingRoom.java
0 → 100644
View file @
2c171abe
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
java.io.Serial
;
public
class
BuildingRoom
extends
AbstractRoom
{
@Serial
private
static
final
long
serialVersionUID
=
-
276088332165299253L
;
private
AbstractBuilding
parent
;
private
BuildingRoom
(){}
public
BuildingRoom
(
AbstractBuilding
parent
)
{
this
.
parent
=
parent
;
parent
.
addBuildingRoom
(
this
);
}
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
building
.
BuildingRoom
cgmlRoom
){
super
.
cgmlRoom
=
cgmlRoom
;
}
public
AbstractBuilding
getParent
()
{
return
parent
;
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
){
super
.
fillValues
(
original
,
handler
);
BuildingRoom
oRoom
=
(
BuildingRoom
)
original
;
parent
=
handler
.
getCopyInstance
(
oRoom
.
getParent
());
}
@Override
public
void
collectInstances
(
CopyHandler
handler
){
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
parent
);
}
@Override
public
Copyable
createCopyInstance
()
{
return
new
BuildingRoom
();
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/FeatureType.java
View file @
2c171abe
...
...
@@ -27,6 +27,6 @@ package de.hft.stuttgart.citydoctor2.datastructure;
public
enum
FeatureType
{
BUILDING
,
TRANSPORTATION
,
VEGETATION
,
BRIDGE
,
LAND
,
WATER
,
BOUNDARY_SURFACE
,
INSTALLATION
,
OPENING
,
BUILDING_PART
,
BRIDGE_CONSTRUCTION_ELEMENT
,
BRIDGE_INSTALLATION
BUILDING_PART
,
BRIDGE_CONSTRUCTION_ELEMENT
,
BRIDGE_INSTALLATION
,
ROOM
,
FURNITURE
}
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