Commit c35f2cd6 authored by Matthias Betz's avatar Matthias Betz
Browse files

Merge branch 'fix-model' into 'citygml3'

Adapt model classes

See merge request !2
parents 9b970421 a349d45c
......@@ -16,15 +16,16 @@
package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import java.util.ArrayList;
import java.util.List;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import org.xmlobjects.model.ChildList;
import de.hft.stuttgart.quality.model.enums.RequirementId;
import de.hft.stuttgart.quality.model.properties.ParameterProperty;
public class Requirement extends GMLObject {
public class Requirement extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 4428291416242684642L;
......@@ -51,13 +52,13 @@ public class Requirement extends GMLObject {
public List<ParameterProperty> getParameters() {
if (parameters == null) {
parameters = new ArrayList<>();
parameters = new ChildList<>(this);
}
return parameters;
}
public void setParameters(List<ParameterProperty> parameters) {
this.parameters = parameters;
this.parameters = asChild(parameters);
}
}
......@@ -46,7 +46,7 @@ public class RingSelfIntersectionError extends AbstractRingError {
}
public void setEdge1(EdgeProperty edge1) {
this.edge1 = edge1;
this.edge1 = asChild(edge1);
}
public EdgeProperty getEdge2() {
......@@ -54,7 +54,7 @@ public class RingSelfIntersectionError extends AbstractRingError {
}
public void setEdge2(EdgeProperty edge2) {
this.edge2 = edge2;
this.edge2 = asChild(edge2);
}
public DirectPosition getVertex1() {
......@@ -62,7 +62,7 @@ public class RingSelfIntersectionError extends AbstractRingError {
}
public void setVertex1(DirectPosition vertex1) {
this.vertex1 = vertex1;
this.vertex1 = asChild(vertex1);
}
public DirectPosition getVertex2() {
......@@ -70,7 +70,7 @@ public class RingSelfIntersectionError extends AbstractRingError {
}
public void setVertex2(DirectPosition vertex2) {
this.vertex2 = vertex2;
this.vertex2 = asChild(vertex2);
}
@Override
......
......@@ -31,7 +31,7 @@ public class SolidNotClosedError extends AbstractSolidError {
}
public void setEdges(EdgeListProperty edges) {
this.edges = edges;
this.edges = asChild(edges);
}
}
......@@ -16,15 +16,16 @@
package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import java.util.ArrayList;
import java.util.List;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import org.xmlobjects.model.ChildList;
import de.hft.stuttgart.quality.model.properties.ErrorProperty;
import de.hft.stuttgart.quality.model.properties.FeatureStatisticsProperty;
public class Statistics extends GMLObject {
public class Statistics extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 2935590283116950203L;
......@@ -42,7 +43,7 @@ public class Statistics extends GMLObject {
}
public void setNumErrorBuildings(FeatureStatisticsProperty numErrorBuildings) {
this.numErrorBuildings = numErrorBuildings;
this.numErrorBuildings = asChild(numErrorBuildings);
}
public FeatureStatisticsProperty getNumErrorVegetation() {
......@@ -50,7 +51,7 @@ public class Statistics extends GMLObject {
}
public void setNumErrorVegetation(FeatureStatisticsProperty numErrorVegetation) {
this.numErrorVegetation = numErrorVegetation;
this.numErrorVegetation = asChild(numErrorVegetation);
}
public FeatureStatisticsProperty getNumErrorLandObjects() {
......@@ -58,7 +59,7 @@ public class Statistics extends GMLObject {
}
public void setNumErrorLandObjects(FeatureStatisticsProperty numErrorLandObjects) {
this.numErrorLandObjects = numErrorLandObjects;
this.numErrorLandObjects = asChild(numErrorLandObjects);
}
public FeatureStatisticsProperty getNumErrorBridgeObjects() {
......@@ -66,7 +67,7 @@ public class Statistics extends GMLObject {
}
public void setNumErrorBridgeObjects(FeatureStatisticsProperty numErrorBridgeObjects) {
this.numErrorBridgeObjects = numErrorBridgeObjects;
this.numErrorBridgeObjects = asChild(numErrorBridgeObjects);
}
public FeatureStatisticsProperty getNumErrorWaterObjects() {
......@@ -74,7 +75,7 @@ public class Statistics extends GMLObject {
}
public void setNumErrorWaterObjects(FeatureStatisticsProperty numErrorWaterObjects) {
this.numErrorWaterObjects = numErrorWaterObjects;
this.numErrorWaterObjects = asChild(numErrorWaterObjects);
}
public FeatureStatisticsProperty getNumErrorTransportation() {
......@@ -82,18 +83,18 @@ public class Statistics extends GMLObject {
}
public void setNumErrorTransportation(FeatureStatisticsProperty numErrorTransportation) {
this.numErrorTransportation = numErrorTransportation;
this.numErrorTransportation = asChild(numErrorTransportation);
}
public List<ErrorProperty> getErrors() {
if (errors == null) {
errors = new ArrayList<>();
errors = new ChildList<>(this);
}
return errors;
}
public void setErrors(List<ErrorProperty> errors) {
this.errors = errors;
this.errors = asChild(errors);
}
}
......@@ -55,7 +55,7 @@ public class Validation extends AbstractFeature implements ADEObject {
}
public void setStatistics(StatisticsProperty statistics) {
this.statistics = statistics;
this.statistics = asChild(statistics);
}
public ValidationPlanProperty getValidationPlan() {
......@@ -63,7 +63,7 @@ public class Validation extends AbstractFeature implements ADEObject {
}
public void setValidationPlan(ValidationPlanProperty validationPlan) {
this.validationPlan = validationPlan;
this.validationPlan = asChild(validationPlan);
}
}
......@@ -16,16 +16,17 @@
package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import java.util.ArrayList;
import java.util.List;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import org.xmlobjects.model.ChildList;
import de.hft.stuttgart.quality.model.properties.FilterProperty;
import de.hft.stuttgart.quality.model.properties.GlobalParametersProperty;
import de.hft.stuttgart.quality.model.properties.RequirementProperty;
public class ValidationPlan extends GMLObject {
public class ValidationPlan extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 434443226848485642L;
......@@ -39,7 +40,7 @@ public class ValidationPlan extends GMLObject {
}
public void setGlobalParameters(GlobalParametersProperty globalParameters) {
this.globalParameters = globalParameters;
this.globalParameters = asChild(globalParameters);
}
public FilterProperty getFilter() {
......@@ -47,18 +48,18 @@ public class ValidationPlan extends GMLObject {
}
public void setFilter(FilterProperty filter) {
this.filter = filter;
this.filter = asChild(filter);
}
public List<RequirementProperty> getRequirement() {
if (requirement == null) {
requirement = new ArrayList<>();
requirement = new ChildList<>(this);
}
return requirement;
}
public void setRequirement(List<RequirementProperty> requirement) {
this.requirement = requirement;
this.requirement = asChild(requirement);
}
......
......@@ -16,16 +16,17 @@
package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import java.util.ArrayList;
import java.util.List;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import org.xmlobjects.gml.model.base.Reference;
import org.xmlobjects.model.ChildList;
import de.hft.stuttgart.quality.model.enums.ResultType;
import de.hft.stuttgart.quality.model.properties.AbstractErrorProperty;
public class ValidationResult extends GMLObject {
public class ValidationResult extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 4867627296196445082L;
......@@ -39,12 +40,12 @@ public class ValidationResult extends GMLObject {
}
public void setValidationPlanID(Reference validationPlanID) {
this.validationPlanID = validationPlanID;
this.validationPlanID = asChild(validationPlanID);
}
public List<AbstractErrorProperty> getErrors() {
if (errors == null) {
errors = new ArrayList<>();
errors = new ChildList<>(this);
}
return errors;
}
......
/*-
* Copyright 2022 Hochschule für Technik Stuttgart
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import org.citygml4j.core.model.core.ADEOfAbstractCityObject;
public class ValidationResultProperty extends ADEOfAbstractCityObject {
@Serial
private static final long serialVersionUID = 765825311371672821L;
private ValidationResult result;
public ValidationResult getResult() {
return result;
}
public void setResult(ValidationResult result) {
this.result = result;
}
}
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