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

update xal-objects to 1.3.0 to avoid serialization error

parent 8ae8f2a5
Pipeline #12313 passed with stage
in 2 minutes
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
<groupId>org.citygml4j</groupId> <groupId>org.citygml4j</groupId>
<artifactId>citygml4j-xml</artifactId> <artifactId>citygml4j-xml</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.xmlobjects.xal</groupId>
<artifactId>xal-objects</artifactId>
</dependency>
<dependency> <dependency>
<groupId>de.hft.stuttgart</groupId> <groupId>de.hft.stuttgart</groupId>
<artifactId>citygml4j-quality-ade</artifactId> <artifactId>citygml4j-quality-ade</artifactId>
......
package org.xmlobjects.xml;
import java.io.Serializable;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import javax.xml.XMLConstants;
import javax.xml.namespace.QName;
public class Attributes implements Serializable {
private static final long serialVersionUID = 8942583366234714632L;
private final Map<String, Map<String, TextContent>> attributes = new HashMap<>();
public boolean isEmpty() {
return attributes.isEmpty();
}
public void add(String namespaceURI, String localName, TextContent value) {
attributes.computeIfAbsent(namespaceURI, v -> new HashMap<>()).put(localName, value);
}
public void add(String namespaceURI, String localName, String value) {
add(namespaceURI, localName, TextContent.of(value));
}
public void add(String localName, TextContent value) {
add(XMLConstants.NULL_NS_URI, localName, value);
}
public void add(String localName, String value) {
add(localName, TextContent.of(value));
}
public void add(QName name, TextContent value) {
add(name.getNamespaceURI(), name.getLocalPart(), value);
}
public void add(QName name, String value) {
add(name, TextContent.of(value));
}
public void addAll(String namespaceURI, Map<String, TextContent> attributes) {
this.attributes.computeIfAbsent(namespaceURI, v -> new HashMap<>()).putAll(attributes);
}
public Map<String, Map<String, TextContent>> get() {
return attributes;
}
public Map<String, TextContent> get(String namespaceURI) {
return attributes.getOrDefault(namespaceURI, Collections.emptyMap());
}
public TextContent getValue(String localName) {
return getValue(XMLConstants.NULL_NS_URI, localName);
}
public TextContent getValue(String namespaceURI, String localName) {
return get(namespaceURI).getOrDefault(localName, TextContent.empty());
}
public TextContent getValue(QName name) {
return getValue(name.getNamespaceURI(), name.getLocalPart());
}
public Attributes copy() {
Attributes copy = new Attributes();
copy.attributes.putAll(attributes);
return copy;
}
}
...@@ -248,11 +248,7 @@ public class Healer { ...@@ -248,11 +248,7 @@ public class Healer {
// recheck for geometry errors as they were removed when executing the // recheck for geometry errors as they were removed when executing the
// schematron stuff // schematron stuff
co.prepareForChecking();
checker.executeChecksForCheckable(co); checker.executeChecksForCheckable(co);
if (checker.getConfig().getParserConfiguration().useLowMemoryConsumption()) {
co.clearMetaInformation();
}
} }
private void executeSchematron(CityObject co) { private void executeSchematron(CityObject co) {
...@@ -310,9 +306,6 @@ public class Healer { ...@@ -310,9 +306,6 @@ public class Healer {
} }
public void heal(Geometry geom, CityObject co, int numIterations) { public void heal(Geometry geom, CityObject co, int numIterations) {
if (checker.getConfig().getParserConfiguration().useLowMemoryConsumption()) {
co.prepareForChecking();
}
if (!co.isValidated()) { if (!co.isValidated()) {
// check it if it has not been checked yet // check it if it has not been checked yet
checker.executeChecksForCheckable(co); checker.executeChecksForCheckable(co);
...@@ -337,17 +330,12 @@ public class Healer { ...@@ -337,17 +330,12 @@ public class Healer {
// break iteration loop, nothing more to be done // break iteration loop, nothing more to be done
break; break;
} }
co.prepareForChecking();
filterOutDuplicateVertices(co); filterOutDuplicateVertices(co);
// recheck for errors // recheck for errors
checker.executeChecksForCheckable(co); checker.executeChecksForCheckable(co);
} }
} catch (Exception e) { } catch (Exception e) {
logger.debug("Failed to heal geometry", e); logger.debug("Failed to heal geometry", e);
} finally {
if (checker.getConfig().getParserConfiguration().useLowMemoryConsumption()) {
co.clearMetaInformation();
}
} }
} }
......
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
<configuration> <configuration>
<testFailureIgnore>false</testFailureIgnore> <testFailureIgnore>false</testFailureIgnore>
<excludes> <excludes>
<exclude>**/SolidSelfIntCheckFalsePositiveBigMeshTest.java</exclude> <exclude>
**/SolidSelfIntCheckFalsePositiveBigMeshTest.java</exclude>
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin>
...@@ -257,6 +258,11 @@ ...@@ -257,6 +258,11 @@
<artifactId>HikariCP</artifactId> <artifactId>HikariCP</artifactId>
<version>7.0.2</version> <version>7.0.2</version>
</dependency> </dependency>
<dependency>
<groupId>org.xmlobjects.xal</groupId>
<artifactId>xal-objects</artifactId>
<version>1.3.0</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<dependencies> <dependencies>
...@@ -302,10 +308,10 @@ ...@@ -302,10 +308,10 @@
<!--CityDoctor2 Extension Modules--> <!--CityDoctor2 Extension Modules-->
<module>Extensions/CityDoctorGUI</module> <module>Extensions/CityDoctorGUI</module>
<!-- <module>Extensions/CityDoctorAutoPro</module>--> <!-- <module>Extensions/CityDoctorAutoPro</module>-->
<!-- <module>Extensions/CityDoctorHealer</module>--> <!-- <module>Extensions/CityDoctorHealer</module>-->
<!-- <module>Extensions/CityDoctorHealerGenetic</module>--> <!-- <module>Extensions/CityDoctorHealerGenetic</module>-->
<!-- <module>Extensions/CityDoctorHealerGUI</module>--> <!-- <module>Extensions/CityDoctorHealerGUI</module>-->
</modules> </modules>
</project> </project>
\ No newline at end of file
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