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

Merge branch 'citygml3'

parents 6cf1abce bd8f73de
Pipeline #7210 passed with stage
in 7 seconds
/*-
* 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.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 implements ADEObject {
private static final long serialVersionUID = 5470016232480954926L;
private List<ParameterProperty> parameters;
public List<ParameterProperty> getParameters() {
if (parameters == null) {
parameters = new ChildList<>(this);
}
return parameters;
}
public void setParameters(List<ParameterProperty> parameters) {
this.parameters = asChild(parameters);
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,31 +13,33 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model;
package de.hft.stuttgart.quality.model.types;
import org.citygml4j.builder.copy.CopyBuilder;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class HoleOutside extends PolygonError {
public class HoleOutsideError extends AbstractPolygonError {
private static final long serialVersionUID = 7823516103018988170L;
private static final long serialVersionUID = -3029497342950689843L;
private String linearRingId;
public String getLinearRingId() {
return linearRingId;
}
public void setLinearRingId(String linearRingId) {
this.linearRingId = linearRingId;
}
public String getLinearRingId() {
return linearRingId;
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
@Override
public String toString() {
return "HoleOutside [polygonId=" + getPolygonId() + ", linearRingId=" + linearRingId + "]";
return "HoleOutsideError [linearRingId=" + linearRingId + "]";
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(new HoleOutside(), copyBuilder);
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,41 +13,42 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model;
package de.hft.stuttgart.quality.model.types;
import org.citygml4j.builder.copy.CopyBuilder;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class IntersectingRings extends PolygonError {
public class InnerRingsNestedError extends AbstractPolygonError {
private static final long serialVersionUID = 6801491749796411678L;
private static final long serialVersionUID = 7668529369582991408L;
private String linearRingId1;
private String linearRingId2;
public String getLinearRingId1() {
return linearRingId1;
}
public void setLinearRingId1(String linearRingId1) {
this.linearRingId1 = linearRingId1;
}
public void setLinearRingId2(String linearRingId2) {
this.linearRingId2 = linearRingId2;
public String getLinearRingId2() {
return linearRingId2;
}
public String getLinearRingId1() {
return linearRingId1;
public void setLinearRingId2(String linearRingId2) {
this.linearRingId2 = linearRingId2;
}
public String getLinearRingId2() {
return linearRingId2;
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
@Override
public String toString() {
return "IntersectingRings [polygonId=" + getPolygonId() + ", linearRingId1=" + linearRingId1 + ", linearRingId2="
+ linearRingId2 + "]";
return "InnerRingsNestedError [linearRingId1=" + linearRingId1 + ", linearRingId2=" + linearRingId2 + "]";
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(new IntersectingRings(), copyBuilder);
}
}
/*-
* 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 de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class InteriorDisconnectedError extends AbstractPolygonError {
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
private static final long serialVersionUID = 8270468563578479182L;
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,35 +13,42 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model;
package de.hft.stuttgart.quality.model.types;
import org.citygml4j.builder.copy.CopyBuilder;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class InnerRingsNested extends PolygonError {
public class IntersectingRingsError extends AbstractPolygonError {
private static final long serialVersionUID = 2291087505629924993L;
private static final long serialVersionUID = 4733342962974436966L;
private String linearRingId1;
private String linearRingId2;
public String getLinearRingId1() {
return linearRingId1;
}
public void setLinearRingId1(String linearRingId1) {
this.linearRingId1 = linearRingId1;
}
public void setLinearRingId2(String linearRingId2) {
this.linearRingId2 = linearRingId2;
public String getLinearRingId2() {
return linearRingId2;
}
public String getLinearRingId1() {
return linearRingId1;
public void setLinearRingId2(String linearRingId2) {
this.linearRingId2 = linearRingId2;
}
public String getLinearRingId2() {
return linearRingId2;
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(new InnerRingsNested(), copyBuilder);
public String toString() {
return "IntersectingRingsError [linearRingId1=" + linearRingId1 + ", linearRingId2=" + linearRingId2 + "]";
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,35 +13,36 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model;
package de.hft.stuttgart.quality.model.types;
import java.util.ArrayList;
import java.util.List;
import org.citygml4j.builder.copy.CopyBuilder;
import org.xmlobjects.model.ChildList;
import de.hft.stuttgart.quality.model.jaxb.Component;
import de.hft.stuttgart.quality.model.properties.PolygonIdListProperty;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class MultipleConnectedComponents extends SolidError {
public class MultipleComponentsError extends AbstractSolidError {
private static final long serialVersionUID = -4199420154182053060L;
private static final long serialVersionUID = 4322219502819024437L;
private List<Component> components;
public boolean isSetComponents() {
return components != null && !components.isEmpty();
}
public List<Component> getComponents() {
private List<PolygonIdListProperty> components;
public List<PolygonIdListProperty> getComponents() {
if (components == null) {
components = new ArrayList<>();
components = new ChildList<>(this);
}
return components;
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(new MultipleConnectedComponents(), copyBuilder);
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
public void setComponents(List<PolygonIdListProperty> edges) {
this.components = asChild(edges);
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,31 +13,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model.jaxb;
package de.hft.stuttgart.quality.model.types;
import java.util.ArrayList;
import java.util.List;
import de.hft.stuttgart.quality.model.properties.EdgeListProperty;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
public class NonManifoldEdgeError extends AbstractSolidError {
@XmlRootElement(name = "GE_S_NOT_CLOSED")
public class SolidNotClosedType extends SolidErrorType {
private static final long serialVersionUID = 3499800929524507025L;
@XmlElementWrapper
@XmlElement(name = "edge")
private List<EdgeType> edges;
private EdgeListProperty edges;
public boolean isSetEdges() {
return edges != null && !edges.isEmpty();
public EdgeListProperty getEdges() {
return edges;
}
public List<EdgeType> getEdges() {
if (edges == null) {
edges = new ArrayList<>();
}
return edges;
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
public void setEdges(EdgeListProperty edges) {
this.edges = asChild(edges);
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,32 +13,30 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model;
package de.hft.stuttgart.quality.model.types;
import org.citygml4j.builder.copy.CopyBuilder;
import org.citygml4j.model.gml.geometry.primitives.DirectPosition;
import org.xmlobjects.gml.model.geometry.DirectPosition;
public class NonManifoldVertex extends SolidError {
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
private static final long serialVersionUID = -3434116956866828127L;
private DirectPosition vertex;
public class NonManifoldVertexError extends AbstractSolidError {
public void setVertex(DirectPosition vertex) {
this.vertex = vertex;
}
private static final long serialVersionUID = 6428627491730618046L;
private DirectPosition vertex;
public DirectPosition getVertex() {
return vertex;
}
@Override
public String toString() {
return "NonManifoldVertex [geometryId=" + getGeometryId() + ", vertex=" + vertex + "]";
public void setVertex(DirectPosition vertex) {
this.vertex = asChild(vertex);
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(new NonManifoldVertex(), copyBuilder);
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
/*-
* 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 de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class OrientationRingsSameError extends AbstractPolygonError {
private static final long serialVersionUID = 5732797947859046889L;
private String linearRing;
public String getLinearRing() {
return linearRing;
}
public void setLinearRing(String linearRing) {
this.linearRing = linearRing;
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,58 +13,46 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model.jaxb;
package de.hft.stuttgart.quality.model.types;
import java.io.Serializable;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
public class Parameter extends GMLObject implements ADEObject {
@XmlType(name = "parameter")
@XmlAccessorType(XmlAccessType.FIELD)
public class Parameter implements Serializable {
private static final long serialVersionUID = 3493525795867922745L;
private static final long serialVersionUID = 3704749975901280058L;
@XmlAttribute(name = "name")
private String name;
@XmlAttribute(required = false)
private String uom;
@XmlValue
private String value;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
public String getUom() {
return uom;
}
public void setUom(String uom) {
this.uom = uom;
}
public void setValue(String value) {
this.value = value;
}
public String getUom() {
return uom;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return "ParameterType [name=" + name + ", uom=" + uom + ", value=" + value + "]";
return "Parameter [name=" + name + ", uom=" + uom + ", value=" + value + "]";
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,43 +13,45 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model;
package de.hft.stuttgart.quality.model.types;
import org.citygml4j.builder.copy.CopyBuilder;
import org.citygml4j.model.gml.geometry.primitives.DirectPosition;
import org.citygml4j.model.gml.measures.Length;
import org.xmlobjects.gml.model.geometry.DirectPosition;
import org.xmlobjects.gml.model.measures.Length;
public class NonPlanarDistancePlane extends PolygonError {
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class PlanarDistancePlaneError extends AbstractPolygonError {
private static final long serialVersionUID = 9186823395923829178L;
private static final long serialVersionUID = -3428574131554438219L;
private DirectPosition vertex;
private Length distance;
public DirectPosition getVertex() {
return vertex;
}
public void setVertex(DirectPosition vertex) {
this.vertex = vertex;
this.vertex = asChild(vertex);
}
public void setDistance(Length distance) {
this.distance = distance;
public Length getDistance() {
return distance;
}
public DirectPosition getVertex() {
return vertex;
public void setDistance(Length distance) {
this.distance = asChild(distance);
}
public Length getDistance() {
return distance;
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
@Override
public String toString() {
return "NonPlanarDistancePlane [polygonId=" + getPolygonId() + ", vertex=" + vertex + ", distance=" + distance + "]";
return "PlanarDistancePlaneError [vertex=" + vertex + ", distance=" + distance + "]";
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(new NonPlanarDistancePlane(), copyBuilder);
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,32 +13,30 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model;
package de.hft.stuttgart.quality.model.types;
import org.citygml4j.builder.copy.CopyBuilder;
import org.citygml4j.model.gml.measures.Angle;
import org.xmlobjects.gml.model.measures.Angle;
public class NonPlanarNormalsDeviation extends PolygonError {
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
private static final long serialVersionUID = -8574024132334399550L;
private Angle deviation;
public class PlanarNormalsDeviationError extends AbstractPolygonError {
public void setDeviation(Angle deviation) {
this.deviation = deviation;
}
private static final long serialVersionUID = 5914728363336771016L;
private Angle deviation;
public Angle getDeviation() {
return deviation;
}
@Override
public String toString() {
return "NonPlanarNormalsDeviation [polygonId=" + getPolygonId() + ", deviation=" + deviation + "]";
public void setDeviation(Angle deviation) {
this.deviation = asChild(deviation);
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(new NonPlanarNormalsDeviation(), copyBuilder);
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,25 +13,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model.jaxb;
package de.hft.stuttgart.quality.model.types;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
public class Component implements Serializable {
public class PolygonIdList extends GMLObject implements ADEObject {
private static final long serialVersionUID = 75005650370135888L;
private static final long serialVersionUID = 4396447239956257299L;
@XmlElement(name = "polygonId")
private List<String> polygonIds;
public List<String> getPolygonIds() {
if (polygonIds == null) {
polygonIds = new ArrayList<>();
}
return polygonIds;
}
public void setPolygonIds(List<String> polygonIds) {
this.polygonIds = polygonIds;
}
}
/*-
* 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 de.hft.stuttgart.quality.model.properties.EdgeListProperty;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class PolygonWrongOrientationError extends AbstractSolidError {
private static final long serialVersionUID = 4975827693656963892L;
private EdgeListProperty edges;
public EdgeListProperty getEdges() {
return edges;
}
public void setEdges(EdgeListProperty edges) {
this.edges = edges;
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,59 +13,50 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model.jaxb;
package de.hft.stuttgart.quality.model.types;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import org.xmlobjects.model.ChildList;
@XmlType(name = "requirement")
@XmlAccessorType(XmlAccessType.FIELD)
public class Requirement implements Serializable {
import de.hft.stuttgart.quality.model.enums.RequirementId;
import de.hft.stuttgart.quality.model.properties.ParameterProperty;
private static final long serialVersionUID = 8493047783215253763L;
public class Requirement extends GMLObject implements ADEObject {
@XmlAttribute
private RequirementId name;
private static final long serialVersionUID = 4428291416242684642L;
@XmlAttribute
private boolean enabled;
private RequirementId requirementType;
private List<ParameterProperty> parameters;
@XmlElement(name = "parameter")
private List<Parameter> parameters;
public RequirementId getName() {
return name;
public boolean isEnabled() {
return enabled;
}
public List<Parameter> getParameters() {
if (parameters == null) {
parameters = new ArrayList<>(2);
}
return parameters;
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public boolean isEnabled() {
return enabled;
public RequirementId getRequirementType() {
return requirementType;
}
public void setName(RequirementId name) {
this.name = name;
public void setRequirementType(RequirementId requirementType) {
this.requirementType = requirementType;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
public List<ParameterProperty> getParameters() {
if (parameters == null) {
parameters = new ChildList<>(this);
}
return parameters;
}
@Override
public String toString() {
return "Requirement [name=" + name + ", enabled=" + enabled + ", parameters=" + parameters + "]";
public void setParameters(List<ParameterProperty> parameters) {
this.parameters = asChild(parameters);
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,19 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model;
package de.hft.stuttgart.quality.model.types;
public abstract class RingError extends ValidationError {
private static final long serialVersionUID = -8610600028811350500L;
private String linearRingId;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public void setLinearRingId(String linearRingId) {
this.linearRingId = linearRingId;
public class RingNotClosedError extends AbstractRingError {
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
public String getLinearRingId() {
return linearRingId;
}
private static final long serialVersionUID = 3327214274004406000L;
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,71 +13,75 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model;
package de.hft.stuttgart.quality.model.types;
import org.citygml4j.builder.copy.CopyBuilder;
import org.citygml4j.model.gml.geometry.primitives.DirectPosition;
import de.hft.stuttgart.quality.model.jaxb.RingSelfIntType;
import org.xmlobjects.gml.model.geometry.DirectPosition;
public class RingSelfIntersection extends RingError {
import de.hft.stuttgart.quality.model.enums.RingSelfIntType;
import de.hft.stuttgart.quality.model.properties.EdgeProperty;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class RingSelfIntersectionError extends AbstractRingError {
private static final long serialVersionUID = 9103800366580888883L;
private static final long serialVersionUID = -4426615638983209222L;
private RingSelfIntType type;
private Edge edge1;
private Edge edge2;
private EdgeProperty edge1;
private EdgeProperty edge2;
private DirectPosition vertex1;
private DirectPosition vertex2;
public RingSelfIntType getType() {
return type;
}
public void setType(RingSelfIntType type) {
this.type = type;
}
public void setEdge1(Edge edge1) {
this.edge1 = edge1;
public EdgeProperty getEdge1() {
return edge1;
}
public void setEdge2(Edge edge2) {
this.edge2 = edge2;
public void setEdge1(EdgeProperty edge1) {
this.edge1 = asChild(edge1);
}
public void setVertex1(DirectPosition vertex1) {
this.vertex1 = vertex1;
}
public void setVertex2(DirectPosition vertex2) {
this.vertex2 = vertex2;
public EdgeProperty getEdge2() {
return edge2;
}
public RingSelfIntType getType() {
return type;
public void setEdge2(EdgeProperty edge2) {
this.edge2 = asChild(edge2);
}
public Edge getEdge1() {
return edge1;
public DirectPosition getVertex1() {
return vertex1;
}
public Edge getEdge2() {
return edge2;
public void setVertex1(DirectPosition vertex1) {
this.vertex1 = asChild(vertex1);
}
public DirectPosition getVertex1() {
return vertex1;
}
public DirectPosition getVertex2() {
return vertex2;
}
public void setVertex2(DirectPosition vertex2) {
this.vertex2 = asChild(vertex2);
}
@Override
public String toString() {
return "RingSelfIntersection [linearRingId=" + getLinearRingId() + ", type=" + type + ", edge1=" + edge1 + ", edge2="
+ edge2 + ", vertex1=" + vertex1 + ", vertex2=" + vertex2 + "]";
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(new RingSelfIntersection(), copyBuilder);
public String toString() {
return "RingSelfIntersectionError [type=" + type + ", edge1=" + edge1 + ", edge2=" + edge2 + ", vertex1="
+ vertex1 + ", vertex2=" + vertex2 + "]";
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,16 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model.jaxb;
package de.hft.stuttgart.quality.model.types;
import javax.xml.bind.annotation.XmlRootElement;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
@XmlRootElement(name = "GE_R_TOO_FEW_POINTS")
public class TooFewPointsType extends RingErrorType {
public class RingTooFewPointsError extends AbstractRingError {
private static final long serialVersionUID = 8057350098649982235L;
@Override
public String toString() {
return "TooFewPoints [linearRingId=" + getLinearRingId() + "]";
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model;
package de.hft.stuttgart.quality.model.types;
import org.citygml4j.builder.copy.CopyBuilder;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class AttributeMissing extends SemanticError {
public class SemanticAttributeMissingError extends AbstractSemanticError {
private static final long serialVersionUID = 7157884749606290596L;
private static final long serialVersionUID = -5416574100733885169L;
private String childId;
private String attributeName;
private boolean generic;
......@@ -50,7 +50,9 @@ public class AttributeMissing extends SemanticError {
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(new AttributeWrongValue(), copyBuilder);
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
/*-
* Copyright 2020 Hochschule für Technik Stuttgart
* 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.
......@@ -13,12 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.hft.stuttgart.quality.model.jaxb;
package de.hft.stuttgart.quality.model.types;
import javax.xml.bind.annotation.XmlRootElement;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
@XmlRootElement(name = "SE_ATTRIBUTE_WRONG_VALUE")
public class AttributeWrongValueType extends SemanticErrorType {
public class SemanticAttributeWrongValueError extends AbstractSemanticError {
private static final long serialVersionUID = 3478578364446339884L;
private String childId;
private String attributeName;
......@@ -48,4 +49,10 @@ public class AttributeWrongValueType extends SemanticErrorType {
this.generic = generic;
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
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