Commit c9b858da authored by Claus Nagel's avatar Claus Nagel
Browse files

make sure that parent pointers are correctly set

parent d323a750
......@@ -23,6 +23,7 @@ import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import de.hft.stuttgart.quality.model.properties.PolygonIdListProperty;
import org.xmlobjects.model.ChildList;
public class ComponentList extends GMLObject implements ADEObject {
......@@ -33,13 +34,13 @@ public class ComponentList extends GMLObject implements ADEObject {
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
......
......@@ -34,7 +34,7 @@ public class Edge extends GMLObject implements ADEObject {
}
public void setFrom(DirectPosition from) {
this.from = from;
this.from = asChild(from);
}
public DirectPosition getTo() {
......@@ -42,7 +42,7 @@ public class Edge extends GMLObject implements ADEObject {
}
public void setTo(DirectPosition to) {
this.to = to;
this.to = asChild(to);
}
@Override
......
......@@ -23,6 +23,7 @@ import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import de.hft.stuttgart.quality.model.properties.EdgeProperty;
import org.xmlobjects.model.ChildList;
public class EdgeList extends GMLObject implements ADEObject {
......@@ -33,13 +34,13 @@ public class EdgeList extends GMLObject implements ADEObject {
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);
}
}
......@@ -27,15 +27,15 @@ 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() {
......@@ -48,7 +48,7 @@ public class Error extends GMLObject implements ADEObject {
@Override
public String toString() {
return "Error [occurences=" + occurences + ", name=" + name + "]";
return "Error [occurences=" + occurrences + ", name=" + name + "]";
}
}
......@@ -23,6 +23,7 @@ import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import de.hft.stuttgart.quality.model.properties.CheckingProperty;
import org.xmlobjects.model.ChildList;
public class Filter extends GMLObject implements ADEObject {
......@@ -33,13 +34,13 @@ public class Filter extends GMLObject implements ADEObject {
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);
}
}
......@@ -23,6 +23,7 @@ import org.citygml4j.core.model.ade.ADEObject;
import org.xmlobjects.gml.model.GMLObject;
import de.hft.stuttgart.quality.model.properties.ParameterProperty;
import org.xmlobjects.model.ChildList;
public class GlobalParameters extends GMLObject implements ADEObject {
......@@ -33,13 +34,13 @@ public class GlobalParameters extends GMLObject implements ADEObject {
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);
}
}
......@@ -20,6 +20,7 @@ import java.util.ArrayList;
import java.util.List;
import de.hft.stuttgart.quality.model.properties.ComponentListProperty;
import org.xmlobjects.model.ChildList;
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);
}
}
......@@ -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);
}
}
......@@ -24,6 +24,7 @@ import org.xmlobjects.gml.model.GMLObject;
import de.hft.stuttgart.quality.model.enums.RequirementId;
import de.hft.stuttgart.quality.model.properties.ParameterProperty;
import org.xmlobjects.model.ChildList;
public class Requirement extends GMLObject implements ADEObject {
......@@ -52,13 +53,13 @@ public class Requirement extends GMLObject implements ADEObject {
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);
}
}
......@@ -24,6 +24,7 @@ import org.xmlobjects.gml.model.GMLObject;
import de.hft.stuttgart.quality.model.properties.ErrorProperty;
import de.hft.stuttgart.quality.model.properties.FeatureStatisticsProperty;
import org.xmlobjects.model.ChildList;
public class Statistics extends GMLObject implements ADEObject {
......@@ -43,7 +44,7 @@ public class Statistics extends GMLObject implements ADEObject {
}
public void setNumErrorBuildings(FeatureStatisticsProperty numErrorBuildings) {
this.numErrorBuildings = numErrorBuildings;
this.numErrorBuildings = asChild(numErrorBuildings);
}
public FeatureStatisticsProperty getNumErrorVegetation() {
......@@ -51,7 +52,7 @@ public class Statistics extends GMLObject implements ADEObject {
}
public void setNumErrorVegetation(FeatureStatisticsProperty numErrorVegetation) {
this.numErrorVegetation = numErrorVegetation;
this.numErrorVegetation = asChild(numErrorVegetation);
}
public FeatureStatisticsProperty getNumErrorLandObjects() {
......@@ -59,7 +60,7 @@ public class Statistics extends GMLObject implements ADEObject {
}
public void setNumErrorLandObjects(FeatureStatisticsProperty numErrorLandObjects) {
this.numErrorLandObjects = numErrorLandObjects;
this.numErrorLandObjects = asChild(numErrorLandObjects);
}
public FeatureStatisticsProperty getNumErrorBridgeObjects() {
......@@ -67,7 +68,7 @@ public class Statistics extends GMLObject implements ADEObject {
}
public void setNumErrorBridgeObjects(FeatureStatisticsProperty numErrorBridgeObjects) {
this.numErrorBridgeObjects = numErrorBridgeObjects;
this.numErrorBridgeObjects = asChild(numErrorBridgeObjects);
}
public FeatureStatisticsProperty getNumErrorWaterObjects() {
......@@ -75,7 +76,7 @@ public class Statistics extends GMLObject implements ADEObject {
}
public void setNumErrorWaterObjects(FeatureStatisticsProperty numErrorWaterObjects) {
this.numErrorWaterObjects = numErrorWaterObjects;
this.numErrorWaterObjects = asChild(numErrorWaterObjects);
}
public FeatureStatisticsProperty getNumErrorTransportation() {
......@@ -83,18 +84,18 @@ public class Statistics extends GMLObject implements ADEObject {
}
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);
}
}
......@@ -25,6 +25,7 @@ import org.xmlobjects.gml.model.GMLObject;
import de.hft.stuttgart.quality.model.properties.FilterProperty;
import de.hft.stuttgart.quality.model.properties.GlobalParametersProperty;
import de.hft.stuttgart.quality.model.properties.RequirementProperty;
import org.xmlobjects.model.ChildList;
public class ValidationPlan extends GMLObject implements ADEObject {
......@@ -40,7 +41,7 @@ public class ValidationPlan extends GMLObject implements ADEObject {
}
public void setGlobalParameters(GlobalParametersProperty globalParameters) {
this.globalParameters = globalParameters;
this.globalParameters = asChild(globalParameters);
}
public FilterProperty getFilter() {
......@@ -48,18 +49,18 @@ public class ValidationPlan extends GMLObject implements ADEObject {
}
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);
}
......
......@@ -25,6 +25,7 @@ import org.xmlobjects.gml.model.base.Reference;
import de.hft.stuttgart.quality.model.enums.ResultType;
import de.hft.stuttgart.quality.model.properties.AbstractErrorProperty;
import org.xmlobjects.model.ChildList;
public class ValidationResult extends GMLObject implements ADEObject {
......@@ -40,12 +41,12 @@ public class ValidationResult extends GMLObject implements ADEObject {
}
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;
}
......
Markdown is supported
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