Commit 4ef4c11f authored by Matthias Betz's avatar Matthias Betz
Browse files

added type adapters

added validation tests
parent 5fe70e14
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.model.types.InnerRingsNestedError;
@XMLElement(name = "GE_P_INNER_RINGS_NESTED", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class InnerRingsNestedErrorAdapter extends AbstractPolygonErrorAdapter<InnerRingsNestedError> {
@Override
public InnerRingsNestedError createObject(QName name, Object parent) throws ObjectBuildException {
return new InnerRingsNestedError();
}
@Override
public void buildChildObject(InnerRingsNestedError object, QName name, Attributes attributes, XMLReader reader)
throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "linearRingId1" -> reader.getTextContent().ifPresent(object::setLinearRingId1);
case "linearRingId2" -> reader.getTextContent().ifPresent(object::setLinearRingId2);
default -> super.buildChildObject(object, name, attributes, reader);
}
}
@Override
public Element createElement(InnerRingsNestedError object, Namespaces namespaces) throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_P_INNER_RINGS_NESTED");
}
@Override
public void writeChildElements(InnerRingsNestedError object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
super.writeChildElements(object, namespaces, writer);
if (object.getLinearRingId1() != null) {
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "linearRingId1")
.addTextContent(object.getLinearRingId1()));
}
if (object.getLinearRingId2() != null) {
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "linearRingId2")
.addTextContent(object.getLinearRingId2()));
}
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.model.types.InteriorDisconnectedError;
@XMLElement(name = "GE_P_INTERIOR_DISCONNECTED", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class InteriorDisconnectedErrorAdapter extends AbstractPolygonErrorAdapter<InteriorDisconnectedError> {
@Override
public InteriorDisconnectedError createObject(QName name, Object parent) throws ObjectBuildException {
return new InteriorDisconnectedError();
}
@Override
public Element createElement(InteriorDisconnectedError object, Namespaces namespaces)
throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_P_INTERIOR_DISCONNECTED");
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.model.types.IntersectingRingsError;
@XMLElement(name = "GE_P_INTERSECTING_RINGS", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class IntersectingRingsErrorAdapter extends AbstractPolygonErrorAdapter<IntersectingRingsError> {
@Override
public IntersectingRingsError createObject(QName name, Object parent) throws ObjectBuildException {
return new IntersectingRingsError();
}
@Override
public void buildChildObject(IntersectingRingsError object, QName name, Attributes attributes, XMLReader reader)
throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "linearRingId1" -> reader.getTextContent().ifPresent(object::setLinearRingId1);
case "linearRingId2" -> reader.getTextContent().ifPresent(object::setLinearRingId2);
default -> super.buildChildObject(object, name, attributes, reader);
}
}
@Override
public Element createElement(IntersectingRingsError object, Namespaces namespaces) throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_P_INTERSECTING_RINGS");
}
@Override
public void writeChildElements(IntersectingRingsError object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
super.writeChildElements(object, namespaces, writer);
if (object.getLinearRingId1() != null) {
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "linearRingId1")
.addTextContent(object.getLinearRingId1()));
}
if (object.getLinearRingId2() != null) {
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "linearRingId2")
.addTextContent(object.getLinearRingId2()));
}
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.adapter.properties.ComponentListPropertyAdapter;
import de.hft.stuttgart.quality.model.properties.ComponentListProperty;
import de.hft.stuttgart.quality.model.types.MultipleComponentsError;
@XMLElement(name = "GE_S_MULTIPLE_CONNECTED_COMPONENTS", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class MultipleComponentsErrorAdapter extends AbstractSolidErrorAdapter<MultipleComponentsError> {
@Override
public MultipleComponentsError createObject(QName name, Object parent) throws ObjectBuildException {
return new MultipleComponentsError();
}
@Override
public void buildChildObject(MultipleComponentsError object, QName name, Attributes attributes, XMLReader reader)
throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "components" -> object.getComponents().add(reader.getObjectUsingBuilder(ComponentListPropertyAdapter.class));
default -> super.buildChildObject(object, name, attributes, reader);
}
}
@Override
public Element createElement(MultipleComponentsError object, Namespaces namespaces)
throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_S_MULTIPLE_CONNECTED_COMPONENTS");
}
@Override
public void writeChildElements(MultipleComponentsError object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
super.writeChildElements(object, namespaces, writer);
for (ComponentListProperty clp : object.getComponents()) {
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "components"), clp,
ComponentListPropertyAdapter.class, namespaces);
}
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.adapter.properties.EdgeListPropertyAdapter;
import de.hft.stuttgart.quality.model.types.NonManifoldEdgeError;
@XMLElement(name = "GE_S_NON_MANIFOLD_EDGE", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class NonManifoldEdgeErrorAdapter extends AbstractSolidErrorAdapter<NonManifoldEdgeError> {
@Override
public NonManifoldEdgeError createObject(QName name, Object parent) throws ObjectBuildException {
return new NonManifoldEdgeError();
}
@Override
public void buildChildObject(NonManifoldEdgeError object, QName name, Attributes attributes, XMLReader reader)
throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "edges" -> object.setEdges(reader.getObjectUsingBuilder(EdgeListPropertyAdapter.class));
default -> super.buildChildObject(object, name, attributes, reader);
}
}
@Override
public Element createElement(NonManifoldEdgeError object, Namespaces namespaces) throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_S_NON_MANIFOLD_EDGE");
}
@Override
public void writeChildElements(NonManifoldEdgeError object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
super.writeChildElements(object, namespaces, writer);
if (object.getEdges() != null) {
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "edges"), object.getEdges(),
EdgeListPropertyAdapter.class, namespaces);
}
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.geometry.DirectPositionAdapter;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.model.types.NonManifoldVertexError;
@XMLElement(name = "GE_S_NON_MANIFOLD_VERTEX", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class NonManifoldVertexErrorAdapter extends AbstractSolidErrorAdapter<NonManifoldVertexError> {
@Override
public NonManifoldVertexError createObject(QName name, Object parent) throws ObjectBuildException {
return new NonManifoldVertexError();
}
@Override
public void buildChildObject(NonManifoldVertexError object, QName name, Attributes attributes, XMLReader reader) throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "vertex" -> object.setVertex(reader.getObjectUsingBuilder(DirectPositionAdapter.class));
default -> super.buildChildObject(object, name, attributes, reader);
}
}
@Override
public Element createElement(NonManifoldVertexError object, Namespaces namespaces) throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_S_NON_MANIFOLD_VERTEX");
}
@Override
public void writeChildElements(NonManifoldVertexError object, Namespaces namespaces, XMLWriter writer) throws ObjectSerializeException, XMLWriteException {
super.writeChildElements(object, namespaces, writer);
if (object.getVertex() != null) {
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "vertex"), object.getVertex(), DirectPositionAdapter.class, namespaces);
}
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.model.types.OrientationRingsSameError;
@XMLElement(name = "GE_P_ORIENTATION_RINGS_SAME", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class OrientationRingsSameErrorAdapter extends AbstractPolygonErrorAdapter<OrientationRingsSameError> {
@Override
public OrientationRingsSameError createObject(QName name, Object parent) throws ObjectBuildException {
return new OrientationRingsSameError();
}
@Override
public void buildChildObject(OrientationRingsSameError object, QName name, Attributes attributes, XMLReader reader)
throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "linearRingId" -> reader.getTextContent().ifPresent(object::setLinearRing);
default -> super.buildChildObject(object, name, attributes, reader);
}
}
@Override
public Element createElement(OrientationRingsSameError object, Namespaces namespaces)
throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_P_ORIENTATION_RINGS_SAME");
}
@Override
public void writeChildElements(OrientationRingsSameError object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
super.writeChildElements(object, namespaces, writer);
if (object.getLinearRing() != null) {
writer.writeElement(
Element.of(QualityADEModule.NAMESPACE_URI, "linearRingId").addTextContent(object.getLinearRing()));
}
}
}
package de.hft.stuttgart.quality.adapter.types;
import de.hft.stuttgart.quality.model.types.Parameter;
import de.hft.stuttgart.quality.QualityADEModule;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.builder.ObjectBuilder;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.serializer.ObjectSerializer;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import javax.xml.namespace.QName;
@XMLElement(name = "Parameter", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class ParameterAdapter implements ObjectBuilder<Parameter>, ObjectSerializer<Parameter> {
@Override
public Parameter createObject(QName name, Object parent) throws ObjectBuildException {
return new Parameter();
}
@Override
public void buildChildObject(Parameter object, QName name, Attributes attributes, XMLReader reader) throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "name" -> reader.getTextContent().ifPresent(object::setName);
case "uom" -> reader.getTextContent().ifPresent(object::setUom);
case "value" -> reader.getTextContent().ifPresent(object::setValue);
default -> throw new IllegalStateException("Cannot handle name " + name + " when building Parameter element");
}
}
@Override
public Element createElement(Parameter object, Namespaces namespaces) throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "Parameter");
}
@Override
public void writeChildElements(Parameter object, Namespaces namespaces, XMLWriter writer) throws ObjectSerializeException, XMLWriteException {
if (object.getName() != null) {
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "name").addTextContent(object.getName()));
}
if (object.getUom() != null) {
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "uom").addTextContent(object.getUom()));
}
if (object.getValue() != null) {
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "value").addTextContent(object.getValue()));
}
}
}
/*- package de.hft.stuttgart.quality.adapter.types;
* 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.adapter;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException; import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.builder.ObjectBuilder;
import org.xmlobjects.gml.adapter.geometry.DirectPositionAdapter; import org.xmlobjects.gml.adapter.geometry.DirectPositionAdapter;
import org.xmlobjects.gml.adapter.measures.LengthAdapter;
import org.xmlobjects.serializer.ObjectSerializeException; import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.serializer.ObjectSerializer;
import org.xmlobjects.stream.XMLReadException; import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader; import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException; import org.xmlobjects.stream.XMLWriteException;
...@@ -31,39 +16,47 @@ import org.xmlobjects.xml.Element; ...@@ -31,39 +16,47 @@ import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces; import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule; import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.model.types.Edge; import de.hft.stuttgart.quality.model.types.PlanarDistancePlaneError;
public class EdgeAdapter implements ObjectBuilder<Edge>, ObjectSerializer<Edge> { @XMLElement(name = "GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class PlanarDistancePlaneErrorAdapter extends AbstractPolygonErrorAdapter<PlanarDistancePlaneError> {
@Override @Override
public Edge createObject(QName name, Object parent) throws ObjectBuildException { public PlanarDistancePlaneError createObject(QName name, Object parent) throws ObjectBuildException {
return new Edge(); return new PlanarDistancePlaneError();
} }
@Override @Override
public void buildChildObject(Edge object, QName name, Attributes attributes, XMLReader reader) public void buildChildObject(PlanarDistancePlaneError object, QName name, Attributes attributes, XMLReader reader)
throws ObjectBuildException, XMLReadException { throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) { if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return; return;
} }
switch (name.getLocalPart()) { switch (name.getLocalPart()) {
case "from" -> object.setFrom(reader.getObjectUsingBuilder(DirectPositionAdapter.class)); case "vertex" -> object.setVertex(reader.getObjectUsingBuilder(DirectPositionAdapter.class));
case "to" -> object.setTo(reader.getObjectUsingBuilder(DirectPositionAdapter.class)); case "distance" -> object.setDistance(reader.getObjectUsingBuilder(LengthAdapter.class));
default -> throw new IllegalStateException("Cannot handle name " + name + " when building edge element"); default -> super.buildChildObject(object, name, attributes, reader);
} }
} }
@Override @Override
public void writeChildElements(Edge object, Namespaces namespaces, XMLWriter writer) public Element createElement(PlanarDistancePlaneError object, Namespaces namespaces)
throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE");
}
@Override
public void writeChildElements(PlanarDistancePlaneError object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException { throws ObjectSerializeException, XMLWriteException {
if (object.getFrom() != null) { super.writeChildElements(object, namespaces, writer);
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "from"), object.getFrom(), if (object.getDistance() != null) {
DirectPositionAdapter.class, namespaces); writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "distance"),
object.getDistance(), LengthAdapter.class, namespaces);
} }
if (object.getTo() != null) { if (object.getVertex() != null) {
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "to"), object.getTo(), writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "vertex"), object.getVertex(),
DirectPositionAdapter.class, namespaces); DirectPositionAdapter.class, namespaces);
} }
}
}
} }
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.measures.AngleAdapter;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.model.types.PlanarNormalsDeviationError;
@XMLElement(name = "GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class PlanarNormalsDeviationErrorAdapter extends AbstractPolygonErrorAdapter<PlanarNormalsDeviationError> {
@Override
public PlanarNormalsDeviationError createObject(QName name, Object parent) throws ObjectBuildException {
return new PlanarNormalsDeviationError();
}
@Override
public void buildChildObject(PlanarNormalsDeviationError object, QName name, Attributes attributes,
XMLReader reader) throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "deviation" -> object.setDeviation(reader.getObjectUsingBuilder(AngleAdapter.class));
default -> super.buildChildObject(object, name, attributes, reader);
}
}
@Override
public Element createElement(PlanarNormalsDeviationError object, Namespaces namespaces)
throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION");
}
@Override
public void writeChildElements(PlanarNormalsDeviationError object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
super.writeChildElements(object, namespaces, writer);
if (object.getDeviation() != null) {
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "deviation"),
object.getDeviation(), AngleAdapter.class, namespaces);
}
}
}
package de.hft.stuttgart.quality.adapter.types;
import de.hft.stuttgart.quality.model.types.PolygonIdList;
import de.hft.stuttgart.quality.QualityADEModule;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.builder.ObjectBuilder;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.serializer.ObjectSerializer;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import javax.xml.namespace.QName;
@XMLElement(name = "PolygonIdList", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class PolygonIdListAdapter implements ObjectBuilder<PolygonIdList>, ObjectSerializer<PolygonIdList> {
@Override
public PolygonIdList createObject(QName name, Object parent) throws ObjectBuildException {
return new PolygonIdList();
}
@Override
public void buildChildObject(PolygonIdList object, QName name, Attributes attributes, XMLReader reader)
throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "polygonId" -> object.getPolygonIds().add(reader.getTextContent().get());
default -> throw new IllegalStateException(
"Cannot handle name " + name + " when building PolygonIdList element");
}
}
@Override
public Element createElement(PolygonIdList object, Namespaces namespaces) throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "PolygonIdList");
}
@Override
public void writeChildElements(PolygonIdList object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
for (String polygonId : object.getPolygonIds()) {
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "polygonId").addTextContent(polygonId));
}
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.adapter.properties.EdgeListPropertyAdapter;
import de.hft.stuttgart.quality.model.types.PolygonWrongOrientationError;
@XMLElement(name = "GE_S_POLYGON_WRONG_ORIENTATION", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class PolygonWrongOrientationErrorAdapter extends AbstractSolidErrorAdapter<PolygonWrongOrientationError> {
@Override
public PolygonWrongOrientationError createObject(QName name, Object parent) throws ObjectBuildException {
return new PolygonWrongOrientationError();
}
@Override
public void buildChildObject(PolygonWrongOrientationError object, QName name, Attributes attributes,
XMLReader reader) throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "edges" -> object.setEdges(reader.getObjectUsingBuilder(EdgeListPropertyAdapter.class));
default -> super.buildChildObject(object, name, attributes, reader);
}
}
@Override
public Element createElement(PolygonWrongOrientationError object, Namespaces namespaces)
throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_S_POLYGON_WRONG_ORIENTATION");
}
@Override
public void writeChildElements(PolygonWrongOrientationError object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
super.writeChildElements(object, namespaces, writer);
if (object.getEdges() != null) {
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "edges"), object.getEdges(),
EdgeListPropertyAdapter.class, namespaces);
}
}
}
package de.hft.stuttgart.quality.adapter.types;
import de.hft.stuttgart.quality.model.enums.RequirementId;
import de.hft.stuttgart.quality.model.properties.ParameterProperty;
import de.hft.stuttgart.quality.model.types.Requirement;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.adapter.properties.ParameterPropertyAdapter;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.builder.ObjectBuilder;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.serializer.ObjectSerializer;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import javax.xml.namespace.QName;
@XMLElement(name = "Requirement", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class RequirementAdapter implements ObjectBuilder<Requirement>, ObjectSerializer<Requirement> {
@Override
public Requirement createObject(QName name, Object parent) throws ObjectBuildException {
return new Requirement();
}
@Override
public void buildChildObject(Requirement object, QName name, Attributes attributes, XMLReader reader)
throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "enabled" -> reader.getTextContent().ifPresent(s -> object.setEnabled(Boolean.parseBoolean(s)));
case "requirementType" -> object.setRequirementType(RequirementId.valueOf(reader.getTextContent().get()));
case "parameter" -> object.getParameters().add(reader.getObjectUsingBuilder(ParameterPropertyAdapter.class));
default -> throw new IllegalStateException("Cannot handle name " + name + " when building Requirement element");
}
}
@Override
public Element createElement(Requirement object, Namespaces namespaces) throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "Requirement");
}
@Override
public void writeChildElements(Requirement object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "enabled")
.addTextContent(Boolean.toString(object.isEnabled())));
if (object.getRequirementType() != null) {
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "requirementType")
.addTextContent(object.getRequirementType().toString()));
}
for (ParameterProperty params : object.getParameters()) {
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "parameter"), params,
ParameterPropertyAdapter.class, namespaces);
}
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.model.types.RingNotClosedError;
@XMLElement(name = "GE_R_NOT_CLOSED", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class RingNotClosedErrorAdapter extends AbstractRingErrorAdapter<RingNotClosedError> {
@Override
public RingNotClosedError createObject(QName name, Object parent) throws ObjectBuildException {
return new RingNotClosedError();
}
@Override
public Element createElement(RingNotClosedError object, Namespaces namespaces) throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_R_NOT_CLOSED");
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.gml.adapter.geometry.DirectPositionAdapter;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.adapter.properties.EdgePropertyAdapter;
import de.hft.stuttgart.quality.model.enums.RingSelfIntType;
import de.hft.stuttgart.quality.model.types.RingSelfIntersectionError;
@XMLElement(name = "GE_R_SELF_INTERSECTION", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class RingSelfIntersectionErrorAdapter extends AbstractRingErrorAdapter<RingSelfIntersectionError> {
@Override
public RingSelfIntersectionError createObject(QName name, Object parent) throws ObjectBuildException {
return new RingSelfIntersectionError();
}
@Override
public void buildChildObject(RingSelfIntersectionError object, QName name, Attributes attributes, XMLReader reader)
throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "type" -> reader.getTextContent().ifPresent(s -> object.setType(RingSelfIntType.valueOf(s)));
case "edge1" -> object.setEdge1(reader.getObjectUsingBuilder(EdgePropertyAdapter.class));
case "edge2" -> object.setEdge2(reader.getObjectUsingBuilder(EdgePropertyAdapter.class));
case "vertex1" -> object.setVertex1(reader.getObjectUsingBuilder(DirectPositionAdapter.class));
case "vertex2" -> object.setVertex2(reader.getObjectUsingBuilder(DirectPositionAdapter.class));
default -> super.buildChildObject(object, name, attributes, reader);
}
}
@Override
public Element createElement(RingSelfIntersectionError object, Namespaces namespaces)
throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_R_SELF_INTERSECTION");
}
@Override
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);
}
if (object.getEdge2() != null) {
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "edge2"), object.getEdge2(),
EdgePropertyAdapter.class, namespaces);
}
if (object.getVertex1() != null) {
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "vertex1"),
object.getVertex1(), DirectPositionAdapter.class, namespaces);
}
if (object.getVertex2() != null) {
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "vertex2"),
object.getVertex2(), DirectPositionAdapter.class, namespaces);
}
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.model.types.RingTooFewPointsError;
@XMLElement(name = "GE_R_TOO_FEW_POINTS", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class RingTooFewPointsErrorAdapter extends AbstractRingErrorAdapter<RingTooFewPointsError> {
@Override
public RingTooFewPointsError createObject(QName name, Object parent) throws ObjectBuildException {
return new RingTooFewPointsError();
}
@Override
public Element createElement(RingTooFewPointsError object, Namespaces namespaces) throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_R_TOO_FEW_POINTS");
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.model.types.SemanticAttributeMissingError;
@XMLElement(name = "SE_ATTRIBUTE_MISSING", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class SemanticAttributeMissingErrorAdapter extends AbstractSemanticErrorAdapter<SemanticAttributeMissingError> {
@Override
public SemanticAttributeMissingError createObject(QName name, Object parent) throws ObjectBuildException {
return new SemanticAttributeMissingError();
}
@Override
public void buildChildObject(SemanticAttributeMissingError object, QName name, Attributes attributes,
XMLReader reader) throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "childId" -> reader.getTextContent().ifPresent(object::setChildId);
case "attributeName" -> reader.getTextContent().ifPresent(object::setAttributeName);
case "generic" -> reader.getTextContent().ifPresent(s -> object.setGeneric(Boolean.parseBoolean(s)));
default -> throw new IllegalStateException(
"Cannot handle name " + name + " when building SemanticAttributeMissingError element");
}
}
@Override
public Element createElement(SemanticAttributeMissingError object, Namespaces namespaces)
throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "SE_ATTRIBUTE_MISSING");
}
@Override
public void writeChildElements(SemanticAttributeMissingError object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
if (object.getChildId() != null) {
writer.writeElement(
Element.of(QualityADEModule.NAMESPACE_URI, "childId").addTextContent(object.getChildId()));
}
if (object.getAttributeName() != null) {
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "attributeName")
.addTextContent(object.getAttributeName()));
}
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "generic")
.addTextContent(Boolean.toString(object.isGeneric())));
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.model.types.SemanticAttributeWrongValueError;
@XMLElement(name = "SE_ATTRIBUTE_WRONG_VALUE", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class SemanticAttributeWrongValueErrorAdapter
extends AbstractSemanticErrorAdapter<SemanticAttributeWrongValueError> {
@Override
public SemanticAttributeWrongValueError createObject(QName name, Object parent) throws ObjectBuildException {
return new SemanticAttributeWrongValueError();
}
@Override
public void buildChildObject(SemanticAttributeWrongValueError object, QName name, Attributes attributes,
XMLReader reader) throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "childId" -> reader.getTextContent().ifPresent(object::setChildId);
case "attributeName" -> reader.getTextContent().ifPresent(object::setAttributeName);
case "generic" -> reader.getTextContent().ifPresent(s -> object.setGeneric(Boolean.parseBoolean(s)));
default -> throw new IllegalStateException(
"Cannot handle name " + name + " when building SemanticAttributeWrongValueError element");
}
}
@Override
public Element createElement(SemanticAttributeWrongValueError object, Namespaces namespaces)
throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "SE_ATTRIBUTE_WRONG_VALUE");
}
@Override
public void writeChildElements(SemanticAttributeWrongValueError object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
super.writeChildElements(object, namespaces, writer);
if (object.getChildId() != null) {
writer.writeElement(
Element.of(QualityADEModule.NAMESPACE_URI, "childId").addTextContent(object.getChildId()));
}
if (object.getAttributeName() != null) {
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "attributeName")
.addTextContent(object.getAttributeName()));
}
writer.writeElement(Element.of(QualityADEModule.NAMESPACE_URI, "generic")
.addTextContent(Boolean.toString(object.isGeneric())));
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.adapter.properties.EdgeListPropertyAdapter;
import de.hft.stuttgart.quality.model.types.SolidNotClosedError;
@XMLElement(name = "GE_S_NOT_CLOSED", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class SolidNotClosedErrorAdapter extends AbstractSolidErrorAdapter<SolidNotClosedError> {
@Override
public SolidNotClosedError createObject(QName name, Object parent) throws ObjectBuildException {
return new SolidNotClosedError();
}
@Override
public void buildChildObject(SolidNotClosedError object, QName name, Attributes attributes, XMLReader reader)
throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "edges" -> object.setEdges(reader.getObjectUsingBuilder(EdgeListPropertyAdapter.class));
default -> super.buildChildObject(object, name, attributes, reader);
}
}
@Override
public Element createElement(SolidNotClosedError object, Namespaces namespaces) throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_S_NOT_CLOSED");
}
@Override
public void writeChildElements(SolidNotClosedError object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
super.writeChildElements(object, namespaces, writer);
if (object.getEdges() != null) {
writer.writeElementUsingSerializer(Element.of(QualityADEModule.NAMESPACE_URI, "edges"), object.getEdges(),
EdgeListPropertyAdapter.class, namespaces);
}
}
}
package de.hft.stuttgart.quality.adapter.types;
import javax.xml.namespace.QName;
import org.xmlobjects.annotation.XMLElement;
import org.xmlobjects.builder.ObjectBuildException;
import org.xmlobjects.serializer.ObjectSerializeException;
import org.xmlobjects.stream.XMLReadException;
import org.xmlobjects.stream.XMLReader;
import org.xmlobjects.stream.XMLWriteException;
import org.xmlobjects.stream.XMLWriter;
import org.xmlobjects.xml.Attributes;
import org.xmlobjects.xml.Element;
import org.xmlobjects.xml.Namespaces;
import de.hft.stuttgart.quality.QualityADEModule;
import de.hft.stuttgart.quality.model.types.SolidSelfIntersectionError;
@XMLElement(name = "GE_S_SELF_INTERSECTION", namespaceURI = QualityADEModule.NAMESPACE_URI)
public class SolidSelfIntersectionErrorAdapter extends AbstractSolidErrorAdapter<SolidSelfIntersectionError> {
@Override
public SolidSelfIntersectionError createObject(QName name, Object parent) throws ObjectBuildException {
return new SolidSelfIntersectionError();
}
@Override
public void buildChildObject(SolidSelfIntersectionError object, QName name, Attributes attributes, XMLReader reader)
throws ObjectBuildException, XMLReadException {
if (!QualityADEModule.NAMESPACE_URI.equals(name.getNamespaceURI())) {
return;
}
switch (name.getLocalPart()) {
case "polygonId1" -> reader.getTextContent().ifPresent(object::setPolygonId1);
case "polygonId2" -> reader.getTextContent().ifPresent(object::setPolygonId2);
default -> super.buildChildObject(object, name, attributes, reader);
}
}
@Override
public Element createElement(SolidSelfIntersectionError object, Namespaces namespaces)
throws ObjectSerializeException {
return Element.of(QualityADEModule.NAMESPACE_URI, "GE_S_SELF_INTERSECTION");
}
@Override
public void writeChildElements(SolidSelfIntersectionError object, Namespaces namespaces, XMLWriter writer)
throws ObjectSerializeException, XMLWriteException {
super.writeChildElements(object, namespaces, writer);
if (object.getPolygonId1() != null) {
writer.writeElement(
Element.of(QualityADEModule.NAMESPACE_URI, "polygonId1").addTextContent(object.getPolygonId1()));
}
if (object.getPolygonId2() != null) {
writer.writeElement(
Element.of(QualityADEModule.NAMESPACE_URI, "polygonId2").addTextContent(object.getPolygonId2()));
}
}
}
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