Commit 02de0a22 authored by Riegel's avatar Riegel
Browse files

Reformat code

parent ad3589e8
Pipeline #10297 passed with stage
in 1 minute and 5 seconds
......@@ -18,10 +18,13 @@
*/
package de.hft.stuttgart.citydoctor2.datastructure;
import java.io.Serial;
import java.util.ArrayList;
import java.util.List;
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.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.citygml4j.core.model.core.AbstractSpaceBoundaryProperty;
......@@ -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.SolidProperty;
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 java.io.Serial;
import java.util.ArrayList;
import java.util.List;
/**
* Container for attributes of an abstract building. It can be a Building or
* BuildingPart.
*
* @author Matthias Betz
*
*/
public abstract class AbstractBuilding extends CityObject {
......@@ -114,7 +112,7 @@ public abstract class AbstractBuilding extends CityObject {
@Override
public void reCreateGeometries(GeometryFactory factory, ParserConfiguration config) {
for (Geometry geom : getGeometries()) {
if (geom instanceof ImplicitGeometryHolder){
if (geom instanceof ImplicitGeometryHolder) {
continue;
}
if (geom.getType() == GeometryType.MULTI_SURFACE) {
......
......@@ -20,7 +20,7 @@ import java.io.Serial;
import java.util.ArrayList;
import java.util.List;
public abstract class AbstractBuildingSubdivision extends CityObject{
public abstract class AbstractBuildingSubdivision extends CityObject {
@Serial
private static final long serialVersionUID = 7033994252340571002L;
......@@ -77,7 +77,7 @@ public abstract class AbstractBuildingSubdivision extends CityObject{
@Override
public void reCreateGeometries(GeometryFactory factory, ParserConfiguration config) {
for (Geometry geom : getGeometries()) {
if (geom instanceof ImplicitGeometryHolder){
if (geom instanceof ImplicitGeometryHolder) {
continue;
}
if (geom.getType() == GeometryType.MULTI_SURFACE) {
......@@ -285,7 +285,6 @@ public abstract class AbstractBuildingSubdivision extends CityObject{
}
public void setGmlObject(org.citygml4j.core.model.building.AbstractBuildingSubdivision abs) {
this.abs = abs;
}
......
......@@ -20,7 +20,7 @@ import java.util.List;
/**
* Represents all types of furniture used inside Buildings.
*/
public abstract class AbstractFurniture extends CityObject{
public abstract class AbstractFurniture extends CityObject {
@Serial
private static final long serialVersionUID = -9050689238027190674L;
......@@ -43,7 +43,7 @@ public abstract class AbstractFurniture extends CityObject{
}
@Override
public void collectContainedErrors(List<CheckError> errors){
public void collectContainedErrors(List<CheckError> errors) {
super.collectContainedErrors(errors);
for (BoundarySurface boundarySurface : boundarySurfaceList) {
boundarySurface.collectContainedErrors(errors);
......@@ -51,7 +51,7 @@ public abstract class AbstractFurniture extends CityObject{
}
@Override
public void clearAllContainedCheckResults(){
public void clearAllContainedCheckResults() {
super.clearAllContainedCheckResults();
for (BoundarySurface boundarySurface : boundarySurfaceList) {
boundarySurface.clearAllContainedCheckResults();
......@@ -59,13 +59,13 @@ public abstract class AbstractFurniture extends CityObject{
}
@Override
public boolean containsError(CheckId checkIdentifier){
public boolean containsError(CheckId checkIdentifier) {
boolean hasError = super.containsError(checkIdentifier);
if (hasError){
if (hasError) {
return true;
}
for (BoundarySurface boundarySurface : boundarySurfaceList) {
if (boundarySurface.containsError(checkIdentifier)){
if (boundarySurface.containsError(checkIdentifier)) {
return true;
}
}
......@@ -73,13 +73,13 @@ public abstract class AbstractFurniture extends CityObject{
}
@Override
public boolean containsAnyError(){
public boolean containsAnyError() {
boolean hasError = super.containsAnyError();
if (hasError){
if (hasError) {
return true;
}
for (BoundarySurface boundarySurface : boundarySurfaceList) {
if (boundarySurface.containsAnyError()){
if (boundarySurface.containsAnyError()) {
return true;
}
}
......@@ -87,9 +87,8 @@ public abstract class AbstractFurniture extends CityObject{
}
@Override
public org.citygml4j.core.model.construction.AbstractFurniture getGmlObject(){
public org.citygml4j.core.model.construction.AbstractFurniture getGmlObject() {
return af;
}
......@@ -105,7 +104,7 @@ public abstract class AbstractFurniture extends CityObject{
@Override
public void reCreateGeometries(GeometryFactory factory, ParserConfiguration config) {
for (Geometry geom : getGeometries()) {
if (geom instanceof ImplicitGeometryHolder){
if (geom instanceof ImplicitGeometryHolder) {
continue;
}
if (geom.getType() == GeometryType.MULTI_SURFACE) {
......@@ -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;
}
......@@ -171,7 +170,7 @@ public abstract class AbstractFurniture extends CityObject{
@Override
public void prepareForChecking(){
public void prepareForChecking() {
super.prepareForChecking();
for (BoundarySurface boundarySurface : boundarySurfaceList) {
boundarySurface.prepareForChecking();
......@@ -193,7 +192,7 @@ public abstract class AbstractFurniture extends CityObject{
}
@Override
public void fillValues(Copyable original, CopyHandler handler){
public void fillValues(Copyable original, CopyHandler handler) {
super.fillValues(original, handler);
AbstractFurniture originalAf = (AbstractFurniture) original;
af = originalAf.af;
......
......@@ -21,7 +21,7 @@ import java.util.List;
/**
* Abstract base class for rooms inside CityGML 3.0 construction objects.
*/
public abstract class AbstractRoom extends CityObject{
public abstract class AbstractRoom extends CityObject {
@Serial
private static final long serialVersionUID = -1730625513988944329L;
......@@ -35,7 +35,6 @@ public abstract class AbstractRoom extends CityObject{
protected org.citygml4j.core.model.core.AbstractUnoccupiedSpace cgmlRoom;
@Override
public void accept(Check c) {
super.accept(c);
......@@ -51,7 +50,7 @@ public abstract class AbstractRoom extends CityObject{
}
@Override
public void collectContainedErrors(List<CheckError> errors){
public void collectContainedErrors(List<CheckError> errors) {
super.collectContainedErrors(errors);
for (Installation roomInstallation : roomInstallations) {
roomInstallation.collectContainedErrors(errors);
......@@ -62,7 +61,7 @@ public abstract class AbstractRoom extends CityObject{
}
@Override
public void clearAllContainedCheckResults(){
public void clearAllContainedCheckResults() {
super.clearAllContainedCheckResults();
for (Installation roomInstallation : roomInstallations) {
roomInstallation.clearAllContainedCheckResults();
......@@ -73,18 +72,18 @@ public abstract class AbstractRoom extends CityObject{
}
@Override
public boolean containsError(CheckId checkIdentifier){
public boolean containsError(CheckId checkIdentifier) {
boolean hasError = super.containsError(checkIdentifier);
if (hasError){
if (hasError) {
return true;
}
for (Installation roomInstallation : roomInstallations) {
if (roomInstallation.containsError(checkIdentifier)){
if (roomInstallation.containsError(checkIdentifier)) {
return true;
}
}
for (BoundarySurface boundarySurface : boundarySurfaceList) {
if (boundarySurface.containsError(checkIdentifier)){
if (boundarySurface.containsError(checkIdentifier)) {
return true;
}
}
......@@ -92,18 +91,18 @@ public abstract class AbstractRoom extends CityObject{
}
@Override
public boolean containsAnyError(){
public boolean containsAnyError() {
boolean hasError = super.containsAnyError();
if (hasError){
if (hasError) {
return true;
}
for (Installation roomInstallation : roomInstallations) {
if (roomInstallation.containsAnyError()){
if (roomInstallation.containsAnyError()) {
return true;
}
}
for (BoundarySurface boundarySurface : boundarySurfaceList) {
if (boundarySurface.containsAnyError()){
if (boundarySurface.containsAnyError()) {
return true;
}
}
......@@ -113,7 +112,7 @@ public abstract class AbstractRoom extends CityObject{
@Override
public void reCreateGeometries(GeometryFactory factory, ParserConfiguration config) {
for (Geometry geom : getGeometries()) {
if (geom instanceof ImplicitGeometryHolder){
if (geom instanceof ImplicitGeometryHolder) {
continue;
}
if (geom.getType() == GeometryType.MULTI_SURFACE) {
......@@ -183,7 +182,7 @@ public abstract class AbstractRoom extends CityObject{
}
@Override
public void prepareForChecking(){
public void prepareForChecking() {
super.prepareForChecking();
for (Installation roomInstallation : roomInstallations) {
roomInstallation.prepareForChecking();
......@@ -205,7 +204,6 @@ public abstract class AbstractRoom extends CityObject{
}
@Override
public AbstractCityObject getGmlObject() {
return cgmlRoom;
......@@ -232,21 +230,20 @@ public abstract class AbstractRoom extends CityObject{
}
@Override
public FeatureType getFeatureType() {
return FeatureType.ROOM;
}
@Override
public void collectInstances(CopyHandler handler){
public void collectInstances(CopyHandler handler) {
super.collectInstances(handler);
handler.addInstance(roomInstallations);
handler.addInstance(boundarySurfaceList);
}
@Override
public void fillValues(Copyable original, CopyHandler handler){
public void fillValues(Copyable original, CopyHandler handler) {
super.fillValues(original, handler);
AbstractRoom originalAr = (AbstractRoom) original;
for (BoundarySurface originalBs : originalAr.boundarySurfaceList) {
......
......@@ -20,7 +20,7 @@ import java.io.Serial;
import java.util.ArrayList;
import java.util.List;
public abstract class AbstractTunnel extends CityObject{
public abstract class AbstractTunnel extends CityObject {
@Serial
private static final long serialVersionUID = -2196414503088741206L;
......@@ -84,7 +84,7 @@ public abstract class AbstractTunnel extends CityObject{
@Override
public void reCreateGeometries(GeometryFactory factory, ParserConfiguration config) {
for (Geometry geom : getGeometries()) {
if (geom instanceof ImplicitGeometryHolder){
if (geom instanceof ImplicitGeometryHolder) {
continue;
}
if (geom.getType() == GeometryType.MULTI_SURFACE) {
......
......@@ -18,15 +18,6 @@
*/
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.CheckError;
import de.hft.stuttgart.citydoctor2.check.CheckId;
......@@ -34,12 +25,19 @@ 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.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
*
* @author Matthias Betz
*
*/
public class BoundarySurface extends CityObject {
......@@ -94,7 +92,7 @@ public class BoundarySurface extends CityObject {
gmlObject.setId(getGmlId().getGmlString());
}
for (Geometry geom : getGeometries()) {
if (geom instanceof ImplicitGeometryHolder){
if (geom instanceof ImplicitGeometryHolder) {
continue;
}
if (geom.getType() == GeometryType.MULTI_SURFACE) {
......
......@@ -22,7 +22,6 @@ package de.hft.stuttgart.citydoctor2.datastructure;
* Types of boundary surfaces used in city doctor
*
* @author Matthias Betz
*
*/
public enum BoundarySurfaceType {
......
......@@ -18,17 +18,16 @@
*/
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.utils.BoundingBoxCalculator;
import java.util.Collection;
import java.util.List;
/**
* An axis aligned bounding box represented by its two corners
*
* @author Matthias Betz
*
*/
public class BoundingBox {
......
......@@ -18,10 +18,13 @@
*/
package de.hft.stuttgart.citydoctor2.datastructure;
import java.io.Serial;
import java.util.ArrayList;
import java.util.List;
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.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.citygml4j.core.model.core.AbstractSpaceBoundaryProperty;
......@@ -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.SolidProperty;
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 java.io.Serial;
import java.util.ArrayList;
import java.util.List;
public class BridgeConstructiveElement extends CityObject {
......@@ -70,7 +69,7 @@ public class BridgeConstructiveElement extends CityObject {
// unknown which CityGML is handled here
// need context information to decide
for (Geometry geom : getGeometries()) {
if (geom instanceof ImplicitGeometryHolder){
if (geom instanceof ImplicitGeometryHolder) {
continue;
}
switch (geom.getType()) {
......
......@@ -55,6 +55,7 @@ public class BridgeObject extends CityObject {
private final List<BridgeRoom> bridgeRooms = new ArrayList<>(2);
private AbstractBridge ab;
private BridgeType type;
public BridgeObject(BridgeType type, AbstractBridge ab) {
this.ab = ab;
this.type = type;
......@@ -80,7 +81,7 @@ public class BridgeObject extends CityObject {
@Override
public void reCreateGeometries(GeometryFactory factory, ParserConfiguration config) {
for (Geometry geom : getGeometries()) {
if (geom instanceof ImplicitGeometryHolder){
if (geom instanceof ImplicitGeometryHolder) {
continue;
}
if (geom.getType() == GeometryType.MULTI_SURFACE) {
......@@ -146,6 +147,7 @@ public class BridgeObject extends CityObject {
throw new IllegalStateException("Cannot add " + geom.getLod() + " solid to bridges");
}
}
public void addBridgeInstallation(Installation coBi) {
bridgeInstallations.add(coBi);
coBi.setParent(this);
......
......@@ -12,7 +12,8 @@ public class BridgeRoom extends AbstractRoom {
private BridgeObject parent;
private BridgeRoom(){}
private BridgeRoom() {
}
public BridgeRoom(BridgeObject parent) {
this.parent = parent;
......@@ -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;
}
......@@ -30,14 +31,14 @@ public class BridgeRoom extends AbstractRoom {
}
@Override
public void fillValues(Copyable original, CopyHandler handler){
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){
public void collectInstances(CopyHandler handler) {
super.collectInstances(handler);
handler.addInstance(parent);
}
......
......@@ -15,7 +15,7 @@ public class BridgeRoomFurniture extends AbstractFurniture {
}
@Override
public Copyable createCopyInstance(){
public Copyable createCopyInstance() {
return new BridgeRoomFurniture();
}
}
......@@ -18,21 +18,20 @@
*/
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.CheckError;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
import de.hft.stuttgart.citydoctor2.utils.CopyHandler;
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 {
......
......@@ -8,19 +8,19 @@ import java.io.Serial;
import java.util.ArrayList;
import java.util.List;
public class BuildingRoom extends AbstractRoom{
public class BuildingRoom extends AbstractRoom {
@Serial
private static final long serialVersionUID = -276088332165299253L;
private final List<BuildingFurnitureProperty> furnitureRefs = new ArrayList<>(2);
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;
}
public void setParent(CityObject parent){
public void setParent(CityObject parent) {
this.parent = parent;
}
......@@ -31,6 +31,7 @@ public class BuildingRoom extends AbstractRoom{
/**
* Returns the list of citygml3 furniture objects registered to this room.
* The reference objects only hold a HRef to the actual furniture object.
*
* @return
*/
public List<BuildingFurnitureProperty> getFurnitureRefs() {
......@@ -42,7 +43,7 @@ public class BuildingRoom extends AbstractRoom{
}
@Override
public void fillValues(Copyable original, CopyHandler handler){
public void fillValues(Copyable original, CopyHandler handler) {
super.fillValues(original, handler);
BuildingRoom oRoom = (BuildingRoom) original;
......@@ -50,7 +51,7 @@ public class BuildingRoom extends AbstractRoom{
}
@Override
public void collectInstances(CopyHandler handler){
public void collectInstances(CopyHandler handler) {
super.collectInstances(handler);
handler.addInstance(parent);
}
......
......@@ -16,7 +16,7 @@ public class BuildingRoomFurniture extends AbstractFurniture {
}
@Override
public Copyable createCopyInstance(){
public Copyable createCopyInstance() {
return new BuildingRoomFurniture();
}
......
......@@ -12,7 +12,7 @@ import java.io.Serial;
import java.util.ArrayList;
import java.util.List;
public class BuildingUnit extends AbstractBuildingSubdivision{
public class BuildingUnit extends AbstractBuildingSubdivision {
@Serial
private static final long serialVersionUID = -2931788311665810322L;
......
......@@ -18,24 +18,6 @@
*/
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.Check;
import de.hft.stuttgart.citydoctor2.check.CheckError;
......@@ -43,13 +25,23 @@ import de.hft.stuttgart.citydoctor2.exceptions.CityDoctorWriteException;
import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
import de.hft.stuttgart.citydoctor2.writer.CityGMLWriterUtils;
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
* CityDoctor
*
* @author Matthias Betz
*
*/
public class CityDoctorModel {
......@@ -127,7 +119,7 @@ public class CityDoctorModel {
public Stream<CityObject> createFeatureStream() {
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 {
......@@ -270,11 +262,11 @@ public class CityDoctorModel {
cityfurniture.add(coFurniture);
}
public List<GenericCityObject> getGenericCityObjects(){
public List<GenericCityObject> getGenericCityObjects() {
return genericObjects;
}
public void addGenericCityObject(GenericCityObject coGenericCityObject){
public void addGenericCityObject(GenericCityObject coGenericCityObject) {
genericObjects.add(coGenericCityObject);
}
......@@ -328,7 +320,7 @@ public class CityDoctorModel {
public int getNumberOfFeatures() {
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() {
......@@ -342,9 +334,9 @@ public class CityDoctorModel {
replaceBridge(currentFeature, nextFeature);
} else if (nextFeature instanceof TransportationObject) {
replaceTransportationObject(currentFeature, nextFeature);
}else if (nextFeature instanceof Tunnel) {
} else if (nextFeature instanceof Tunnel) {
replaceTunnel(currentFeature, nextFeature);
}else if (nextFeature instanceof Vegetation) {
} else if (nextFeature instanceof Vegetation) {
replaceVegetation(currentFeature, nextFeature);
} else if (nextFeature instanceof LandObject) {
replaceLandObject(currentFeature, nextFeature);
......@@ -405,7 +397,7 @@ public class CityDoctorModel {
roads.set(index, (TransportationObject) nextFeature);
}
private void replaceTunnel(CityObject currentFeature, CityObject nextFeature){
private void replaceTunnel(CityObject currentFeature, CityObject nextFeature) {
int index = tunnels.indexOf(currentFeature);
if (index == -1) {
throw new IllegalStateException(COULD_NOT_FIND_FEATURE + currentFeature + " in tunnels");
......
......@@ -14,7 +14,7 @@ import org.xmlobjects.gml.model.geometry.primitives.SolidProperty;
import java.io.Serial;
public class CityFurniture extends CityObject{
public class CityFurniture extends CityObject {
@Serial
private static final long serialVersionUID = 3325661061543962473L;
......@@ -53,7 +53,7 @@ public class CityFurniture extends CityObject{
@Override
public void reCreateGeometries(GeometryFactory factory, ParserConfiguration config) {
for (Geometry geom : getGeometries()) {
if (geom instanceof ImplicitGeometryHolder){
if (geom instanceof ImplicitGeometryHolder) {
continue;
}
if (geom.getType() == GeometryType.MULTI_SURFACE) {
......
......@@ -18,20 +18,19 @@
*/
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.CheckError;
import de.hft.stuttgart.citydoctor2.check.CheckId;
import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
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 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, ...
......@@ -39,7 +38,6 @@ import de.hft.stuttgart.citydoctor2.utils.Copyable;
* Contains the geometries
*
* @author Matthias Betz
*
*/
public abstract class CityObject extends GmlElement {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment