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 2020 Hochschule für Technik Stuttgart * Copyright 2022 Hochschule für Technik Stuttgart
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,30 +13,29 @@ ...@@ -13,30 +13,29 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package de.hft.stuttgart.quality.model.jaxb; package de.hft.stuttgart.quality.model.properties;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "GE_P_INNER_RINGS_NESTED") import org.citygml4j.core.model.ade.ADEObject;
public class InnerRingsNestedType extends PolygonErrorType { import org.xmlobjects.gml.model.base.AbstractInlineProperty;
private String linearRingId1; import de.hft.stuttgart.quality.model.types.Requirement;
private String linearRingId2;
public void setLinearRingId1(String linearRingId1) { public class RequirementProperty extends AbstractInlineProperty<Requirement> implements ADEObject {
this.linearRingId1 = linearRingId1;
}
public void setLinearRingId2(String linearRingId2) { private static final long serialVersionUID = 1084132873819307011L;
this.linearRingId2 = linearRingId2;
}
public String getLinearRingId1() { public RequirementProperty() {
return linearRingId1; super();
} }
public String getLinearRingId2() { public RequirementProperty(Requirement r) {
return linearRingId2; super(r);
} }
@Override
public Class<Requirement> getTargetType() {
return Requirement.class;
}
} }
/*- /*-
* Copyright 2020 Hochschule für Technik Stuttgart * Copyright 2022 Hochschule für Technik Stuttgart
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,32 +13,28 @@ ...@@ -13,32 +13,28 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package de.hft.stuttgart.quality.model.jaxb; package de.hft.stuttgart.quality.model.properties;
import javax.xml.bind.annotation.XmlAccessType; import org.citygml4j.core.model.ade.ADEObject;
import javax.xml.bind.annotation.XmlAccessorType; import org.xmlobjects.gml.model.base.AbstractInlineProperty;
import net.opengis.gml.DirectPositionType; import de.hft.stuttgart.quality.model.types.Statistics;
@XmlAccessorType(XmlAccessType.FIELD) public class StatisticsProperty extends AbstractInlineProperty<Statistics> implements ADEObject {
public class EdgeType {
private DirectPositionType from; private static final long serialVersionUID = 4264016075264322157L;
private DirectPositionType to;
public void setFrom(DirectPositionType from) { public StatisticsProperty() {
this.from = from; super();
} }
public void setTo(DirectPositionType to) { public StatisticsProperty(Statistics s) {
this.to = to; super(s);
} }
public DirectPositionType getFrom() { @Override
return from; public Class<Statistics> getTargetType() {
} return Statistics.class;
}
public DirectPositionType getTo() {
return to;
}
} }
/*-
* 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 org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.base.AbstractInlineProperty;
import de.hft.stuttgart.quality.model.types.ValidationPlan;
public class ValidationPlanProperty extends AbstractInlineProperty<ValidationPlan> implements ADEObject {
private static final long serialVersionUID = 4542660904311227314L;
public ValidationPlanProperty() {
super();
}
public ValidationPlanProperty(ValidationPlan vp) {
super(vp);
}
@Override
public Class<ValidationPlan> getTargetType() {
return ValidationPlan.class;
}
}
/*- /*-
* Copyright 2020 Hochschule für Technik Stuttgart * Copyright 2022 Hochschule für Technik Stuttgart
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,31 +13,32 @@ ...@@ -13,31 +13,32 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package de.hft.stuttgart.quality.model; package de.hft.stuttgart.quality.model.properties;
import org.citygml4j.builder.copy.CopyBuilder; import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.base.AbstractInlineOrByReferenceProperty;
public class OrientationRingsSame extends PolygonError { import de.hft.stuttgart.quality.model.types.Validation;
private static final long serialVersionUID = -6983324580253488854L; public class ValidationProperty extends AbstractInlineOrByReferenceProperty<Validation> implements ADEObject {
private String linearRingId;
public void setLinearRingId(String linearRingId) { private static final long serialVersionUID = 3423466580266018906L;
this.linearRingId = linearRingId;
public ValidationProperty() {
super();
} }
public String getLinearRingId() { public ValidationProperty(Validation object) {
return linearRingId; super(object);
} }
@Override public ValidationProperty(String href) {
public String toString() { super(href);
return "OrientationRingsSame [polygonId=" + getPolygonId() + ", linearRingId=" + linearRingId + "]";
} }
@Override @Override
public Object copy(CopyBuilder copyBuilder) { public Class<Validation> getTargetType() {
return copyTo(new OrientationRingsSame(), copyBuilder); return Validation.class;
} }
} }
/*-
* 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 org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.base.AbstractInlineOrByReferenceProperty;
import de.hft.stuttgart.quality.model.types.ValidationResult;
public class ValidationResultProperty extends AbstractInlineOrByReferenceProperty<ValidationResult>
implements ADEObject {
private static final long serialVersionUID = 480940868730913996L;
public ValidationResultProperty() {
super();
}
public ValidationResultProperty(ValidationResult object) {
super(object);
}
public ValidationResultProperty(String href) {
super(href);
}
@Override
public Class<ValidationResult> getTargetType() {
return ValidationResult.class;
}
}
/*- /*-
* Copyright 2020 Hochschule für Technik Stuttgart * Copyright 2022 Hochschule für Technik Stuttgart
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,21 +13,20 @@ ...@@ -13,21 +13,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package de.hft.stuttgart.quality.model; package de.hft.stuttgart.quality.model.types;
import org.citygml4j.builder.copy.CopyBuilder;
public class TooFewPolygons extends SolidError { import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
private static final long serialVersionUID = -51591095439740599L; import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
@Override public abstract class AbstractError extends GMLObject implements ADEObject {
public String toString() {
return "TooFewPolygons [geometryId=" + getGeometryId() + "]";
}
@Override private static final long serialVersionUID = 4456303926951620441L;
public Object copy(CopyBuilder copyBuilder) {
return copyTo(new TooFewPolygons(), copyBuilder); public void accept(ValidationErrorVisitor 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 abstract class AbstractGeometryError extends AbstractError {
private static final long serialVersionUID = 5584980708521134866L;
@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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,19 +13,28 @@ ...@@ -13,19 +13,28 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package de.hft.stuttgart.quality.model; package de.hft.stuttgart.quality.model.types;
public abstract class PolygonError extends ValidationError { import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public abstract class AbstractPolygonError extends AbstractGeometryError {
private static final long serialVersionUID = 8765755615504522764L;
private static final long serialVersionUID = 4694297467768369526L;
private String polygonId; private String polygonId;
public String getPolygonId() {
return polygonId;
}
public void setPolygonId(String polygonId) { public void setPolygonId(String polygonId) {
this.polygonId = polygonId; this.polygonId = polygonId;
} }
public String getPolygonId() { @Override
return polygonId; 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,21 +13,28 @@ ...@@ -13,21 +13,28 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * 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_P_ORIENTATION_RINGS_SAME") public abstract class AbstractRingError extends AbstractGeometryError {
public class OrientationRingsSameType extends PolygonErrorType {
private static final long serialVersionUID = 6406932524599157467L;
private String linearRingId; private String linearRingId;
public String getLinearRingId() {
return linearRingId;
}
public void setLinearRingId(String linearRingId) { public void setLinearRingId(String linearRingId) {
this.linearRingId = linearRingId; this.linearRingId = linearRingId;
} }
public String getLinearRingId() { @Override
return linearRingId; 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 abstract class AbstractSemanticError extends AbstractError {
private static final long serialVersionUID = 3754322190455789991L;
@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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,18 +13,28 @@ ...@@ -13,18 +13,28 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package de.hft.stuttgart.quality.model; package de.hft.stuttgart.quality.model.types;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public abstract class AbstractSolidError extends AbstractGeometryError {
private static final long serialVersionUID = 8616094562996823088L;
public abstract class SolidError extends ValidationError {
private static final long serialVersionUID = 6430138970493794998L;
private String geometryId; private String geometryId;
public String getGeometryId() {
return geometryId;
}
public void setGeometryId(String geometryId) { public void setGeometryId(String geometryId) {
this.geometryId = geometryId; this.geometryId = geometryId;
} }
public String getGeometryId() { @Override
return geometryId; 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 AllPolygonsOrientedWrongError extends AbstractSolidError {
private static final long serialVersionUID = 4295306777217062184L;
@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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,23 +13,25 @@ ...@@ -13,23 +13,25 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * 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 org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import net.opengis.gml.DirectPositionType; import de.hft.stuttgart.quality.model.enums.TopLevelFeatureType;
@XmlRootElement(name = "GE_S_NON_MANIFOLD_VERTEX") public class Checking extends GMLObject implements ADEObject {
public class NonManifoldVertexType extends SolidErrorType {
private DirectPositionType vertex; private static final long serialVersionUID = 8248598807454312291L;
public void setVertex(DirectPositionType vertex) { private TopLevelFeatureType featureType;
this.vertex = vertex;
public TopLevelFeatureType getFeatureType() {
return featureType;
} }
public DirectPositionType getVertex() { public void setFeatureType(TopLevelFeatureType featureType) {
return vertex; this.featureType = featureType;
} }
} }
package de.hft.stuttgart.quality.model.types;
import org.citygml4j.core.model.core.ADEOfAbstractCityObject;
import de.hft.stuttgart.quality.model.properties.ValidationResultProperty;
public class CityObjectProperties extends ADEOfAbstractCityObject {
private static final long serialVersionUID = 1273072314736964714L;
private ValidationResultProperty validationResult;
public ValidationResultProperty getValidationResult() {
return validationResult;
}
public void setValidationResult(ValidationResultProperty validationResult) {
this.validationResult = asChild(validationResult);
}
}
/*- /*-
* Copyright 2020 Hochschule für Technik Stuttgart * Copyright 2022 Hochschule für Technik Stuttgart
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,43 +13,44 @@ ...@@ -13,43 +13,44 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * 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.xmlobjects.gml.model.geometry.DirectPosition;
import org.citygml4j.model.gml.geometry.primitives.DirectPosition;
import de.hft.stuttgart.quality.model.walker.ValidationErrorVisitor;
public class ConsecutivePointsSameError extends AbstractRingError {
private static final long serialVersionUID = 960107689338308020L;
public class ConsecutivePointsSame extends RingError {
private static final long serialVersionUID = -838421312521561747L;
private DirectPosition vertex1; private DirectPosition vertex1;
private DirectPosition vertex2; private DirectPosition vertex2;
public void setVertex1(DirectPosition vertex1) {
this.vertex1 = vertex1;
}
public void setVertex2(DirectPosition vertex2) {
this.vertex2 = vertex2;
}
public DirectPosition getVertex1() { public DirectPosition getVertex1() {
return vertex1; return vertex1;
} }
public void setVertex1(DirectPosition vertex1) {
this.vertex1 = asChild(vertex1);
}
public DirectPosition getVertex2() { public DirectPosition getVertex2() {
return vertex2; return vertex2;
} }
public void setVertex2(DirectPosition vertex2) {
this.vertex2 = asChild(vertex2);
}
@Override @Override
public String toString() { public void accept(ValidationErrorVisitor visitor) {
return "ConsecutivePointsSame [linearRingId=" + getLinearRingId() + ", vertex1=" + vertex1 + ", vertex2=" + vertex2 super.accept(visitor);
+ "]"; visitor.visit(this);
} }
@Override @Override
public Object copy(CopyBuilder copyBuilder) { public String toString() {
return copyTo(new ConsecutivePointsSame(), copyBuilder); return "ConsecutivePointsSameError [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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,33 +13,38 @@ ...@@ -13,33 +13,38 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package de.hft.stuttgart.quality.model; 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 org.xmlobjects.gml.model.geometry.DirectPosition;
import org.citygml4j.model.gml.geometry.primitives.DirectPosition; public class Edge extends GMLObject implements ADEObject {
private static final long serialVersionUID = 8021062845313752146L;
public class Edge implements Serializable {
private static final long serialVersionUID = -5076265818764666094L;
private DirectPosition from; private DirectPosition from;
private DirectPosition to; private DirectPosition to;
public void setFrom(DirectPosition from) {
this.from = from;
}
public void setTo(DirectPosition to) {
this.to = to;
}
public DirectPosition getFrom() { public DirectPosition getFrom() {
return from; return from;
} }
public void setFrom(DirectPosition from) {
this.from = asChild(from);
}
public DirectPosition getTo() { public DirectPosition getTo() {
return to; return to;
} }
public void setTo(DirectPosition to) {
this.to = asChild(to);
}
@Override
public String toString() {
return "Edge [from=" + from + ", to=" + to + "]";
}
} }
/*- /*-
* Copyright 2020 Hochschule für Technik Stuttgart * Copyright 2022 Hochschule für Technik Stuttgart
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,32 +13,31 @@ ...@@ -13,32 +13,31 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * 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 java.util.List;
import org.citygml4j.builder.copy.CopyBuilder; import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import org.xmlobjects.model.ChildList;
public class NonManifoldEdge extends SolidError { import de.hft.stuttgart.quality.model.properties.EdgeProperty;
private static final long serialVersionUID = -4312748985706248178L; public class EdgeList extends GMLObject implements ADEObject {
private List<Edge> edges; private static final long serialVersionUID = 5900643456940461301L;
public boolean isSetEdges() { private List<EdgeProperty> edges;
return edges != null && !edges.isEmpty();
}
public List<Edge> getEdges() { public List<EdgeProperty> getEdges() {
if (edges == null) { if (edges == null) {
edges = new ArrayList<>(); edges = new ChildList<>(this);
} }
return edges; return edges;
} }
@Override public void setEdges(List<EdgeProperty> edges) {
public Object copy(CopyBuilder copyBuilder) { this.edges = asChild(edges);
return copyTo(new NonPlanarNormalsDeviation(), 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,45 +13,39 @@ ...@@ -13,45 +13,39 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * 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 de.hft.stuttgart.quality.model.enums.ErrorId;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlValue;
@XmlAccessorType(XmlAccessType.FIELD) public class Error extends GMLObject implements ADEObject {
public class ErrorStatistics implements Serializable {
private static final long serialVersionUID = -1007447539987946146L;
@XmlAttribute private static final long serialVersionUID = 2447962257841143458L;
private int occurrences;
private ErrorId name; private ErrorId name;
@XmlValue public int getOccurrences() {
private int amount; return occurrences;
}
public void setName(ErrorId name) {
this.name = name; public void setOccurrences(int occurrences) {
this.occurrences = occurrences;
} }
public ErrorId getName() { public ErrorId getName() {
return name; return name;
} }
public void setAmount(int amount) { public void setName(ErrorId name) {
this.amount = amount; this.name = name;
}
public int getAmount() {
return amount;
} }
@Override @Override
public String toString() { public String toString() {
return "ErrorStatistics [name=" + name + ", amount=" + amount + "]"; return "Error [occurences=" + occurrences + ", name=" + name + "]";
} }
} }
/*- /*-
* Copyright 2020 Hochschule für Technik Stuttgart * Copyright 2022 Hochschule für Technik Stuttgart
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,52 +13,41 @@ ...@@ -13,52 +13,41 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * 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; public class FeatureStatistics extends GMLObject implements ADEObject {
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlValue;
@XmlAccessorType(XmlAccessType.FIELD) private static final long serialVersionUID = 5835765260535725839L;
public class FeatureStatistics implements Serializable {
private static final long serialVersionUID = 5794335930507488398L;
@XmlAttribute
private int numChecked; private int numChecked;
@XmlValue
private int numErrors; private int numErrors;
public FeatureStatistics() { public FeatureStatistics() {
// constructor for serialization
} }
public FeatureStatistics(int numChecked, int numErrors) { public FeatureStatistics(int numChecked, int numErrors) {
this.numChecked = numChecked; this.numChecked = numChecked;
this.numErrors = numErrors; this.numErrors = numErrors;
} }
public void setNumChecked(int numChecked) {
this.numChecked = numChecked;
}
public void setNumErrors(int numErrors) {
this.numErrors = numErrors;
}
public int getNumChecked() { public int getNumChecked() {
return numChecked; return numChecked;
} }
public void setNumChecked(int numChecked) {
this.numChecked = numChecked;
}
public int getNumErrors() { public int getNumErrors() {
return numErrors; return numErrors;
} }
@Override public void setNumErrors(int numErrors) {
public String toString() { this.numErrors = numErrors;
return "FeatureStatistics [numChecked=" + numChecked + ", numErrors=" + numErrors + "]";
} }
} }
/*- /*-
* Copyright 2020 Hochschule für Technik Stuttgart * Copyright 2022 Hochschule für Technik Stuttgart
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -13,31 +13,31 @@ ...@@ -13,31 +13,31 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * 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 java.util.List;
import javax.xml.bind.annotation.XmlElement; import org.citygml4j.core.model.ade.ADEObject;
import javax.xml.bind.annotation.XmlElementWrapper; import org.xmlobjects.gml.model.GMLObject;
import javax.xml.bind.annotation.XmlRootElement; import org.xmlobjects.model.ChildList;
@XmlRootElement(name = "GE_S_NON_MANIFOLD_EDGE") import de.hft.stuttgart.quality.model.properties.CheckingProperty;
public class NonManifoldEdgeType extends SolidErrorType {
@XmlElementWrapper public class Filter extends GMLObject implements ADEObject {
@XmlElement(name = "edge")
private List<EdgeType> edges;
public boolean isSetEdges() { private static final long serialVersionUID = 2766323821940477659L;
return edges != null && !edges.isEmpty();
} private List<CheckingProperty> checking;
public List<EdgeType> getEdges() { public List<CheckingProperty> getChecking() {
if (edges == null) { if (checking == null) {
edges = new ArrayList<>(); checking = new ChildList<>(this);
} }
return edges; return checking;
}
public void setChecking(List<CheckingProperty> checking) {
this.checking = asChild(checking);
} }
} }
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