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
02de0a22
Commit
02de0a22
authored
Oct 30, 2024
by
Riegel
Browse files
Reformat code
parent
ad3589e8
Pipeline
#10297
passed with stage
in 1 minute and 5 seconds
Changes
61
Pipelines
1
Show whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractBuilding.java
View file @
02de0a22
...
@@ -18,10 +18,13 @@
...
@@ -18,10 +18,13 @@
*/
*/
package
de.hft.stuttgart.citydoctor2.datastructure
;
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
java.io.Serial
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
java.util.ArrayList
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
java.util.List
;
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.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.citygml4j.core.model.core.AbstractSpaceBoundaryProperty
;
import
org.citygml4j.core.model.core.AbstractSpaceBoundaryProperty
;
...
@@ -31,20 +34,15 @@ import org.xmlobjects.gml.model.geometry.aggregates.MultiSurfaceProperty;
...
@@ -31,20 +34,15 @@ import org.xmlobjects.gml.model.geometry.aggregates.MultiSurfaceProperty;
import
org.xmlobjects.gml.model.geometry.primitives.Solid
;
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
de.hft.stuttgart.citydoctor2.check.Check
;
import
java.io.Serial
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
java.util.ArrayList
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
java.util.List
;
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
;
/**
/**
* Container for attributes of an abstract building. It can be a Building or
* Container for attributes of an abstract building. It can be a Building or
* BuildingPart.
* BuildingPart.
*
*
* @author Matthias Betz
* @author Matthias Betz
*
*/
*/
public
abstract
class
AbstractBuilding
extends
CityObject
{
public
abstract
class
AbstractBuilding
extends
CityObject
{
...
@@ -114,7 +112,7 @@ public abstract class AbstractBuilding extends CityObject {
...
@@ -114,7 +112,7 @@ public abstract class AbstractBuilding extends CityObject {
@Override
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
){
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
continue
;
}
}
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractBuildingSubdivision.java
View file @
02de0a22
...
@@ -20,7 +20,7 @@ import java.io.Serial;
...
@@ -20,7 +20,7 @@ import java.io.Serial;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
public
abstract
class
AbstractBuildingSubdivision
extends
CityObject
{
public
abstract
class
AbstractBuildingSubdivision
extends
CityObject
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
7033994252340571002L
;
private
static
final
long
serialVersionUID
=
7033994252340571002L
;
...
@@ -77,7 +77,7 @@ public abstract class AbstractBuildingSubdivision extends CityObject{
...
@@ -77,7 +77,7 @@ public abstract class AbstractBuildingSubdivision extends CityObject{
@Override
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
){
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
continue
;
}
}
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
...
@@ -285,7 +285,6 @@ public abstract class AbstractBuildingSubdivision extends CityObject{
...
@@ -285,7 +285,6 @@ public abstract class AbstractBuildingSubdivision extends CityObject{
}
}
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
building
.
AbstractBuildingSubdivision
abs
)
{
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
building
.
AbstractBuildingSubdivision
abs
)
{
this
.
abs
=
abs
;
this
.
abs
=
abs
;
}
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractFurniture.java
View file @
02de0a22
...
@@ -20,7 +20,7 @@ import java.util.List;
...
@@ -20,7 +20,7 @@ import java.util.List;
/**
/**
* Represents all types of furniture used inside Buildings.
* Represents all types of furniture used inside Buildings.
*/
*/
public
abstract
class
AbstractFurniture
extends
CityObject
{
public
abstract
class
AbstractFurniture
extends
CityObject
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
-
9050689238027190674L
;
private
static
final
long
serialVersionUID
=
-
9050689238027190674L
;
...
@@ -43,7 +43,7 @@ public abstract class AbstractFurniture extends CityObject{
...
@@ -43,7 +43,7 @@ public abstract class AbstractFurniture extends CityObject{
}
}
@Override
@Override
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
){
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
)
{
super
.
collectContainedErrors
(
errors
);
super
.
collectContainedErrors
(
errors
);
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
collectContainedErrors
(
errors
);
boundarySurface
.
collectContainedErrors
(
errors
);
...
@@ -51,7 +51,7 @@ public abstract class AbstractFurniture extends CityObject{
...
@@ -51,7 +51,7 @@ public abstract class AbstractFurniture extends CityObject{
}
}
@Override
@Override
public
void
clearAllContainedCheckResults
(){
public
void
clearAllContainedCheckResults
()
{
super
.
clearAllContainedCheckResults
();
super
.
clearAllContainedCheckResults
();
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
clearAllContainedCheckResults
();
boundarySurface
.
clearAllContainedCheckResults
();
...
@@ -59,13 +59,13 @@ public abstract class AbstractFurniture extends CityObject{
...
@@ -59,13 +59,13 @@ public abstract class AbstractFurniture extends CityObject{
}
}
@Override
@Override
public
boolean
containsError
(
CheckId
checkIdentifier
){
public
boolean
containsError
(
CheckId
checkIdentifier
)
{
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
if
(
hasError
){
if
(
hasError
)
{
return
true
;
return
true
;
}
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
if
(
boundarySurface
.
containsError
(
checkIdentifier
)){
if
(
boundarySurface
.
containsError
(
checkIdentifier
))
{
return
true
;
return
true
;
}
}
}
}
...
@@ -73,13 +73,13 @@ public abstract class AbstractFurniture extends CityObject{
...
@@ -73,13 +73,13 @@ public abstract class AbstractFurniture extends CityObject{
}
}
@Override
@Override
public
boolean
containsAnyError
(){
public
boolean
containsAnyError
()
{
boolean
hasError
=
super
.
containsAnyError
();
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
){
if
(
hasError
)
{
return
true
;
return
true
;
}
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
if
(
boundarySurface
.
containsAnyError
()){
if
(
boundarySurface
.
containsAnyError
())
{
return
true
;
return
true
;
}
}
}
}
...
@@ -87,9 +87,8 @@ public abstract class AbstractFurniture extends CityObject{
...
@@ -87,9 +87,8 @@ public abstract class AbstractFurniture extends CityObject{
}
}
@Override
@Override
public
org
.
citygml4j
.
core
.
model
.
construction
.
AbstractFurniture
getGmlObject
(){
public
org
.
citygml4j
.
core
.
model
.
construction
.
AbstractFurniture
getGmlObject
()
{
return
af
;
return
af
;
}
}
...
@@ -105,7 +104,7 @@ public abstract class AbstractFurniture extends CityObject{
...
@@ -105,7 +104,7 @@ public abstract class AbstractFurniture extends CityObject{
@Override
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
){
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
continue
;
}
}
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
...
@@ -118,7 +117,7 @@ public abstract class AbstractFurniture extends CityObject{
...
@@ -118,7 +117,7 @@ public abstract class AbstractFurniture extends CityObject{
}
}
}
}
protected
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
construction
.
AbstractFurniture
af
){
protected
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
construction
.
AbstractFurniture
af
)
{
this
.
af
=
af
;
this
.
af
=
af
;
}
}
...
@@ -171,7 +170,7 @@ public abstract class AbstractFurniture extends CityObject{
...
@@ -171,7 +170,7 @@ public abstract class AbstractFurniture extends CityObject{
@Override
@Override
public
void
prepareForChecking
(){
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
super
.
prepareForChecking
();
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
prepareForChecking
();
boundarySurface
.
prepareForChecking
();
...
@@ -193,7 +192,7 @@ public abstract class AbstractFurniture extends CityObject{
...
@@ -193,7 +192,7 @@ public abstract class AbstractFurniture extends CityObject{
}
}
@Override
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
){
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
super
.
fillValues
(
original
,
handler
);
AbstractFurniture
originalAf
=
(
AbstractFurniture
)
original
;
AbstractFurniture
originalAf
=
(
AbstractFurniture
)
original
;
af
=
originalAf
.
af
;
af
=
originalAf
.
af
;
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractRoom.java
View file @
02de0a22
...
@@ -21,7 +21,7 @@ import java.util.List;
...
@@ -21,7 +21,7 @@ import java.util.List;
/**
/**
* Abstract base class for rooms inside CityGML 3.0 construction objects.
* Abstract base class for rooms inside CityGML 3.0 construction objects.
*/
*/
public
abstract
class
AbstractRoom
extends
CityObject
{
public
abstract
class
AbstractRoom
extends
CityObject
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
-
1730625513988944329L
;
private
static
final
long
serialVersionUID
=
-
1730625513988944329L
;
...
@@ -35,7 +35,6 @@ public abstract class AbstractRoom extends CityObject{
...
@@ -35,7 +35,6 @@ public abstract class AbstractRoom extends CityObject{
protected
org
.
citygml4j
.
core
.
model
.
core
.
AbstractUnoccupiedSpace
cgmlRoom
;
protected
org
.
citygml4j
.
core
.
model
.
core
.
AbstractUnoccupiedSpace
cgmlRoom
;
@Override
@Override
public
void
accept
(
Check
c
)
{
public
void
accept
(
Check
c
)
{
super
.
accept
(
c
);
super
.
accept
(
c
);
...
@@ -51,7 +50,7 @@ public abstract class AbstractRoom extends CityObject{
...
@@ -51,7 +50,7 @@ public abstract class AbstractRoom extends CityObject{
}
}
@Override
@Override
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
){
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
)
{
super
.
collectContainedErrors
(
errors
);
super
.
collectContainedErrors
(
errors
);
for
(
Installation
roomInstallation
:
roomInstallations
)
{
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
collectContainedErrors
(
errors
);
roomInstallation
.
collectContainedErrors
(
errors
);
...
@@ -62,7 +61,7 @@ public abstract class AbstractRoom extends CityObject{
...
@@ -62,7 +61,7 @@ public abstract class AbstractRoom extends CityObject{
}
}
@Override
@Override
public
void
clearAllContainedCheckResults
(){
public
void
clearAllContainedCheckResults
()
{
super
.
clearAllContainedCheckResults
();
super
.
clearAllContainedCheckResults
();
for
(
Installation
roomInstallation
:
roomInstallations
)
{
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
clearAllContainedCheckResults
();
roomInstallation
.
clearAllContainedCheckResults
();
...
@@ -73,18 +72,18 @@ public abstract class AbstractRoom extends CityObject{
...
@@ -73,18 +72,18 @@ public abstract class AbstractRoom extends CityObject{
}
}
@Override
@Override
public
boolean
containsError
(
CheckId
checkIdentifier
){
public
boolean
containsError
(
CheckId
checkIdentifier
)
{
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
if
(
hasError
){
if
(
hasError
)
{
return
true
;
return
true
;
}
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
for
(
Installation
roomInstallation
:
roomInstallations
)
{
if
(
roomInstallation
.
containsError
(
checkIdentifier
)){
if
(
roomInstallation
.
containsError
(
checkIdentifier
))
{
return
true
;
return
true
;
}
}
}
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
if
(
boundarySurface
.
containsError
(
checkIdentifier
)){
if
(
boundarySurface
.
containsError
(
checkIdentifier
))
{
return
true
;
return
true
;
}
}
}
}
...
@@ -92,18 +91,18 @@ public abstract class AbstractRoom extends CityObject{
...
@@ -92,18 +91,18 @@ public abstract class AbstractRoom extends CityObject{
}
}
@Override
@Override
public
boolean
containsAnyError
(){
public
boolean
containsAnyError
()
{
boolean
hasError
=
super
.
containsAnyError
();
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
){
if
(
hasError
)
{
return
true
;
return
true
;
}
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
for
(
Installation
roomInstallation
:
roomInstallations
)
{
if
(
roomInstallation
.
containsAnyError
()){
if
(
roomInstallation
.
containsAnyError
())
{
return
true
;
return
true
;
}
}
}
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
if
(
boundarySurface
.
containsAnyError
()){
if
(
boundarySurface
.
containsAnyError
())
{
return
true
;
return
true
;
}
}
}
}
...
@@ -113,7 +112,7 @@ public abstract class AbstractRoom extends CityObject{
...
@@ -113,7 +112,7 @@ public abstract class AbstractRoom extends CityObject{
@Override
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
){
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
continue
;
}
}
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
...
@@ -183,7 +182,7 @@ public abstract class AbstractRoom extends CityObject{
...
@@ -183,7 +182,7 @@ public abstract class AbstractRoom extends CityObject{
}
}
@Override
@Override
public
void
prepareForChecking
(){
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
super
.
prepareForChecking
();
for
(
Installation
roomInstallation
:
roomInstallations
)
{
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
prepareForChecking
();
roomInstallation
.
prepareForChecking
();
...
@@ -205,7 +204,6 @@ public abstract class AbstractRoom extends CityObject{
...
@@ -205,7 +204,6 @@ public abstract class AbstractRoom extends CityObject{
}
}
@Override
@Override
public
AbstractCityObject
getGmlObject
()
{
public
AbstractCityObject
getGmlObject
()
{
return
cgmlRoom
;
return
cgmlRoom
;
...
@@ -232,21 +230,20 @@ public abstract class AbstractRoom extends CityObject{
...
@@ -232,21 +230,20 @@ public abstract class AbstractRoom extends CityObject{
}
}
@Override
@Override
public
FeatureType
getFeatureType
()
{
public
FeatureType
getFeatureType
()
{
return
FeatureType
.
ROOM
;
return
FeatureType
.
ROOM
;
}
}
@Override
@Override
public
void
collectInstances
(
CopyHandler
handler
){
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
roomInstallations
);
handler
.
addInstance
(
roomInstallations
);
handler
.
addInstance
(
boundarySurfaceList
);
handler
.
addInstance
(
boundarySurfaceList
);
}
}
@Override
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
){
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
super
.
fillValues
(
original
,
handler
);
AbstractRoom
originalAr
=
(
AbstractRoom
)
original
;
AbstractRoom
originalAr
=
(
AbstractRoom
)
original
;
for
(
BoundarySurface
originalBs
:
originalAr
.
boundarySurfaceList
)
{
for
(
BoundarySurface
originalBs
:
originalAr
.
boundarySurfaceList
)
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractTunnel.java
View file @
02de0a22
...
@@ -20,7 +20,7 @@ import java.io.Serial;
...
@@ -20,7 +20,7 @@ import java.io.Serial;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
public
abstract
class
AbstractTunnel
extends
CityObject
{
public
abstract
class
AbstractTunnel
extends
CityObject
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
-
2196414503088741206L
;
private
static
final
long
serialVersionUID
=
-
2196414503088741206L
;
...
@@ -84,7 +84,7 @@ public abstract class AbstractTunnel extends CityObject{
...
@@ -84,7 +84,7 @@ public abstract class AbstractTunnel extends CityObject{
@Override
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
){
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
continue
;
}
}
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BoundarySurface.java
View file @
02de0a22
...
@@ -18,15 +18,6 @@
...
@@ -18,15 +18,6 @@
*/
*/
package
de.hft.stuttgart.citydoctor2.datastructure
;
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
java.io.Serial
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.citygml4j.core.model.core.AbstractThematicSurface
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurface
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurfaceProperty
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
...
@@ -34,12 +25,19 @@ import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
...
@@ -34,12 +25,19 @@ import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
import
de.hft.stuttgart.citydoctor2.utils.CityGmlUtils
;
import
de.hft.stuttgart.citydoctor2.utils.CityGmlUtils
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.citygml4j.core.model.core.AbstractThematicSurface
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurface
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurfaceProperty
;
import
java.io.Serial
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
/**
* Representing a boundary surface in CityGML
* Representing a boundary surface in CityGML
*
*
* @author Matthias Betz
* @author Matthias Betz
*
*/
*/
public
class
BoundarySurface
extends
CityObject
{
public
class
BoundarySurface
extends
CityObject
{
...
@@ -94,7 +92,7 @@ public class BoundarySurface extends CityObject {
...
@@ -94,7 +92,7 @@ public class BoundarySurface extends CityObject {
gmlObject
.
setId
(
getGmlId
().
getGmlString
());
gmlObject
.
setId
(
getGmlId
().
getGmlString
());
}
}
for
(
Geometry
geom
:
getGeometries
())
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
){
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
continue
;
}
}
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BoundarySurfaceType.java
View file @
02de0a22
...
@@ -22,7 +22,6 @@ package de.hft.stuttgart.citydoctor2.datastructure;
...
@@ -22,7 +22,6 @@ package de.hft.stuttgart.citydoctor2.datastructure;
* Types of boundary surfaces used in city doctor
* Types of boundary surfaces used in city doctor
*
*
* @author Matthias Betz
* @author Matthias Betz
*
*/
*/
public
enum
BoundarySurfaceType
{
public
enum
BoundarySurfaceType
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BoundingBox.java
View file @
02de0a22
...
@@ -18,17 +18,16 @@
...
@@ -18,17 +18,16 @@
*/
*/
package
de.hft.stuttgart.citydoctor2.datastructure
;
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
java.util.Collection
;
import
java.util.List
;
import
de.hft.stuttgart.citydoctor2.math.Vector3d
;
import
de.hft.stuttgart.citydoctor2.math.Vector3d
;
import
de.hft.stuttgart.citydoctor2.utils.BoundingBoxCalculator
;
import
de.hft.stuttgart.citydoctor2.utils.BoundingBoxCalculator
;
import
java.util.Collection
;
import
java.util.List
;
/**
/**
* An axis aligned bounding box represented by its two corners
* An axis aligned bounding box represented by its two corners
*
*
* @author Matthias Betz
* @author Matthias Betz
*
*/
*/
public
class
BoundingBox
{
public
class
BoundingBox
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeConstructiveElement.java
View file @
02de0a22
...
@@ -18,10 +18,13 @@
...
@@ -18,10 +18,13 @@
*/
*/
package
de.hft.stuttgart.citydoctor2.datastructure
;
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
java.io.Serial
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
java.util.ArrayList
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
java.util.List
;
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.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.citygml4j.core.model.core.AbstractSpaceBoundaryProperty
;
import
org.citygml4j.core.model.core.AbstractSpaceBoundaryProperty
;
...
@@ -34,13 +37,9 @@ import org.xmlobjects.gml.model.geometry.complexes.CompositeSurface;
...
@@ -34,13 +37,9 @@ import org.xmlobjects.gml.model.geometry.complexes.CompositeSurface;
import
org.xmlobjects.gml.model.geometry.primitives.Solid
;
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
de.hft.stuttgart.citydoctor2.check.Check
;
import
java.io.Serial
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
java.util.ArrayList
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
java.util.List
;
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
;
public
class
BridgeConstructiveElement
extends
CityObject
{
public
class
BridgeConstructiveElement
extends
CityObject
{
...
@@ -70,7 +69,7 @@ public class BridgeConstructiveElement extends CityObject {
...
@@ -70,7 +69,7 @@ public class BridgeConstructiveElement extends CityObject {
// unknown which CityGML is handled here
// unknown which CityGML is handled here
// need context information to decide
// need context information to decide
for
(
Geometry
geom
:
getGeometries
())
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
){
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
continue
;
}
}
switch
(
geom
.
getType
())
{
switch
(
geom
.
getType
())
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeObject.java
View file @
02de0a22
...
@@ -55,6 +55,7 @@ public class BridgeObject extends CityObject {
...
@@ -55,6 +55,7 @@ public class BridgeObject extends CityObject {
private
final
List
<
BridgeRoom
>
bridgeRooms
=
new
ArrayList
<>(
2
);
private
final
List
<
BridgeRoom
>
bridgeRooms
=
new
ArrayList
<>(
2
);
private
AbstractBridge
ab
;
private
AbstractBridge
ab
;
private
BridgeType
type
;
private
BridgeType
type
;
public
BridgeObject
(
BridgeType
type
,
AbstractBridge
ab
)
{
public
BridgeObject
(
BridgeType
type
,
AbstractBridge
ab
)
{
this
.
ab
=
ab
;
this
.
ab
=
ab
;
this
.
type
=
type
;
this
.
type
=
type
;
...
@@ -80,7 +81,7 @@ public class BridgeObject extends CityObject {
...
@@ -80,7 +81,7 @@ public class BridgeObject extends CityObject {
@Override
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
){
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
continue
;
}
}
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
...
@@ -146,6 +147,7 @@ public class BridgeObject extends CityObject {
...
@@ -146,6 +147,7 @@ public class BridgeObject extends CityObject {
throw
new
IllegalStateException
(
"Cannot add "
+
geom
.
getLod
()
+
" solid to bridges"
);
throw
new
IllegalStateException
(
"Cannot add "
+
geom
.
getLod
()
+
" solid to bridges"
);
}
}
}
}
public
void
addBridgeInstallation
(
Installation
coBi
)
{
public
void
addBridgeInstallation
(
Installation
coBi
)
{
bridgeInstallations
.
add
(
coBi
);
bridgeInstallations
.
add
(
coBi
);
coBi
.
setParent
(
this
);
coBi
.
setParent
(
this
);
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeRoom.java
View file @
02de0a22
...
@@ -12,7 +12,8 @@ public class BridgeRoom extends AbstractRoom {
...
@@ -12,7 +12,8 @@ public class BridgeRoom extends AbstractRoom {
private
BridgeObject
parent
;
private
BridgeObject
parent
;
private
BridgeRoom
(){}
private
BridgeRoom
()
{
}
public
BridgeRoom
(
BridgeObject
parent
)
{
public
BridgeRoom
(
BridgeObject
parent
)
{
this
.
parent
=
parent
;
this
.
parent
=
parent
;
...
@@ -20,7 +21,7 @@ public class BridgeRoom extends AbstractRoom {
...
@@ -20,7 +21,7 @@ public class BridgeRoom extends AbstractRoom {
}
}
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
bridge
.
BridgeRoom
cgmlRoom
){
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
bridge
.
BridgeRoom
cgmlRoom
)
{
super
.
cgmlRoom
=
cgmlRoom
;
super
.
cgmlRoom
=
cgmlRoom
;
}
}
...
@@ -30,14 +31,14 @@ public class BridgeRoom extends AbstractRoom {
...
@@ -30,14 +31,14 @@ public class BridgeRoom extends AbstractRoom {
}
}
@Override
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
){
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
super
.
fillValues
(
original
,
handler
);
BridgeRoom
oRoom
=
(
BridgeRoom
)
original
;
BridgeRoom
oRoom
=
(
BridgeRoom
)
original
;
parent
=
handler
.
getCopyInstance
(
oRoom
.
getParent
());
parent
=
handler
.
getCopyInstance
(
oRoom
.
getParent
());
}
}
@Override
@Override
public
void
collectInstances
(
CopyHandler
handler
){
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
parent
);
handler
.
addInstance
(
parent
);
}
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeRoomFurniture.java
View file @
02de0a22
...
@@ -15,7 +15,7 @@ public class BridgeRoomFurniture extends AbstractFurniture {
...
@@ -15,7 +15,7 @@ public class BridgeRoomFurniture extends AbstractFurniture {
}
}
@Override
@Override
public
Copyable
createCopyInstance
(){
public
Copyable
createCopyInstance
()
{
return
new
BridgeRoomFurniture
();
return
new
BridgeRoomFurniture
();
}
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Building.java
View file @
02de0a22
...
@@ -18,21 +18,20 @@
...
@@ -18,21 +18,20 @@
*/
*/
package
de.hft.stuttgart.citydoctor2.datastructure
;
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
java.io.Serial
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.citygml4j.core.model.building.BuildingInstallation
;
import
org.citygml4j.core.model.building.BuildingInstallationProperty
;
import
org.citygml4j.core.model.core.AbstractSpaceBoundaryProperty
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.citygml4j.core.model.building.BuildingInstallation
;
import
org.citygml4j.core.model.building.BuildingInstallationProperty
;
import
org.citygml4j.core.model.core.AbstractSpaceBoundaryProperty
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
java.io.Serial
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
Building
extends
AbstractBuilding
{
public
class
Building
extends
AbstractBuilding
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingPart.java
View file @
02de0a22
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingRoom.java
View file @
02de0a22
...
@@ -8,19 +8,19 @@ import java.io.Serial;
...
@@ -8,19 +8,19 @@ import java.io.Serial;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
public
class
BuildingRoom
extends
AbstractRoom
{
public
class
BuildingRoom
extends
AbstractRoom
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
-
276088332165299253L
;
private
static
final
long
serialVersionUID
=
-
276088332165299253L
;
private
final
List
<
BuildingFurnitureProperty
>
furnitureRefs
=
new
ArrayList
<>(
2
);
private
final
List
<
BuildingFurnitureProperty
>
furnitureRefs
=
new
ArrayList
<>(
2
);
private
CityObject
parent
;
private
CityObject
parent
;
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
building
.
BuildingRoom
cgmlRoom
){
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
building
.
BuildingRoom
cgmlRoom
)
{
super
.
cgmlRoom
=
cgmlRoom
;
super
.
cgmlRoom
=
cgmlRoom
;
}
}
public
void
setParent
(
CityObject
parent
){
public
void
setParent
(
CityObject
parent
)
{
this
.
parent
=
parent
;
this
.
parent
=
parent
;
}
}
...
@@ -31,6 +31,7 @@ public class BuildingRoom extends AbstractRoom{
...
@@ -31,6 +31,7 @@ public class BuildingRoom extends AbstractRoom{
/**
/**
* Returns the list of citygml3 furniture objects registered to this room.
* Returns the list of citygml3 furniture objects registered to this room.
* The reference objects only hold a HRef to the actual furniture object.
* The reference objects only hold a HRef to the actual furniture object.
*
* @return
* @return
*/
*/
public
List
<
BuildingFurnitureProperty
>
getFurnitureRefs
()
{
public
List
<
BuildingFurnitureProperty
>
getFurnitureRefs
()
{
...
@@ -42,7 +43,7 @@ public class BuildingRoom extends AbstractRoom{
...
@@ -42,7 +43,7 @@ public class BuildingRoom extends AbstractRoom{
}
}
@Override
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
){
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
super
.
fillValues
(
original
,
handler
);
BuildingRoom
oRoom
=
(
BuildingRoom
)
original
;
BuildingRoom
oRoom
=
(
BuildingRoom
)
original
;
...
@@ -50,7 +51,7 @@ public class BuildingRoom extends AbstractRoom{
...
@@ -50,7 +51,7 @@ public class BuildingRoom extends AbstractRoom{
}
}
@Override
@Override
public
void
collectInstances
(
CopyHandler
handler
){
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
parent
);
handler
.
addInstance
(
parent
);
}
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingRoomFurniture.java
View file @
02de0a22
...
@@ -16,7 +16,7 @@ public class BuildingRoomFurniture extends AbstractFurniture {
...
@@ -16,7 +16,7 @@ public class BuildingRoomFurniture extends AbstractFurniture {
}
}
@Override
@Override
public
Copyable
createCopyInstance
(){
public
Copyable
createCopyInstance
()
{
return
new
BuildingRoomFurniture
();
return
new
BuildingRoomFurniture
();
}
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingUnit.java
View file @
02de0a22
...
@@ -12,7 +12,7 @@ import java.io.Serial;
...
@@ -12,7 +12,7 @@ import java.io.Serial;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
public
class
BuildingUnit
extends
AbstractBuildingSubdivision
{
public
class
BuildingUnit
extends
AbstractBuildingSubdivision
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
-
2931788311665810322L
;
private
static
final
long
serialVersionUID
=
-
2931788311665810322L
;
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityDoctorModel.java
View file @
02de0a22
...
@@ -18,24 +18,6 @@
...
@@ -18,24 +18,6 @@
*/
*/
package
de.hft.stuttgart.citydoctor2.datastructure
;
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
java.io.BufferedWriter
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.UncheckedIOException
;
import
java.nio.file.Files
;
import
java.util.ArrayList
;
import
java.util.EnumMap
;
import
java.util.HashSet
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.stream.Stream
;
import
org.citygml4j.core.model.CityGMLVersion
;
import
org.citygml4j.core.model.core.CityModel
;
import
de.hft.stuttgart.citydoctor2.check.AbstractCheck
;
import
de.hft.stuttgart.citydoctor2.check.AbstractCheck
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
...
@@ -43,13 +25,23 @@ import de.hft.stuttgart.citydoctor2.exceptions.CityDoctorWriteException;
...
@@ -43,13 +25,23 @@ import de.hft.stuttgart.citydoctor2.exceptions.CityDoctorWriteException;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.writer.CityGMLWriterUtils
;
import
de.hft.stuttgart.citydoctor2.writer.CityGMLWriterUtils
;
import
de.hft.stuttgart.quality.model.types.ValidationPlan
;
import
de.hft.stuttgart.quality.model.types.ValidationPlan
;
import
org.citygml4j.core.model.CityGMLVersion
;
import
org.citygml4j.core.model.core.CityModel
;
import
java.io.BufferedWriter
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.UncheckedIOException
;
import
java.nio.file.Files
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.stream.Stream
;
/**
/**
* The complete CityGML model containing all features that are used in
* The complete CityGML model containing all features that are used in
* CityDoctor
* CityDoctor
*
*
* @author Matthias Betz
* @author Matthias Betz
*
*/
*/
public
class
CityDoctorModel
{
public
class
CityDoctorModel
{
...
@@ -127,7 +119,7 @@ public class CityDoctorModel {
...
@@ -127,7 +119,7 @@ public class CityDoctorModel {
public
Stream
<
CityObject
>
createFeatureStream
()
{
public
Stream
<
CityObject
>
createFeatureStream
()
{
return
Stream
.
of
(
buildings
.
stream
(),
vegetation
.
stream
(),
bridges
.
stream
(),
land
.
stream
(),
roads
.
stream
(),
return
Stream
.
of
(
buildings
.
stream
(),
vegetation
.
stream
(),
bridges
.
stream
(),
land
.
stream
(),
roads
.
stream
(),
tunnels
.
stream
()
,
water
.
stream
(),
cityfurniture
.
stream
(),
genericObjects
.
stream
()).
flatMap
(
co
->
co
);
tunnels
.
stream
(),
water
.
stream
(),
cityfurniture
.
stream
(),
genericObjects
.
stream
()).
flatMap
(
co
->
co
);
}
}
public
void
saveAs
(
String
file
,
boolean
saveQualityAde
)
throws
CityDoctorWriteException
{
public
void
saveAs
(
String
file
,
boolean
saveQualityAde
)
throws
CityDoctorWriteException
{
...
@@ -270,11 +262,11 @@ public class CityDoctorModel {
...
@@ -270,11 +262,11 @@ public class CityDoctorModel {
cityfurniture
.
add
(
coFurniture
);
cityfurniture
.
add
(
coFurniture
);
}
}
public
List
<
GenericCityObject
>
getGenericCityObjects
(){
public
List
<
GenericCityObject
>
getGenericCityObjects
()
{
return
genericObjects
;
return
genericObjects
;
}
}
public
void
addGenericCityObject
(
GenericCityObject
coGenericCityObject
){
public
void
addGenericCityObject
(
GenericCityObject
coGenericCityObject
)
{
genericObjects
.
add
(
coGenericCityObject
);
genericObjects
.
add
(
coGenericCityObject
);
}
}
...
@@ -328,7 +320,7 @@ public class CityDoctorModel {
...
@@ -328,7 +320,7 @@ public class CityDoctorModel {
public
int
getNumberOfFeatures
()
{
public
int
getNumberOfFeatures
()
{
return
buildings
.
size
()
+
vegetation
.
size
()
+
bridges
.
size
()
+
land
.
size
()
+
tunnels
.
size
()
return
buildings
.
size
()
+
vegetation
.
size
()
+
bridges
.
size
()
+
land
.
size
()
+
tunnels
.
size
()
+
roads
.
size
()
+
water
.
size
()
+
cityfurniture
.
size
()
+
genericObjects
.
size
();
+
roads
.
size
()
+
water
.
size
()
+
cityfurniture
.
size
()
+
genericObjects
.
size
();
}
}
public
ParserConfiguration
getParserConfig
()
{
public
ParserConfiguration
getParserConfig
()
{
...
@@ -342,9 +334,9 @@ public class CityDoctorModel {
...
@@ -342,9 +334,9 @@ public class CityDoctorModel {
replaceBridge
(
currentFeature
,
nextFeature
);
replaceBridge
(
currentFeature
,
nextFeature
);
}
else
if
(
nextFeature
instanceof
TransportationObject
)
{
}
else
if
(
nextFeature
instanceof
TransportationObject
)
{
replaceTransportationObject
(
currentFeature
,
nextFeature
);
replaceTransportationObject
(
currentFeature
,
nextFeature
);
}
else
if
(
nextFeature
instanceof
Tunnel
)
{
}
else
if
(
nextFeature
instanceof
Tunnel
)
{
replaceTunnel
(
currentFeature
,
nextFeature
);
replaceTunnel
(
currentFeature
,
nextFeature
);
}
else
if
(
nextFeature
instanceof
Vegetation
)
{
}
else
if
(
nextFeature
instanceof
Vegetation
)
{
replaceVegetation
(
currentFeature
,
nextFeature
);
replaceVegetation
(
currentFeature
,
nextFeature
);
}
else
if
(
nextFeature
instanceof
LandObject
)
{
}
else
if
(
nextFeature
instanceof
LandObject
)
{
replaceLandObject
(
currentFeature
,
nextFeature
);
replaceLandObject
(
currentFeature
,
nextFeature
);
...
@@ -405,7 +397,7 @@ public class CityDoctorModel {
...
@@ -405,7 +397,7 @@ public class CityDoctorModel {
roads
.
set
(
index
,
(
TransportationObject
)
nextFeature
);
roads
.
set
(
index
,
(
TransportationObject
)
nextFeature
);
}
}
private
void
replaceTunnel
(
CityObject
currentFeature
,
CityObject
nextFeature
){
private
void
replaceTunnel
(
CityObject
currentFeature
,
CityObject
nextFeature
)
{
int
index
=
tunnels
.
indexOf
(
currentFeature
);
int
index
=
tunnels
.
indexOf
(
currentFeature
);
if
(
index
==
-
1
)
{
if
(
index
==
-
1
)
{
throw
new
IllegalStateException
(
COULD_NOT_FIND_FEATURE
+
currentFeature
+
" in tunnels"
);
throw
new
IllegalStateException
(
COULD_NOT_FIND_FEATURE
+
currentFeature
+
" in tunnels"
);
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityFurniture.java
View file @
02de0a22
...
@@ -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.io.Serial
;
import
java.io.Serial
;
public
class
CityFurniture
extends
CityObject
{
public
class
CityFurniture
extends
CityObject
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
3325661061543962473L
;
private
static
final
long
serialVersionUID
=
3325661061543962473L
;
...
@@ -53,7 +53,7 @@ public class CityFurniture extends CityObject{
...
@@ -53,7 +53,7 @@ public class CityFurniture extends CityObject{
@Override
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
){
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
continue
;
}
}
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
if
(
geom
.
getType
()
==
GeometryType
.
MULTI_SURFACE
)
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityObject.java
View file @
02de0a22
...
@@ -18,20 +18,19 @@
...
@@ -18,20 +18,19 @@
*/
*/
package
de.hft.stuttgart.citydoctor2.datastructure
;
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
java.io.Serial
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
org.citygml4j.core.model.core.AbstractCityObject
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.citygml4j.core.model.core.AbstractCityObject
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
java.io.Serial
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
/**
/**
* Abstract class for general features such as Buildings, Water objects, ...
* Abstract class for general features such as Buildings, Water objects, ...
...
@@ -39,7 +38,6 @@ import de.hft.stuttgart.citydoctor2.utils.Copyable;
...
@@ -39,7 +38,6 @@ import de.hft.stuttgart.citydoctor2.utils.Copyable;
* Contains the geometries
* Contains the geometries
*
*
* @author Matthias Betz
* @author Matthias Betz
*
*/
*/
public
abstract
class
CityObject
extends
GmlElement
{
public
abstract
class
CityObject
extends
GmlElement
{
...
...
Prev
1
2
3
4
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