From d8cb7adcfa62de6798396ede4d64d05230ca2098 Mon Sep 17 00:00:00 2001 From: christophe mangeat Date: Wed, 6 Nov 2024 13:08:22 +0100 Subject: [PATCH] up to gt 30. (ant -f remove-opengis.xml -Dproject.dir=/home/.../sources/war-overlay/iso19139.che) --- .../geonet/kernel/extent/ExtentFormat.java | 8 +++--- .../geonet/kernel/extent/ExtentHelper.java | 26 +++++++++---------- .../geonet/kernel/extent/ExtentManager.java | 8 +++--- .../fao/geonet/kernel/extent/FeatureType.java | 22 ++++++++-------- .../org/fao/geonet/kernel/extent/Source.java | 2 +- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/ExtentFormat.java b/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/ExtentFormat.java index 0ef62e88636..77c59ac9c8a 100644 --- a/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/ExtentFormat.java +++ b/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/ExtentFormat.java @@ -15,10 +15,10 @@ import org.locationtech.jts.geom.*; import org.locationtech.jts.geom.impl.CoordinateArraySequence; import org.locationtech.jts.io.WKTWriter; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.geometry.BoundingBox; -import org.opengis.referencing.crs.CoordinateReferenceSystem; -import org.opengis.referencing.operation.MathTransform; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.geometry.BoundingBox; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; +import org.geotools.api.referencing.operation.MathTransform; import java.io.ByteArrayOutputStream; import java.io.PrintStream; diff --git a/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/ExtentHelper.java b/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/ExtentHelper.java index 2245c0cc68f..0721017a392 100644 --- a/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/ExtentHelper.java +++ b/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/ExtentHelper.java @@ -6,8 +6,8 @@ import org.fao.geonet.constants.Geonet; import org.fao.geonet.domain.Pair; import org.fao.geonet.utils.Xml; -import org.geotools.data.FeatureStore; -import org.geotools.data.Query; +import org.geotools.api.data.FeatureStore; +import org.geotools.api.data.Query; import org.geotools.factory.CommonFactoryFinder; import org.geotools.feature.FeatureIterator; import org.geotools.filter.SortByImpl; @@ -19,16 +19,16 @@ import org.jdom.Element; import org.jdom.Text; import org.locationtech.jts.geom.*; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; -import org.opengis.filter.FilterFactory2; -import org.opengis.filter.sort.SortBy; -import org.opengis.filter.sort.SortOrder; -import org.opengis.referencing.FactoryException; -import org.opengis.referencing.NoSuchAuthorityCodeException; -import org.opengis.referencing.crs.CoordinateReferenceSystem; -import org.opengis.referencing.operation.MathTransform; -import org.opengis.referencing.operation.TransformException; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; +import org.geotools.api.filter.FilterFactory; +import org.geotools.api.filter.sort.SortBy; +import org.geotools.api.filter.sort.SortOrder; +import org.geotools.api.referencing.FactoryException; +import org.geotools.api.referencing.NoSuchAuthorityCodeException; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; +import org.geotools.api.referencing.operation.MathTransform; +import org.geotools.api.referencing.operation.TransformException; import java.io.IOException; import java.io.StringReader; @@ -148,7 +148,7 @@ public static String findNextId(FeatureStore s throws IOException { final Query query = featureType.createQuery(new String[] { featureType.idColumn }); - final FilterFactory2 filterFactory = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints()); + final FilterFactory filterFactory = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints()); final SortBy[] sortBy = { new SortByImpl(filterFactory.property(featureType.idColumn), SortOrder.ASCENDING) }; query.setSortBy(sortBy); final FeatureIterator features = store.getFeatures(query).features(); diff --git a/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/ExtentManager.java b/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/ExtentManager.java index d8c13af358e..dbc8a08b686 100644 --- a/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/ExtentManager.java +++ b/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/ExtentManager.java @@ -1,15 +1,15 @@ package org.fao.geonet.kernel.extent; import org.fao.geonet.utils.Log; -import org.geotools.data.DataStore; -import org.geotools.data.FeatureStore; +import org.geotools.api.data.DataStore; +import org.geotools.api.data.FeatureStore; import org.geotools.feature.DefaultFeatureCollection; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.util.logging.Logging; import org.jdom.Namespace; import org.locationtech.jts.geom.Geometry; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; import org.springframework.beans.factory.annotation.Autowired; import java.io.IOException; diff --git a/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/FeatureType.java b/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/FeatureType.java index aa87d1a4e4c..1fb8ef8dd75 100644 --- a/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/FeatureType.java +++ b/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/FeatureType.java @@ -1,19 +1,19 @@ package org.fao.geonet.kernel.extent; -import org.geotools.data.DataStore; -import org.geotools.data.FeatureSource; -import org.geotools.data.Query; +import org.geotools.api.data.DataStore; +import org.geotools.api.data.FeatureSource; +import org.geotools.api.data.Query; import org.geotools.factory.CommonFactoryFinder; import org.geotools.referencing.CRS; import org.geotools.referencing.crs.DefaultGeographicCRS; import org.geotools.util.factory.GeoTools; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; -import org.opengis.filter.Filter; -import org.opengis.filter.FilterFactory2; -import org.opengis.filter.expression.Literal; -import org.opengis.filter.expression.PropertyName; -import org.opengis.referencing.crs.CoordinateReferenceSystem; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; +import org.geotools.api.filter.Filter; +import org.geotools.api.filter.FilterFactory; +import org.geotools.api.filter.expression.Literal; +import org.geotools.api.filter.expression.PropertyName; +import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import javax.annotation.PostConstruct; import java.io.IOException; @@ -108,7 +108,7 @@ public Query createQuery(String[] properties) { } public Filter createFilter(String id) { - final FilterFactory2 factory = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints()); + final FilterFactory factory = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints()); final Literal literal = factory.literal(id); final PropertyName property = factory.property(idColumn); final Filter filter = factory.equals(property, literal); diff --git a/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/Source.java b/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/Source.java index a2a722303b5..f3679cb7c8c 100644 --- a/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/Source.java +++ b/iso19139.che/src/main/java/org/fao/geonet/kernel/extent/Source.java @@ -23,7 +23,7 @@ package org.fao.geonet.kernel.extent; -import org.geotools.data.DataStore; +import org.geotools.api.data.DataStore; import org.springframework.beans.factory.annotation.Autowired; import javax.annotation.PostConstruct;