This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/sis.git
commit 7bc26353fd3b1582562d381b7eb15cd094c10a41 Merge: 53bd65bc94 1f1a9766c0 Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Sun Oct 6 18:32:21 2024 +0200 Merge branch 'geoapi-3.1'. endorsed/build.gradle.kts | 1 + .../apache/sis/metadata/sql/MetadataSource.java | 3 + .../apache/sis/metadata/sql/privy/Initializer.java | 2 +- .../sis/metadata/sql/privy/ScriptRunner.java | 20 ++---- .../org/apache/sis/util/iso/AbstractFactory.java | 16 +++-- .../sis/referencing/MultiRegisterOperations.java | 12 ++-- .../factory/ConcurrentAuthorityFactory.java | 30 ++------ .../factory/GeodeticAuthorityFactory.java | 16 +++-- .../factory/IdentifiedObjectFinder.java | 2 + .../referencing/factory/IdentifiedObjectSet.java | 7 +- .../factory/MultiAuthoritiesFactory.java | 42 +++++++---- .../referencing/factory/sql/EPSGDataAccess.java | 2 +- .../sis/referencing/factory/sql/EPSGFactory.java | 31 ++++---- .../sis/referencing/factory/sql/EPSGInstaller.java | 19 ++--- .../factory/sql/InstallationScriptProvider.java | 83 +++++++++++++--------- .../sis/referencing/factory/sql/SQLTranslator.java | 15 +++- .../apache/sis/referencing/internal/Resources.java | 6 ++ .../sis/referencing/internal/Resources.properties | 1 + .../referencing/internal/Resources_fr.properties | 1 + .../referencing/internal/ServicesForMetadata.java | 9 ++- .../operation/CoordinateOperationRegistry.java | 13 +++- .../operation/transform/MathTransformBuilder.java | 4 +- .../org/apache/sis/io/wkt/WKTDictionaryTest.java | 41 ++++++----- .../sis/referencing/AuthorityFactoriesTest.java | 15 ++-- .../sis/referencing/EPSGFactoryFallbackTest.java | 3 + .../referencing/factory/AuthorityFactoryMock.java | 10 ++- .../factory/CommonAuthorityFactoryTest.java | 15 +++- .../factory/MultiAuthoritiesFactoryTest.java | 37 ++++++---- .../sis/referencing/factory/TestFactorySource.java | 7 +- .../referencing/factory/sql/EPSGFactoryTest.java | 12 ++-- .../referencing/factory/sql/EPSGInstallerTest.java | 5 +- .../main/org/apache/sis/util/resources/Errors.java | 7 +- .../apache/sis/util/resources/Errors.properties | 1 - .../apache/sis/util/resources/Errors_fr.properties | 1 - .../org/apache/sis/util/resources/Messages.java | 6 ++ .../apache/sis/util/resources/Messages.properties | 1 + .../sis/util/resources/Messages_fr.properties | 1 + incubator/build.gradle.kts | 1 + .../sis/resources/embedded/EmbeddedResources.java | 3 +- 39 files changed, 312 insertions(+), 189 deletions(-) diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/MultiRegisterOperations.java index 78f9ba64b6,ca5b60b103..59974c214f --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/MultiRegisterOperations.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/MultiRegisterOperations.java @@@ -327,8 -368,10 +330,9 @@@ public class MultiRegisterOperations ex * @return factory of the specified type. * @throws NullPointerException if the specified type is null. * @throws IllegalArgumentException if the specified type is not one of the above-cited values. + * @throws FactoryException if an error occurred while searching or preparing the requested factory. */ - public <T extends Factory> Optional<T> getFactory(final Class<? extends T> type) { - @Override + public <T extends Factory> Optional<T> getFactory(final Class<? extends T> type) throws FactoryException { final Factory factory; final Boolean b = FACTORY_TYPES.get(type); if (b != null) { diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/ServicesForMetadata.java index 2cacfe3989,593283717c..0938b0c1f5 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/ServicesForMetadata.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/ServicesForMetadata.java @@@ -69,21 -69,12 +69,24 @@@ import org.apache.sis.util.privy.Consta import org.apache.sis.util.resources.Vocabulary; import org.apache.sis.util.logging.Logging; -// Specific to the geoapi-3.1 and geoapi-4.0 branches: -import org.opengis.metadata.Identifier; +// Specific to the main branch: +import java.util.Map; +import org.opengis.util.TypeName; +import org.opengis.referencing.ReferenceIdentifier; +import org.opengis.referencing.crs.CRSFactory; +import org.opengis.referencing.cs.CSFactory; +import org.opengis.referencing.cs.CoordinateSystemAxis; +import org.opengis.referencing.datum.Datum; +import org.opengis.referencing.datum.DatumFactory; +import org.apache.sis.referencing.cs.DefaultParametricCS; +import org.apache.sis.referencing.datum.DefaultParametricDatum; +import org.apache.sis.referencing.factory.GeodeticObjectFactory; +import org.apache.sis.referencing.factory.InvalidGeodeticParameterException; +import org.apache.sis.metadata.iso.citation.DefaultCitation; + // Specific to the geoapi-3.1 and master branches: + import org.apache.sis.util.collection.BackingStoreException; + /** * Implements the referencing services needed by the {@code org.apache.sis.metadata} module. diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/MathTransformBuilder.java index 6a08c4bbbe,3dede45bfe..a88b76e8fb --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/MathTransformBuilder.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/MathTransformBuilder.java @@@ -21,16 -21,10 +21,16 @@@ import java.util.Optional import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.MathTransformFactory; import org.opengis.referencing.operation.OperationMethod; - import org.apache.sis.metadata.iso.citation.Citations; import org.apache.sis.referencing.IdentifiedObjects; import org.apache.sis.util.privy.Strings; + import org.apache.sis.util.Classes; +// Specific to the main branch: +import org.opengis.util.FactoryException; +import org.opengis.referencing.datum.Ellipsoid; +import org.opengis.referencing.cs.CoordinateSystem; +import org.opengis.parameter.ParameterValueGroup; + /** * Builder of a parameterized math transform using a method identified by a name or code. diff --cc endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/factory/AuthorityFactoryMock.java index f1762481ef,d913f062bc..0720e17f41 --- a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/factory/AuthorityFactoryMock.java +++ b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/factory/AuthorityFactoryMock.java @@@ -125,9 -126,11 +126,10 @@@ public final class AuthorityFactoryMoc * Returns the geodetic object for the given code. * * @throws NoSuchAuthorityCodeException if the given code is unknown. + * @throws FactoryException if the creation failed for another reason. */ @Override - public IdentifiedObject createObject(final String code) throws NoSuchAuthorityCodeException { - @SuppressWarnings("removal") + public IdentifiedObject createObject(final String code) throws FactoryException { assertFalse(isClosed()); final int n; try {