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
Showing with 84 additions and 91 deletions
+84 -91
/*-
* 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.properties;
import java.io.Serial;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.base.AbstractInlineProperty;
import de.hft.stuttgart.quality.model.types.SolidTooFewPolygonsError;
public class SolidTooFewPolygonsErrorProperty extends AbstractInlineProperty<SolidTooFewPolygonsError> implements ADEObject {
@Serial
private static final long serialVersionUID = 998050793852068510L;
public SolidTooFewPolygonsErrorProperty() {
super();
}
public SolidTooFewPolygonsErrorProperty(SolidTooFewPolygonsError stfpe) {
super(stfpe);
}
@Override
public Class<SolidTooFewPolygonsError> getTargetType() {
return SolidTooFewPolygonsError.class;
}
}
......@@ -15,14 +15,13 @@
*/
package de.hft.stuttgart.quality.model.properties;
import java.io.Serial;
import de.hft.stuttgart.quality.model.types.Validation;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.base.AbstractInlineProperty;
import org.xmlobjects.gml.model.base.AbstractInlineOrByReferenceProperty;
import de.hft.stuttgart.quality.model.types.Validation;
import java.io.Serial;
public class ValidationProperty extends AbstractInlineProperty<Validation> implements ADEObject {
public class ValidationProperty extends AbstractInlineOrByReferenceProperty<Validation> implements ADEObject {
@Serial
private static final long serialVersionUID = 3423466580266018906L;
......@@ -31,8 +30,12 @@ public class ValidationProperty extends AbstractInlineProperty<Validation> imple
super();
}
public ValidationProperty(Validation v) {
super(v);
public ValidationProperty(Validation object) {
super(object);
}
public ValidationProperty(String href) {
super(href);
}
@Override
......
......@@ -17,9 +17,10 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
public abstract class AbstractError extends GMLObject {
public abstract class AbstractError extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 4456303926951620441L;
......
......@@ -17,11 +17,12 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import de.hft.stuttgart.quality.model.enums.TopLevelFeatureType;
public class Checking extends GMLObject {
public class Checking extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 8248598807454312291L;
......
package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import org.citygml4j.core.model.core.ADEOfAbstractCityObject;
public class CityObjectProperties extends ADEOfAbstractCityObject {
@Serial
private static final long serialVersionUID = 1273072314736964714L;
private ValidationResult validationResult;
public ValidationResult getValidationResult() {
return validationResult;
}
public void setValidationResult(ValidationResult validationResult) {
this.validationResult = asChild(validationResult);
}
}
......@@ -16,14 +16,15 @@
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.PolygonIdListProperty;
public class ComponentList extends GMLObject {
public class ComponentList extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 7846916128728837265L;
......@@ -32,13 +33,13 @@ public class ComponentList extends GMLObject {
public List<PolygonIdListProperty> getComponents() {
if (components == null) {
components = new ArrayList<>();
components = new ChildList<>(this);
}
return components;
}
public void setComponents(List<PolygonIdListProperty> components) {
this.components = components;
this.components = asChild(components);
}
}
......@@ -32,7 +32,7 @@ public class ConsecutivePointsSameError extends AbstractRingError {
}
public void setVertex1(DirectPosition vertex1) {
this.vertex1 = vertex1;
this.vertex1 = asChild(vertex1);
}
public DirectPosition getVertex2() {
......@@ -40,7 +40,7 @@ public class ConsecutivePointsSameError extends AbstractRingError {
}
public void setVertex2(DirectPosition vertex2) {
this.vertex2 = vertex2;
this.vertex2 = asChild(vertex2);
}
@Override
......
......@@ -17,10 +17,11 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import org.xmlobjects.gml.model.geometry.DirectPosition;
public class Edge extends GMLObject {
public class Edge extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 8021062845313752146L;
......@@ -33,7 +34,7 @@ public class Edge extends GMLObject {
}
public void setFrom(DirectPosition from) {
this.from = from;
this.from = asChild(from);
}
public DirectPosition getTo() {
......@@ -41,7 +42,7 @@ public class Edge extends GMLObject {
}
public void setTo(DirectPosition to) {
this.to = to;
this.to = asChild(to);
}
@Override
......
......@@ -16,14 +16,15 @@
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.EdgeProperty;
public class EdgeList extends GMLObject {
public class EdgeList extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 5900643456940461301L;
......@@ -32,13 +33,13 @@ public class EdgeList extends GMLObject {
public List<EdgeProperty> getEdges() {
if (edges == null) {
edges = new ArrayList<>();
edges = new ChildList<>(this);
}
return edges;
}
public void setEdges(List<EdgeProperty> edges) {
this.edges = edges;
this.edges = asChild(edges);
}
}
......@@ -17,24 +17,25 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import de.hft.stuttgart.quality.model.enums.ErrorId;
public class Error extends GMLObject {
public class Error extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 2447962257841143458L;
private int occurences;
private int occurrences;
private ErrorId name;
public int getOccurences() {
return occurences;
public int getOccurrences() {
return occurrences;
}
public void setOccurences(int occurences) {
this.occurences = occurences;
public void setOccurrences(int occurrences) {
this.occurrences = occurrences;
}
public ErrorId getName() {
......@@ -47,7 +48,7 @@ public class Error extends GMLObject {
@Override
public String toString() {
return "Error [occurences=" + occurences + ", name=" + name + "]";
return "Error [occurences=" + occurrences + ", name=" + name + "]";
}
}
......@@ -17,9 +17,10 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
public class FeatureStatistics extends GMLObject {
public class FeatureStatistics extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 5835765260535725839L;
......
......@@ -16,14 +16,15 @@
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.CheckingProperty;
public class Filter extends GMLObject {
public class Filter extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 2766323821940477659L;
......@@ -32,13 +33,13 @@ public class Filter extends GMLObject {
public List<CheckingProperty> getChecking() {
if (checking == null) {
checking = new ArrayList<>();
checking = new ChildList<>(this);
}
return checking;
}
public void setChecking(List<CheckingProperty> checking) {
this.checking = checking;
this.checking = asChild(checking);
}
}
......@@ -16,14 +16,15 @@
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.ParameterProperty;
public class GlobalParameters extends GMLObject {
public class GlobalParameters extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 5470016232480954926L;
......@@ -32,13 +33,13 @@ public class GlobalParameters 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);
}
}
......@@ -16,9 +16,10 @@
package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import java.util.ArrayList;
import java.util.List;
import org.xmlobjects.model.ChildList;
import de.hft.stuttgart.quality.model.properties.ComponentListProperty;
public class MultipleComponentsError extends AbstractSolidError {
......@@ -30,13 +31,13 @@ public class MultipleComponentsError extends AbstractSolidError {
public List<ComponentListProperty> getEdges() {
if (edges == null) {
edges = new ArrayList<>();
edges = new ChildList<>(this);
}
return edges;
}
public void setEdges(List<ComponentListProperty> edges) {
this.edges = edges;
this.edges = asChild(edges);
}
}
......@@ -31,7 +31,7 @@ public class NonManifoldEdgeError extends AbstractSolidError {
}
public void setEdges(EdgeListProperty edges) {
this.edges = edges;
this.edges = asChild(edges);
}
}
......@@ -31,7 +31,7 @@ public class NonManifoldVertexError extends AbstractSolidError {
}
public void setVertex(DirectPosition vertex) {
this.vertex = vertex;
this.vertex = asChild(vertex);
}
}
......@@ -17,9 +17,10 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
public class Parameter extends GMLObject {
public class Parameter extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 3493525795867922745L;
......
......@@ -33,7 +33,7 @@ public class PlanarDistancePlaneError extends AbstractPolygonError {
}
public void setVertex(DirectPosition vertex) {
this.vertex = vertex;
this.vertex = asChild(vertex);
}
public Length getDistance() {
......@@ -41,7 +41,7 @@ public class PlanarDistancePlaneError extends AbstractPolygonError {
}
public void setDistance(Length distance) {
this.distance = distance;
this.distance = asChild(distance);
}
@Override
......
......@@ -31,7 +31,7 @@ public class PlanarNormalsDeviationError extends AbstractPolygonError {
}
public void setDeviation(Angle deviation) {
this.deviation = deviation;
this.deviation = asChild(deviation);
}
}
......@@ -19,9 +19,10 @@ 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;
public class PolygonIdList extends GMLObject {
public class PolygonIdList extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 4396447239956257299L;
......
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