diff --git a/exist-core/pom.xml b/exist-core/pom.xml index afc4b0fabd9..e7867cb056e 100644 --- a/exist-core/pom.xml +++ b/exist-core/pom.xml @@ -385,24 +385,6 @@ runtime - - xalan - xalan - ${xalan.version} - - - xml-apis - xml-apis - - - - - - xalan - serializer - ${xalan.version} - - net.sf.saxon Saxon-HE @@ -1043,7 +1025,6 @@ The BaseX Team. The original license statement is also included below.]]>org.apache.logging.log4j:log4j-jcl:jar:${log4j.version} org.apache.logging.log4j:log4j-slf4j2-impl:jar:${log4j.version} org.apache.logging.log4j:log4j-jul:jar:${log4j.version} - xalan:serializer:jar:${xalan.version} org.eclipse.angus:angus-activation:jar:${eclipse.angus-activation.version} org.glassfish.jaxb:jaxb-runtime:jar:${jaxb.impl.version} org.fusesource.jansi:jansi:jar:${jansi.version} diff --git a/exist-core/src/main/java/org/exist/dom/memtree/NodeImpl.java b/exist-core/src/main/java/org/exist/dom/memtree/NodeImpl.java index 7c69574049f..40754e5e811 100644 --- a/exist-core/src/main/java/org/exist/dom/memtree/NodeImpl.java +++ b/exist-core/src/main/java/org/exist/dom/memtree/NodeImpl.java @@ -21,8 +21,8 @@ */ package org.exist.dom.memtree; -import org.apache.xml.utils.XML11Char; -import org.apache.xml.utils.XMLChar; +import org.apache.xerces.util.XML11Char; +import org.apache.xerces.util.XMLChar; import org.exist.collections.Collection; import org.exist.dom.INode; import org.exist.dom.NodeListImpl; diff --git a/exist-core/src/test/java/org/exist/xslt/TransformerFactoryAllocatorTest.java b/exist-core/src/test/java/org/exist/xslt/TransformerFactoryAllocatorTest.java index d11442b4040..62170a22974 100644 --- a/exist-core/src/test/java/org/exist/xslt/TransformerFactoryAllocatorTest.java +++ b/exist-core/src/test/java/org/exist/xslt/TransformerFactoryAllocatorTest.java @@ -48,8 +48,7 @@ public class TransformerFactoryAllocatorTest { @Parameters(name = "{0}") public static Collection data() { return Arrays.asList(new Object[][] { - { "net.sf.saxon.TransformerFactoryImpl" }, - { "org.apache.xalan.processor.TransformerFactoryImpl" } + { "net.sf.saxon.TransformerFactoryImpl" } }); } diff --git a/exist-core/src/test/resources/org/exist/config/conf1.xml b/exist-core/src/test/resources/org/exist/config/conf1.xml index 9177d288bb9..f3cbf46fb68 100644 --- a/exist-core/src/test/resources/org/exist/config/conf1.xml +++ b/exist-core/src/test/resources/org/exist/config/conf1.xml @@ -71,8 +71,10 @@ - - + + + + diff --git a/exist-core/src/test/resources/org/exist/config/conf2.xml b/exist-core/src/test/resources/org/exist/config/conf2.xml index e772b1bdab7..0e424ae4bc7 100644 --- a/exist-core/src/test/resources/org/exist/config/conf2.xml +++ b/exist-core/src/test/resources/org/exist/config/conf2.xml @@ -73,8 +73,10 @@ - - + + + + diff --git a/exist-parent/pom.xml b/exist-parent/pom.xml index 94cf1f348c4..d1c03e7a106 100644 --- a/exist-parent/pom.xml +++ b/exist-parent/pom.xml @@ -120,7 +120,6 @@ 1.8.1.3-jakarta5 2.1.3 9.9.1-8 - 2.7.3 5.2.3 2.10.0 4.13.2 diff --git a/extensions/indexes/spatial/pom.xml b/extensions/indexes/spatial/pom.xml index 3fa857eebee..84d4e914572 100644 --- a/extensions/indexes/spatial/pom.xml +++ b/extensions/indexes/spatial/pom.xml @@ -46,7 +46,7 @@ - 2.4.5 + 32.0 @@ -60,31 +60,15 @@ org.apache.logging.log4j log4j-api - - - org.opengis - geoapi-nogenerics - 2.1.1 - org.geotools - gt2-api + gt-api ${geotools.version} org.geotools - gt2-main + gt-main ${geotools.version} - - - jdom - jdom - - - commons-beanutils - commons-beanutils - - org.jdom @@ -94,30 +78,13 @@ org.geotools - gt2-referencing + gt-referencing ${geotools.version} - - com.vividsolutions - jts - 1.13 + org.geotools + gt-xml + ${geotools.version} org.hsqldb @@ -125,10 +92,15 @@ 2.7.1 + + org.locationtech.jts + jts-core + 1.19.0 + org.geotools - gt2-epsg-wkt + gt-epsg-wkt ${geotools.version} runtime @@ -188,7 +160,7 @@ true - org.geotools:gt2-epsg-wkt:jar:${geotools.version} + org.geotools:gt-epsg-wkt:jar:${geotools.version} org.hsqldb:hsqldb:jar java3d:vecmath:jar:1.3.1 javax.media:jai_core:jar:1.1.3 @@ -223,42 +195,9 @@ - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - - - - - test-java8 - - 1.8 - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - - - - osgeo diff --git a/extensions/indexes/spatial/src/main/java/org/exist/indexing/spatial/AbstractGMLJDBCIndexWorker.java b/extensions/indexes/spatial/src/main/java/org/exist/indexing/spatial/AbstractGMLJDBCIndexWorker.java index 224093ead5f..80e1f70a908 100644 --- a/extensions/indexes/spatial/src/main/java/org/exist/indexing/spatial/AbstractGMLJDBCIndexWorker.java +++ b/extensions/indexes/spatial/src/main/java/org/exist/indexing/spatial/AbstractGMLJDBCIndexWorker.java @@ -21,11 +21,11 @@ */ package org.exist.indexing.spatial; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.io.WKBReader; -import com.vividsolutions.jts.io.WKBWriter; -import com.vividsolutions.jts.io.WKTReader; -import com.vividsolutions.jts.io.WKTWriter; +import org.locationtech.jts.geom.Geometry; +import org.locationtech.jts.io.WKBReader; +import org.locationtech.jts.io.WKBWriter; +import org.locationtech.jts.io.WKTReader; +import org.locationtech.jts.io.WKTWriter; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.exist.collections.Collection; @@ -55,10 +55,10 @@ import org.geotools.gml.GMLHandlerJTS; import org.geotools.gml.producer.GeometryTransformer; import org.geotools.referencing.CRS; -import org.opengis.referencing.FactoryException; -import org.opengis.referencing.operation.MathTransform; -import org.opengis.referencing.operation.OperationNotFoundException; -import org.opengis.referencing.operation.TransformException; +import org.geotools.api.referencing.FactoryException; +import org.geotools.api.referencing.operation.MathTransform; +import org.geotools.api.referencing.operation.OperationNotFoundException; +import org.geotools.api.referencing.operation.TransformException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; @@ -74,6 +74,7 @@ import javax.xml.transform.TransformerException; import java.io.IOException; import java.io.StringReader; +import java.nio.charset.StandardCharsets; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; @@ -111,7 +112,7 @@ public abstract class AbstractGMLJDBCIndexWorker implements IndexWorker { protected TreeMap transformations = new TreeMap<>(); protected boolean useLenientMode = false; protected GeometryCoordinateSequenceTransformer coordinateTransformer = new GeometryCoordinateSequenceTransformer(); - protected GeometryTransformer gmlTransformer = new GeometryTransformer(); + protected final GeometryTransformer gmlTransformer; protected WKBWriter wkbWriter = new WKBWriter(); protected WKBReader wkbReader = new WKBReader(); protected WKTWriter wktWriter = new WKTWriter(); @@ -120,6 +121,11 @@ public abstract class AbstractGMLJDBCIndexWorker implements IndexWorker { public AbstractGMLJDBCIndexWorker(AbstractGMLJDBCIndex index, DBBroker broker) { this.index = index; this.broker = broker; + this.gmlTransformer = new GeometryTransformer(); + gmlTransformer.setEncoding(StandardCharsets.UTF_8); + gmlTransformer.setIndentation(4); + gmlTransformer.setNamespaceDeclarationEnabled(true); + gmlTransformer.setOmitXMLDeclaration(false); } protected DBBroker getBroker() { diff --git a/extensions/indexes/spatial/src/main/java/org/exist/indexing/spatial/GMLHSQLIndexWorker.java b/extensions/indexes/spatial/src/main/java/org/exist/indexing/spatial/GMLHSQLIndexWorker.java index c1ad96efde7..748b5a8763b 100644 --- a/extensions/indexes/spatial/src/main/java/org/exist/indexing/spatial/GMLHSQLIndexWorker.java +++ b/extensions/indexes/spatial/src/main/java/org/exist/indexing/spatial/GMLHSQLIndexWorker.java @@ -45,8 +45,8 @@ import org.exist.xquery.value.StringValue; import org.exist.xquery.value.ValueSequence; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.io.ParseException; +import org.locationtech.jts.geom.Geometry; +import org.locationtech.jts.io.ParseException; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; import org.exist.xquery.XQueryContext; import org.exist.xquery.value.Base64BinaryValueType; diff --git a/extensions/indexes/spatial/src/main/java/org/exist/xquery/modules/spatial/FunGMLProducers.java b/extensions/indexes/spatial/src/main/java/org/exist/xquery/modules/spatial/FunGMLProducers.java index f6bc852b8f5..539943b34fd 100644 --- a/extensions/indexes/spatial/src/main/java/org/exist/xquery/modules/spatial/FunGMLProducers.java +++ b/extensions/indexes/spatial/src/main/java/org/exist/xquery/modules/spatial/FunGMLProducers.java @@ -47,10 +47,10 @@ import org.exist.xquery.value.Type; import org.w3c.dom.Element; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.io.ParseException; -import com.vividsolutions.jts.io.WKTReader; -import com.vividsolutions.jts.operation.buffer.BufferOp; +import org.locationtech.jts.geom.Geometry; +import org.locationtech.jts.io.ParseException; +import org.locationtech.jts.io.WKTReader; +import org.locationtech.jts.operation.buffer.BufferOp; /** * @author Pierrick Brihaye diff --git a/extensions/indexes/spatial/src/main/java/org/exist/xquery/modules/spatial/FunGeometricProperties.java b/extensions/indexes/spatial/src/main/java/org/exist/xquery/modules/spatial/FunGeometricProperties.java index 5447d9e2aa3..7c1218a01d1 100644 --- a/extensions/indexes/spatial/src/main/java/org/exist/xquery/modules/spatial/FunGeometricProperties.java +++ b/extensions/indexes/spatial/src/main/java/org/exist/xquery/modules/spatial/FunGeometricProperties.java @@ -47,9 +47,9 @@ import org.exist.xquery.value.Type; import org.w3c.dom.Element; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.io.WKBWriter; -import com.vividsolutions.jts.io.WKTWriter; +import org.locationtech.jts.geom.Geometry; +import org.locationtech.jts.io.WKBWriter; +import org.locationtech.jts.io.WKTWriter; /** * @author Pierrick Brihaye diff --git a/extensions/indexes/spatial/src/main/java/org/exist/xquery/modules/spatial/FunSpatialSearch.java b/extensions/indexes/spatial/src/main/java/org/exist/xquery/modules/spatial/FunSpatialSearch.java index fa52cd2f473..24c6172acea 100644 --- a/extensions/indexes/spatial/src/main/java/org/exist/xquery/modules/spatial/FunSpatialSearch.java +++ b/extensions/indexes/spatial/src/main/java/org/exist/xquery/modules/spatial/FunSpatialSearch.java @@ -44,7 +44,7 @@ import org.exist.xquery.value.Type; import org.w3c.dom.Element; -import com.vividsolutions.jts.geom.Geometry; +import org.locationtech.jts.geom.Geometry; /** * @author Pierrick Brihaye diff --git a/extensions/indexes/spatial/src/test/java/org/exist/indexing/spatial/GMLIndexTest.java b/extensions/indexes/spatial/src/test/java/org/exist/indexing/spatial/GMLIndexTest.java index 1fa33f2821a..cd590b64528 100644 --- a/extensions/indexes/spatial/src/test/java/org/exist/indexing/spatial/GMLIndexTest.java +++ b/extensions/indexes/spatial/src/test/java/org/exist/indexing/spatial/GMLIndexTest.java @@ -67,7 +67,7 @@ import org.xml.sax.*; import org.xml.sax.helpers.XMLFilterImpl; -import com.vividsolutions.jts.geom.Geometry; +import org.locationtech.jts.geom.Geometry; import static org.junit.Assert.*;