Commit 3188e3b4 authored by Matthias Betz's avatar Matthias Betz
Browse files

added ring self intersection enum to xsd

added visitor errors
parent f95ca9ff
......@@ -53,10 +53,6 @@ public class RingSelfIntersectionErrorAdapter extends AbstractRingErrorAdapter<R
public void writeChildElements(RingSelfIntersectionError object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
super.writeChildElements(object, namespaces, writer);
if (object.getType() != null) {
writer.writeElement(
Element.of(QualityADEModule.NAMESPACE_URI, "type").addTextContent(object.getType().toString()));
}
if (object.getEdge1() != null) {
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "edge1"), object.getEdge1(),
EdgePropertyAdapter.class, namespaces);
......@@ -73,5 +69,9 @@ public class RingSelfIntersectionErrorAdapter extends AbstractRingErrorAdapter<R
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "vertex2"),
object.getVertex2(), DirectPositionAdapter.class, namespaces);
}
if (object.getType() != null) {
writer.writeElement(
Element.of(QualityADEModule.NAMESPACE_URI, "type").addTextContent(object.getType().toString()));
}
}
}
......@@ -16,5 +16,5 @@
package de.hft.stuttgart.quality.model.enums;
public enum RingSelfIntType {
DUPLICATE_POINT, POINT_TOUCHES_EDGE, EDGE_INTERSECTS_EDGE
EDGE_INTERSECTION, VERTEX_TOUCHES_EDGE, DUPLICATE_POINT, DEGENERATED_RING
}
......@@ -20,9 +20,15 @@ import java.io.Serial;
import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public abstract class AbstractError extends GMLObject implements ADEObject {
@Serial
private static final long serialVersionUID = 4456303926951620441L;
public void accept(ValidationErrorVisitor visitor) {
visitor.visit(this);
}
}
......@@ -17,9 +17,17 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public abstract class AbstractGeometryError extends AbstractError {
@Serial
private static final long serialVersionUID = 5584980708521134866L;
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
......@@ -17,6 +17,8 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public abstract class AbstractPolygonError extends AbstractGeometryError {
@Serial
......@@ -31,5 +33,11 @@ public abstract class AbstractPolygonError extends AbstractGeometryError {
public void setPolygonId(String polygonId) {
this.polygonId = polygonId;
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
......@@ -17,6 +17,8 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public abstract class AbstractRingError extends AbstractGeometryError {
@Serial
......@@ -31,5 +33,11 @@ public abstract class AbstractRingError extends AbstractGeometryError {
public void setLinearRingId(String linearRingId) {
this.linearRingId = linearRingId;
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
......@@ -17,9 +17,17 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public abstract class AbstractSemanticError extends AbstractError {
@Serial
private static final long serialVersionUID = 3754322190455789991L;
@Serial
private static final long serialVersionUID = 3754322190455789991L;
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
......@@ -17,12 +17,14 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public abstract class AbstractSolidError extends AbstractGeometryError {
@Serial
private static final long serialVersionUID = 8616094562996823088L;
private String geometryId;
@Serial
private static final long serialVersionUID = 8616094562996823088L;
private String geometryId;
public String getGeometryId() {
return geometryId;
......@@ -32,4 +34,10 @@ public abstract class AbstractSolidError extends AbstractGeometryError {
this.geometryId = geometryId;
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
......@@ -17,9 +17,17 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class AllPolygonsOrientedWrongError extends AbstractSolidError {
@Serial
private static final long serialVersionUID = 4295306777217062184L;
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
......@@ -19,6 +19,8 @@ import java.io.Serial;
import org.xmlobjects.gml.model.geometry.DirectPosition;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class ConsecutivePointsSameError extends AbstractRingError {
@Serial
......@@ -42,6 +44,12 @@ public class ConsecutivePointsSameError extends AbstractRingError {
public void setVertex2(DirectPosition vertex2) {
this.vertex2 = asChild(vertex2);
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
@Override
public String toString() {
......
......@@ -17,6 +17,8 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class HoleOutsideError extends AbstractPolygonError {
@Serial
......@@ -31,6 +33,12 @@ public class HoleOutsideError extends AbstractPolygonError {
public void setLinearRingId(String linearRingId) {
this.linearRingId = linearRingId;
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
@Override
public String toString() {
......
......@@ -17,6 +17,8 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class InnerRingsNestedError extends AbstractPolygonError {
@Serial
......@@ -40,6 +42,12 @@ public class InnerRingsNestedError extends AbstractPolygonError {
public void setLinearRingId2(String linearRingId2) {
this.linearRingId2 = linearRingId2;
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
@Override
public String toString() {
......
......@@ -17,7 +17,16 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
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);
}
@Serial
private static final long serialVersionUID = 8270468563578479182L;
......
......@@ -17,6 +17,8 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class IntersectingRingsError extends AbstractPolygonError {
@Serial
......@@ -40,6 +42,12 @@ public class IntersectingRingsError extends AbstractPolygonError {
public void setLinearRingId2(String linearRingId2) {
this.linearRingId2 = linearRingId2;
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
@Override
public String toString() {
......
......@@ -21,6 +21,7 @@ import java.util.List;
import org.xmlobjects.model.ChildList;
import de.hft.stuttgart.quality.model.properties.PolygonIdListProperty;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class MultipleComponentsError extends AbstractSolidError {
......@@ -35,6 +36,12 @@ public class MultipleComponentsError extends AbstractSolidError {
}
return components;
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
public void setComponents(List<PolygonIdListProperty> edges) {
this.components = asChild(edges);
......
......@@ -18,6 +18,7 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import de.hft.stuttgart.quality.model.properties.EdgeListProperty;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class NonManifoldEdgeError extends AbstractSolidError {
......@@ -29,6 +30,12 @@ public class NonManifoldEdgeError extends AbstractSolidError {
public EdgeListProperty getEdges() {
return edges;
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
public void setEdges(EdgeListProperty edges) {
this.edges = asChild(edges);
......
......@@ -19,6 +19,8 @@ import java.io.Serial;
import org.xmlobjects.gml.model.geometry.DirectPosition;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class NonManifoldVertexError extends AbstractSolidError {
@Serial
......@@ -33,5 +35,11 @@ public class NonManifoldVertexError extends AbstractSolidError {
public void setVertex(DirectPosition vertex) {
this.vertex = asChild(vertex);
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
......@@ -17,6 +17,8 @@ package de.hft.stuttgart.quality.model.types;
import java.io.Serial;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class OrientationRingsSameError extends AbstractPolygonError {
@Serial
......@@ -31,5 +33,11 @@ public class OrientationRingsSameError extends AbstractPolygonError {
public void setLinearRing(String linearRing) {
this.linearRing = linearRing;
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
}
......@@ -20,6 +20,8 @@ import java.io.Serial;
import org.xmlobjects.gml.model.geometry.DirectPosition;
import org.xmlobjects.gml.model.measures.Length;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class PlanarDistancePlaneError extends AbstractPolygonError {
@Serial
......@@ -43,6 +45,12 @@ public class PlanarDistancePlaneError extends AbstractPolygonError {
public void setDistance(Length distance) {
this.distance = asChild(distance);
}
@Override
public void accept(ValidationErrorVisitor visitor) {
super.accept(visitor);
visitor.visit(this);
}
@Override
public String toString() {
......
......@@ -19,6 +19,8 @@ import java.io.Serial;
import org.xmlobjects.gml.model.measures.Angle;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class PlanarNormalsDeviationError extends AbstractPolygonError {
@Serial
......@@ -33,5 +35,11 @@ public class PlanarNormalsDeviationError extends AbstractPolygonError {
public void setDeviation(Angle deviation) {
this.deviation = asChild(deviation);
}
@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