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>
...@@ -59,11 +63,11 @@ ...@@ -59,11 +63,11 @@
<groupId>org.locationtech.proj4j</groupId> <groupId>org.locationtech.proj4j</groupId>
<artifactId>proj4j-epsg</artifactId> <artifactId>proj4j-epsg</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-io</groupId> <groupId>commons-io</groupId>
<artifactId>commons-io</artifactId> <artifactId>commons-io</artifactId>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.locationtech.jts</groupId> <groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId> <artifactId>jts-core</artifactId>
...@@ -80,10 +84,10 @@ ...@@ -80,10 +84,10 @@
<groupId>com.github.ben-manes.caffeine</groupId> <groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId> <artifactId>caffeine</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.zaxxer</groupId> <groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId> <artifactId>HikariCP</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<resources> <resources>
......
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();
}
} }
} }
......
This diff is collapsed.
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