You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2023/09/26 12:21:01 UTC
[sis] branch main updated (2d716eab6d -> 6eac04b166)
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/sis.git
from 2d716eab6d Remove references to the `org.apache.sis.cql` incubating module. This module is present on other branches but not on main because for avoiding the need to manage geoapi-pending dependencies.
add dd3ddafcb2 Use deterministic dimension order for user-specified units. This commit fixes a random test failure where the order depended on which tests were executed first, because the dimension order of the first cached unit was the order used for other compatible units.
add c92fa5ad66 Add JUnit 5 in test dependencies for progressive migration. Opportunistically upgrade `ArgumentChecks` to JUnit 5, after its change for testing negative zeros.
add abafcba8a2 Skip the Ivy task if the "dependencies" directory is already present.
add 350b496160 Partial upgrade to ISO 19111:2019: replace some (not yet all) usages of deprecated `getScope()` and `getDomainOfValidity()` methods by `getDomains()`.
add 193b493363 Improve `DefaultObjectDomain` with the use of `NilObject` for telling when the value is missing.
add ac061386c5 Minor formatting of table HTML for consistency with same change applied elsewhere. It makes the code a little bit easier to read by reducing the amount of scrolling. Contains also opportunistic javadoc typo fixes.
add 1d735321d1 Rename `DefaultEllipsoid.getRadius(double)` as `getGeocentricRadius(double)`.
add 7c107c57ee Move the check for perpendicular axes in the parent class. This is in anticipation for the addition of experimental coordinate systems such as `MinkowskiCS` in other branches.
add 1448606ef8 Spelling and documentation fixes.
add 200ed9511a Deprecate for removal `NullArgumentException`.
add 6f65c2bacd Remove the boolean return value in WritableFeatureSet.removeIf(Predicate)
add b03b235825 Add a `DataStores.openWritable(…)` method.
add c2bcdb964f Merge branch 'geoapi-4.0' into geoapi-3.1. Contains the beginning of a migration to JUnit 5, the beginning of an ISO 19111 upgrade, documentation fixes and some deprecations in preparation for SIS 1.4 release proposal.
new 6eac04b166 Merge branch 'geoapi-3.1'.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
endorsed/build.gradle.kts | 3 +-
.../org.apache.sis.console/main/module-info.java | 2 +
.../main/org/apache/sis/console/CommandRunner.java | 2 +-
.../org/apache/sis/console/TransformCommand.java | 19 +-
.../sis/coverage/grid/GridCoverageBuilder.java | 2 +-
.../apache/sis/coverage/grid/ImageRenderer.java | 7 +-
.../apache/sis/feature/builder/TypeBuilder.java | 4 +-
.../apache/sis/geometry/wrapper/Geometries.java | 2 +-
.../apache/sis/image/BandedSampleConverter.java | 12 +-
.../main/org/apache/sis/image/ComputedImage.java | 2 +-
.../test/org/apache/sis/filter/PeriodLiteral.java | 2 +-
.../org.apache.sis.metadata/main/module-info.java | 2 +-
.../metadata/internal/ImplementationHelper.java | 25 +-
.../iso/DefaultApplicationSchemaInformation.java | 2 +-
.../apache/sis/metadata/iso/DefaultIdentifier.java | 2 +-
.../apache/sis/metadata/iso/extent/Extents.java | 38 ++-
.../metadata/simple/SimpleIdentifiedObject.java | 6 +
.../org/apache/sis/xml/TransformingWriter.java | 2 +-
.../main/org/apache/sis/xml/XML.java | 6 +-
.../sis/metadata/iso/citation/CitationsTest.java | 2 +-
.../metadata/iso/citation/DefaultCitationTest.java | 2 +-
.../org/apache/sis/metadata/xml/TestUsingFile.java | 2 +-
.../sis/test/xml/AnnotationConsistencyCheck.java | 2 +-
.../apache/sis/util/iso/DefaultLocalNameTest.java | 2 +-
.../main/module-info.java | 3 +-
.../main/org/apache/sis/openoffice/CalcAddins.java | 2 +-
.../sis/openoffice/ReferencingFunctions.java | 40 +--
.../org/apache/sis/portrayal/CanvasFollower.java | 3 +-
.../main/org/apache/sis/style/se1/Graphic.java | 2 +-
.../org/apache/sis/style/se1/PointPlacement.java | 2 +-
.../gazetteer/GeohashReferenceSystem.java | 8 +-
.../gazetteer/MilitaryGridReferenceSystem.java | 6 +-
.../main/module-info.java | 4 +
.../main/org/apache/sis/geometry/Envelopes.java | 2 +-
.../main/org/apache/sis/geometry/Shapes2D.java | 2 +-
.../main/org/apache/sis/io/wkt/Formatter.java | 66 +++--
.../apache/sis/io/wkt/GeodeticObjectParser.java | 2 +-
.../sis/referencing/AbstractIdentifiedObject.java | 242 ++++++++++++++----
.../sis/referencing/AbstractReferenceSystem.java | 172 ++-----------
.../main/org/apache/sis/referencing/CommonCRS.java | 2 +-
.../sis/referencing/DefaultObjectDomain.java | 269 +++++++++++++++++++++
.../apache/sis/referencing/IdentifiedObjects.java | 10 +-
.../org/apache/sis/referencing/NameIterator.java | 32 ++-
.../org/apache/sis/referencing/Properties.java | 87 +++----
.../apache/sis/referencing/crs/AbstractCRS.java | 31 +--
.../sis/referencing/crs/DefaultCompoundCRS.java | 26 +-
.../sis/referencing/crs/DefaultDerivedCRS.java | 41 +---
.../sis/referencing/crs/DefaultEngineeringCRS.java | 26 +-
.../sis/referencing/crs/DefaultGeocentricCRS.java | 26 +-
.../sis/referencing/crs/DefaultGeographicCRS.java | 26 +-
.../sis/referencing/crs/DefaultImageCRS.java | 26 +-
.../sis/referencing/crs/DefaultParametricCRS.java | 26 +-
.../sis/referencing/crs/DefaultProjectedCRS.java | 26 +-
.../sis/referencing/crs/DefaultTemporalCRS.java | 26 +-
.../sis/referencing/crs/DefaultVerticalCRS.java | 26 +-
.../org/apache/sis/referencing/cs/AbstractCS.java | 86 ++++---
.../apache/sis/referencing/cs/AxesConvention.java | 12 +-
.../sis/referencing/cs/CoordinateSystems.java | 3 +-
.../apache/sis/referencing/cs/DefaultAffineCS.java | 12 +-
.../sis/referencing/cs/DefaultCartesianCS.java | 38 +--
.../sis/referencing/cs/DefaultCompoundCS.java | 12 +-
.../cs/DefaultCoordinateSystemAxis.java | 24 +-
.../sis/referencing/cs/DefaultCylindricalCS.java | 12 +-
.../sis/referencing/cs/DefaultEllipsoidalCS.java | 12 +-
.../apache/sis/referencing/cs/DefaultLinearCS.java | 12 +-
.../sis/referencing/cs/DefaultParametricCS.java | 12 +-
.../apache/sis/referencing/cs/DefaultPolarCS.java | 12 +-
.../sis/referencing/cs/DefaultSphericalCS.java | 12 +-
.../apache/sis/referencing/cs/DefaultTimeCS.java | 12 +-
.../sis/referencing/cs/DefaultUserDefinedCS.java | 12 +-
.../sis/referencing/cs/DefaultVerticalCS.java | 12 +-
.../sis/referencing/datum/AbstractDatum.java | 119 ++-------
.../sis/referencing/datum/DefaultEllipsoid.java | 31 ++-
.../referencing/datum/DefaultEngineeringDatum.java | 32 +--
.../referencing/datum/DefaultGeodeticDatum.java | 40 +--
.../sis/referencing/datum/DefaultImageDatum.java | 29 +--
.../referencing/datum/DefaultParametricDatum.java | 32 +--
.../referencing/datum/DefaultPrimeMeridian.java | 12 +-
.../referencing/datum/DefaultTemporalDatum.java | 32 +--
.../referencing/datum/DefaultVerticalDatum.java | 34 +--
.../referencing/factory/GeodeticObjectFactory.java | 54 ++---
.../apache/sis/referencing/internal/Legacy.java | 67 ++++-
.../operation/AbstractCoordinateOperation.java | 116 ++-------
.../operation/CoordinateOperationRegistry.java | 2 +-
.../operation/DefaultConcatenatedOperation.java | 32 +--
.../referencing/operation/DefaultConversion.java | 9 +-
.../DefaultCoordinateOperationFactory.java | 36 +--
.../operation/DefaultOperationMethod.java | 18 +-
.../operation/DefaultPassThroughOperation.java | 6 +-
.../operation/DefaultTransformation.java | 12 +-
.../operation/builder/LocalizationGridBuilder.java | 4 +-
.../sis/referencing/operation/provider/NTv2.java | 6 +-
.../org/apache/sis/referencing/util/Formulas.java | 6 +-
.../apache/sis/referencing/util/WKTKeywords.java | 3 +-
.../apache/sis/referencing/util/j2d/Bezier.java | 4 +-
.../test/org/apache/sis/io/wkt/WKTFormatTest.java | 2 +-
.../referencing/datum/DefaultEllipsoidTest.java | 12 +-
.../operation/CoordinateOperationFinderTest.java | 2 +-
.../operation/provider/MapProjectionTest.java | 2 +-
.../apache/sis/referencing/util/FormulasTest.java | 12 +-
.../apache/sis/storage/landsat/LandsatStore.java | 2 +-
.../org/apache/sis/storage/geotiff/GeoTIFF.java | 2 +-
.../apache/sis/storage/geotiff/GeoTiffStore.java | 2 +-
.../apache/sis/storage/geotiff/NativeMetadata.java | 2 +-
.../org/apache/sis/storage/geotiff/Reader.java | 4 +-
.../sis/storage/geotiff/internal/Compression.java | 2 +-
.../sis/storage/geotiff/SelfConsistencyTest.java | 2 +-
.../org/apache/sis/storage/netcdf/NetcdfStore.java | 2 +-
.../org/apache/sis/storage/netcdf/base/Grid.java | 3 +-
.../main/org/apache/sis/storage/sql/SQLStore.java | 2 +-
.../sis/storage/sql/postgis/ObjectGetter.java | 2 +-
.../org/apache/sis/storage/gpx/WritableStore.java | 7 +-
.../sis/storage/xml/stream/RewriteOnUpdate.java | 22 +-
.../org/apache/sis/storage/gpx/UpdaterTest.java | 4 +-
.../apache/sis/io/stream/ChannelDataOutput.java | 2 +-
.../org/apache/sis/io/stream/ChannelFactory.java | 22 +-
.../main/org/apache/sis/io/stream/IOUtilities.java | 18 ++
.../apache/sis/io/stream/InternalOptionKey.java | 12 +-
.../sis/storage/DataStoreContentException.java | 2 +-
.../org/apache/sis/storage/DataStoreProvider.java | 15 +-
.../org/apache/sis/storage/DataStoreRegistry.java | 152 ++++++++----
.../main/org/apache/sis/storage/DataStores.java | 49 +++-
.../org/apache/sis/storage/ProbeProviderPair.java | 37 ++-
.../main/org/apache/sis/storage/ProbeResult.java | 2 +-
.../org/apache/sis/storage/StorageConnector.java | 96 +++++++-
.../org/apache/sis/storage/WritableFeatureSet.java | 14 +-
.../org/apache/sis/storage/base/Capability.java | 2 +-
.../main/org/apache/sis/storage/base/CodeType.java | 4 +-
.../apache/sis/storage/base/MetadataBuilder.java | 2 +-
.../apache/sis/storage/base/StoreUtilities.java | 10 +-
.../apache/sis/storage/base/TiledGridResource.java | 2 +-
.../sis/storage/csv/MovingFeatureBuilder.java | 4 +-
.../apache/sis/storage/image/DataStoreFilter.java | 83 +++++++
.../org/apache/sis/storage/image/FormatFilter.java | 14 +-
.../org/apache/sis/storage/image/FormatFinder.java | 34 ++-
.../sis/storage/image/WorldFileResource.java | 2 +-
.../sis/storage/image/WorldFileStoreProvider.java | 4 +-
.../storage/image/WritableSingleImageStore.java | 4 +-
.../apache/sis/storage/image/WritableStore.java | 6 +-
.../storage/internal/WritableResourceSupport.java | 2 +-
.../test/module-info.java | 1 +
.../main/org/apache/sis/measure/UnitDimension.java | 73 +++++-
.../main/org/apache/sis/measure/UnitRegistry.java | 55 ++++-
.../main/org/apache/sis/measure/Units.java | 2 +-
.../main/org/apache/sis/setup/About.java | 2 +-
.../main/org/apache/sis/util/ArgumentChecks.java | 6 +-
.../main/org/apache/sis/util/ArraysExt.java | 172 +++++--------
.../main/org/apache/sis/util/CharSequences.java | 4 +-
.../org/apache/sis/util/NullArgumentException.java | 8 +
.../main/org/apache/sis/util/StringBuilders.java | 10 +-
.../main/org/apache/sis/util/Version.java | 2 +-
.../apache/sis/util/collection/TreeNodeList.java | 2 +-
.../org/apache/sis/util/collection/WeakEntry.java | 14 +-
.../apache/sis/util/collection/WeakHashSet.java | 5 +-
.../sis/util/collection/WeakValueHashMap.java | 153 +++++++-----
.../resources/ResourceInternationalString.java | 4 +-
.../org/apache/sis/util/resources/Vocabulary.java | 30 ++-
.../sis/util/resources/Vocabulary.properties | 2 +-
.../sis/util/resources/Vocabulary_fr.properties | 2 +-
.../org/apache/sis/measure/UnitFormatTest.java | 4 +-
.../test/org/apache/sis/test/TestRunner.java | 2 +-
.../org/apache/sis/util/ArgumentChecksTest.java | 49 ++--
incubator/build.gradle.kts | 3 +-
.../test/module-info.java | 2 +
netbeans-project/build.xml | 7 +-
netbeans-project/ivy.xml | 1 +
netbeans-project/nbproject/project.properties | 35 +--
optional/build.gradle.kts | 3 +-
.../sis/gui/coverage/StyledRenderingData.java | 2 +-
.../org/apache/sis/gui/dataset/WindowHandler.java | 2 +-
.../apache/sis/gui/internal/DataStoreOpener.java | 2 +-
.../apache/sis/gui/internal/io/FileAccessView.java | 12 +-
.../org/apache/sis/gui/referencing/CRSChooser.java | 2 +-
.../test/module-info.java | 2 +
settings.gradle.kts | 1 +
175 files changed, 2162 insertions(+), 1639 deletions(-)
create mode 100644 endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/DefaultObjectDomain.java
create mode 100644 endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/image/DataStoreFilter.java
[sis] 01/01: Merge branch 'geoapi-3.1'.
Posted by de...@apache.org.
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 6eac04b16651536f7279fb7ff112ada471749106
Merge: 2d716eab6d c2bcdb964f
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Tue Sep 26 14:19:19 2023 +0200
Merge branch 'geoapi-3.1'.
endorsed/build.gradle.kts | 3 +-
.../org.apache.sis.console/main/module-info.java | 2 +
.../main/org/apache/sis/console/CommandRunner.java | 2 +-
.../org/apache/sis/console/TransformCommand.java | 19 +-
.../sis/coverage/grid/GridCoverageBuilder.java | 2 +-
.../apache/sis/coverage/grid/ImageRenderer.java | 7 +-
.../apache/sis/feature/builder/TypeBuilder.java | 4 +-
.../apache/sis/geometry/wrapper/Geometries.java | 2 +-
.../apache/sis/image/BandedSampleConverter.java | 12 +-
.../main/org/apache/sis/image/ComputedImage.java | 2 +-
.../test/org/apache/sis/filter/PeriodLiteral.java | 2 +-
.../org.apache.sis.metadata/main/module-info.java | 2 +-
.../metadata/internal/ImplementationHelper.java | 25 +-
.../iso/DefaultApplicationSchemaInformation.java | 2 +-
.../apache/sis/metadata/iso/DefaultIdentifier.java | 2 +-
.../apache/sis/metadata/iso/extent/Extents.java | 38 ++-
.../metadata/simple/SimpleIdentifiedObject.java | 6 +
.../org/apache/sis/xml/TransformingWriter.java | 2 +-
.../main/org/apache/sis/xml/XML.java | 6 +-
.../sis/metadata/iso/citation/CitationsTest.java | 2 +-
.../metadata/iso/citation/DefaultCitationTest.java | 2 +-
.../org/apache/sis/metadata/xml/TestUsingFile.java | 2 +-
.../sis/test/xml/AnnotationConsistencyCheck.java | 2 +-
.../apache/sis/util/iso/DefaultLocalNameTest.java | 2 +-
.../main/module-info.java | 3 +-
.../main/org/apache/sis/openoffice/CalcAddins.java | 2 +-
.../sis/openoffice/ReferencingFunctions.java | 40 +--
.../org/apache/sis/portrayal/CanvasFollower.java | 3 +-
.../main/org/apache/sis/style/se1/Graphic.java | 2 +-
.../org/apache/sis/style/se1/PointPlacement.java | 2 +-
.../gazetteer/GeohashReferenceSystem.java | 8 +-
.../gazetteer/MilitaryGridReferenceSystem.java | 6 +-
.../main/module-info.java | 4 +
.../main/org/apache/sis/geometry/Envelopes.java | 2 +-
.../main/org/apache/sis/geometry/Shapes2D.java | 2 +-
.../main/org/apache/sis/io/wkt/Formatter.java | 66 +++--
.../apache/sis/io/wkt/GeodeticObjectParser.java | 2 +-
.../sis/referencing/AbstractIdentifiedObject.java | 242 ++++++++++++++----
.../sis/referencing/AbstractReferenceSystem.java | 172 ++-----------
.../main/org/apache/sis/referencing/CommonCRS.java | 2 +-
.../sis/referencing/DefaultObjectDomain.java | 269 +++++++++++++++++++++
.../apache/sis/referencing/IdentifiedObjects.java | 10 +-
.../org/apache/sis/referencing/NameIterator.java | 32 ++-
.../org/apache/sis/referencing/Properties.java | 87 +++----
.../apache/sis/referencing/crs/AbstractCRS.java | 31 +--
.../sis/referencing/crs/DefaultCompoundCRS.java | 26 +-
.../sis/referencing/crs/DefaultDerivedCRS.java | 41 +---
.../sis/referencing/crs/DefaultEngineeringCRS.java | 26 +-
.../sis/referencing/crs/DefaultGeocentricCRS.java | 26 +-
.../sis/referencing/crs/DefaultGeographicCRS.java | 26 +-
.../sis/referencing/crs/DefaultImageCRS.java | 26 +-
.../sis/referencing/crs/DefaultParametricCRS.java | 26 +-
.../sis/referencing/crs/DefaultProjectedCRS.java | 26 +-
.../sis/referencing/crs/DefaultTemporalCRS.java | 26 +-
.../sis/referencing/crs/DefaultVerticalCRS.java | 26 +-
.../org/apache/sis/referencing/cs/AbstractCS.java | 86 ++++---
.../apache/sis/referencing/cs/AxesConvention.java | 12 +-
.../sis/referencing/cs/CoordinateSystems.java | 3 +-
.../apache/sis/referencing/cs/DefaultAffineCS.java | 12 +-
.../sis/referencing/cs/DefaultCartesianCS.java | 38 +--
.../sis/referencing/cs/DefaultCompoundCS.java | 12 +-
.../cs/DefaultCoordinateSystemAxis.java | 24 +-
.../sis/referencing/cs/DefaultCylindricalCS.java | 12 +-
.../sis/referencing/cs/DefaultEllipsoidalCS.java | 12 +-
.../apache/sis/referencing/cs/DefaultLinearCS.java | 12 +-
.../sis/referencing/cs/DefaultParametricCS.java | 12 +-
.../apache/sis/referencing/cs/DefaultPolarCS.java | 12 +-
.../sis/referencing/cs/DefaultSphericalCS.java | 12 +-
.../apache/sis/referencing/cs/DefaultTimeCS.java | 12 +-
.../sis/referencing/cs/DefaultUserDefinedCS.java | 12 +-
.../sis/referencing/cs/DefaultVerticalCS.java | 12 +-
.../sis/referencing/datum/AbstractDatum.java | 119 ++-------
.../sis/referencing/datum/DefaultEllipsoid.java | 31 ++-
.../referencing/datum/DefaultEngineeringDatum.java | 32 +--
.../referencing/datum/DefaultGeodeticDatum.java | 40 +--
.../sis/referencing/datum/DefaultImageDatum.java | 29 +--
.../referencing/datum/DefaultParametricDatum.java | 32 +--
.../referencing/datum/DefaultPrimeMeridian.java | 12 +-
.../referencing/datum/DefaultTemporalDatum.java | 32 +--
.../referencing/datum/DefaultVerticalDatum.java | 34 +--
.../referencing/factory/GeodeticObjectFactory.java | 54 ++---
.../apache/sis/referencing/internal/Legacy.java | 67 ++++-
.../operation/AbstractCoordinateOperation.java | 116 ++-------
.../operation/CoordinateOperationRegistry.java | 2 +-
.../operation/DefaultConcatenatedOperation.java | 32 +--
.../referencing/operation/DefaultConversion.java | 9 +-
.../DefaultCoordinateOperationFactory.java | 36 +--
.../operation/DefaultOperationMethod.java | 18 +-
.../operation/DefaultPassThroughOperation.java | 6 +-
.../operation/DefaultTransformation.java | 12 +-
.../operation/builder/LocalizationGridBuilder.java | 4 +-
.../sis/referencing/operation/provider/NTv2.java | 6 +-
.../org/apache/sis/referencing/util/Formulas.java | 6 +-
.../apache/sis/referencing/util/WKTKeywords.java | 3 +-
.../apache/sis/referencing/util/j2d/Bezier.java | 4 +-
.../test/org/apache/sis/io/wkt/WKTFormatTest.java | 2 +-
.../referencing/datum/DefaultEllipsoidTest.java | 12 +-
.../operation/CoordinateOperationFinderTest.java | 2 +-
.../operation/provider/MapProjectionTest.java | 2 +-
.../apache/sis/referencing/util/FormulasTest.java | 12 +-
.../apache/sis/storage/landsat/LandsatStore.java | 2 +-
.../org/apache/sis/storage/geotiff/GeoTIFF.java | 2 +-
.../apache/sis/storage/geotiff/GeoTiffStore.java | 2 +-
.../apache/sis/storage/geotiff/NativeMetadata.java | 2 +-
.../org/apache/sis/storage/geotiff/Reader.java | 4 +-
.../sis/storage/geotiff/internal/Compression.java | 2 +-
.../sis/storage/geotiff/SelfConsistencyTest.java | 2 +-
.../org/apache/sis/storage/netcdf/NetcdfStore.java | 2 +-
.../org/apache/sis/storage/netcdf/base/Grid.java | 3 +-
.../main/org/apache/sis/storage/sql/SQLStore.java | 2 +-
.../sis/storage/sql/postgis/ObjectGetter.java | 2 +-
.../org/apache/sis/storage/gpx/WritableStore.java | 7 +-
.../sis/storage/xml/stream/RewriteOnUpdate.java | 22 +-
.../org/apache/sis/storage/gpx/UpdaterTest.java | 4 +-
.../apache/sis/io/stream/ChannelDataOutput.java | 2 +-
.../org/apache/sis/io/stream/ChannelFactory.java | 22 +-
.../main/org/apache/sis/io/stream/IOUtilities.java | 18 ++
.../apache/sis/io/stream/InternalOptionKey.java | 12 +-
.../sis/storage/DataStoreContentException.java | 2 +-
.../org/apache/sis/storage/DataStoreProvider.java | 15 +-
.../org/apache/sis/storage/DataStoreRegistry.java | 152 ++++++++----
.../main/org/apache/sis/storage/DataStores.java | 49 +++-
.../org/apache/sis/storage/ProbeProviderPair.java | 37 ++-
.../main/org/apache/sis/storage/ProbeResult.java | 2 +-
.../org/apache/sis/storage/StorageConnector.java | 96 +++++++-
.../org/apache/sis/storage/WritableFeatureSet.java | 14 +-
.../org/apache/sis/storage/base/Capability.java | 2 +-
.../main/org/apache/sis/storage/base/CodeType.java | 4 +-
.../apache/sis/storage/base/MetadataBuilder.java | 2 +-
.../apache/sis/storage/base/StoreUtilities.java | 10 +-
.../apache/sis/storage/base/TiledGridResource.java | 2 +-
.../sis/storage/csv/MovingFeatureBuilder.java | 4 +-
.../apache/sis/storage/image/DataStoreFilter.java | 83 +++++++
.../org/apache/sis/storage/image/FormatFilter.java | 14 +-
.../org/apache/sis/storage/image/FormatFinder.java | 34 ++-
.../sis/storage/image/WorldFileResource.java | 2 +-
.../sis/storage/image/WorldFileStoreProvider.java | 4 +-
.../storage/image/WritableSingleImageStore.java | 4 +-
.../apache/sis/storage/image/WritableStore.java | 6 +-
.../storage/internal/WritableResourceSupport.java | 2 +-
.../test/module-info.java | 1 +
.../main/org/apache/sis/measure/UnitDimension.java | 73 +++++-
.../main/org/apache/sis/measure/UnitRegistry.java | 55 ++++-
.../main/org/apache/sis/measure/Units.java | 2 +-
.../main/org/apache/sis/setup/About.java | 2 +-
.../main/org/apache/sis/util/ArgumentChecks.java | 6 +-
.../main/org/apache/sis/util/ArraysExt.java | 172 +++++--------
.../main/org/apache/sis/util/CharSequences.java | 4 +-
.../org/apache/sis/util/NullArgumentException.java | 8 +
.../main/org/apache/sis/util/StringBuilders.java | 10 +-
.../main/org/apache/sis/util/Version.java | 2 +-
.../apache/sis/util/collection/TreeNodeList.java | 2 +-
.../org/apache/sis/util/collection/WeakEntry.java | 14 +-
.../apache/sis/util/collection/WeakHashSet.java | 5 +-
.../sis/util/collection/WeakValueHashMap.java | 153 +++++++-----
.../resources/ResourceInternationalString.java | 4 +-
.../org/apache/sis/util/resources/Vocabulary.java | 30 ++-
.../sis/util/resources/Vocabulary.properties | 2 +-
.../sis/util/resources/Vocabulary_fr.properties | 2 +-
.../org/apache/sis/measure/UnitFormatTest.java | 4 +-
.../test/org/apache/sis/test/TestRunner.java | 2 +-
.../org/apache/sis/util/ArgumentChecksTest.java | 49 ++--
incubator/build.gradle.kts | 3 +-
.../test/module-info.java | 2 +
netbeans-project/build.xml | 7 +-
netbeans-project/ivy.xml | 1 +
netbeans-project/nbproject/project.properties | 35 +--
optional/build.gradle.kts | 3 +-
.../sis/gui/coverage/StyledRenderingData.java | 2 +-
.../org/apache/sis/gui/dataset/WindowHandler.java | 2 +-
.../apache/sis/gui/internal/DataStoreOpener.java | 2 +-
.../apache/sis/gui/internal/io/FileAccessView.java | 12 +-
.../org/apache/sis/gui/referencing/CRSChooser.java | 2 +-
.../test/module-info.java | 2 +
settings.gradle.kts | 1 +
175 files changed, 2162 insertions(+), 1639 deletions(-)
diff --cc endorsed/src/org.apache.sis.console/main/org/apache/sis/console/TransformCommand.java
index 536a4b1392,122bd10076..1797f1ede6
--- a/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/TransformCommand.java
+++ b/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/TransformCommand.java
@@@ -75,6 -76,9 +76,11 @@@ import org.apache.sis.util.logging.Logg
import static java.util.logging.Logger.getLogger;
-// Specific to the geoapi-3.1 and geoapi-4.0 branches:
-import org.opengis.referencing.ObjectDomain;
++import org.apache.sis.referencing.DefaultObjectDomain;
++
++// Specific to the main branch:
++import org.apache.sis.referencing.internal.Legacy;
+
/**
* The "transform" subcommand.
@@@ -234,7 -238,7 +240,7 @@@ final class TransformCommand extends Fo
printHeader(Vocabulary.Keys.Destination); printNameAndIdentifier(operation.getTargetCRS(), false);
printHeader(Vocabulary.Keys.Operations); printOperations (operation, false);
outHeader.nextLine();
- printDomainOfValidity(operation.getDomainOfValidity());
- printDomainOfValidity(operation.getDomains());
++ printDomainOfValidity(Legacy.getDomains(operation));
printAccuracy(CRS.getLinearAccuracy(operation));
if (options.containsKey(Option.VERBOSE)) {
printDetails();
@@@ -383,9 -387,10 +389,10 @@@
*
* <blockquote>Canada - onshore and offshore</blockquote>
*/
- private void printDomainOfValidity(final Extent domain) throws IOException {
- if (domain != null) {
- final InternationalString description = domain.getDescription();
- private void printDomainOfValidity(final Collection<ObjectDomain> domains) throws IOException {
- for (final ObjectDomain domain : domains) {
++ private void printDomainOfValidity(final Collection<DefaultObjectDomain> domains) throws IOException {
++ for (final DefaultObjectDomain domain : domains) {
+ final Extent extent = domain.getDomainOfValidity();
+ final InternationalString description = extent.getDescription();
if (description != null) {
String text = description.toString(locale);
if (text.length() >= 80) {
diff --cc endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/extent/Extents.java
index 23d83ce080,f1c9cec939..4433eeb1aa
--- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/extent/Extents.java
+++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/extent/Extents.java
@@@ -24,8 -24,8 +24,10 @@@ import java.util.Set
import java.util.LinkedHashSet;
import java.util.Collection;
import java.util.Collections;
++import java.util.stream.Stream;
import java.util.function.Function;
import java.util.function.BiConsumer;
++import java.util.Optional;
import javax.measure.Unit;
import org.opengis.geometry.Envelope;
import org.opengis.geometry.DirectPosition;
@@@ -48,6 -48,6 +50,7 @@@ import org.opengis.referencing.crs.Coor
import org.opengis.referencing.datum.VerticalDatum;
import org.opengis.referencing.datum.VerticalDatumType;
import org.opengis.referencing.operation.TransformException;
++import org.opengis.referencing.operation.CoordinateOperation;
import org.apache.sis.metadata.InvalidMetadataException;
import org.apache.sis.metadata.internal.ReferencingServices;
import org.apache.sis.metadata.iso.ISOMetadata;
@@@ -208,6 -208,46 +211,37 @@@ public final class Extents extends Stat
return m.bounds;
}
+ /**
- * Returns a single geographic bounding box for the given domains of validity.
- * For each domain, the bounding box is fetched with {@link #getGeographicBoundingBox(Extent)}.
- * If more than one geographic domain of validity is found, this method computes their union.
++ * Returns a single geographic bounding box for the given extents.
++ * For each extent, the bounding box is fetched with {@link #getGeographicBoundingBox(Extent)}.
++ * If more than one geographic bound is found, this method computes their union.
+ *
- * <p>This is a convenience method for fetching the domain of validity of {@link Datum},
- * {@link CoordinateReferenceSystem} or {@link CoordinateOperation} objects.</p>
++ * <p>This is a convenience method for fetching the domain of validity of
++ * {@link org.opengis.referencing.datum.Datum},
++ * {@link org.opengis.referencing.crs.CoordinateReferenceSystem} or
++ * {@link org.opengis.referencing.operation.CoordinateOperation} objects.</p>
+ *
- * @param domains the domains of validity for which to get a single geographic bounding box, or {@code null}.
- * @return the union of all geographic bounding boxes found in all domains of validity.
++ * @param extents the extents for which to get a single geographic bounding box.
++ * @return the union of all geographic bounding boxes found in all extents.
+ * @throws InvalidMetadataException if an envelope cannot be transformed to a geographic bounding box.
+ *
- * @see CoordinateReferenceSystem#getDomains()
++ * @see org.apache.sis.referencing.AbstractIdentifiedObject#getDomains()
+ * @see org.apache.sis.referencing.CRS#getDomainOfValidity(CoordinateReferenceSystem)
+ *
+ * @since 1.4
+ */
- public static Optional<GeographicBoundingBox> getGeographicBoundingBox(final Iterable<? extends ObjectDomain> domains) {
- if (domains != null) {
- Extents m = null;
- for (final ObjectDomain domain : domains) {
- final Extent extent = domain.getDomainOfValidity();
- if (extent != null) {
- if (m == null) {
- m = new Extents();
- }
- try {
- m.addHorizontal(extent);
- } catch (TransformException e) {
- throw new InvalidMetadataException(Errors.format(Errors.Keys.CanNotTransformEnvelope), e);
- }
- }
- }
- if (m != null) {
- return Optional.ofNullable(m.bounds);
++ public static Optional<GeographicBoundingBox> getGeographicBoundingBox(final Stream<? extends Extent> extents) {
++ final Extents m = new Extents();
++ extents.forEach((extent) -> {
++ if (extent != null) try {
++ m.addHorizontal(extent);
++ } catch (TransformException e) {
++ throw new InvalidMetadataException(Errors.format(Errors.Keys.CanNotTransformEnvelope), e);
+ }
- }
- return Optional.empty();
++ });
++ return Optional.ofNullable(m.bounds);
+ }
+
/**
* Returns a single geographic bounding box from the specified extent.
* This method tries to find the bounding box in the cheapest way
diff --cc endorsed/src/org.apache.sis.openoffice/main/org/apache/sis/openoffice/ReferencingFunctions.java
index 2acf4f97ee,cc71c320ee..4319abd931
--- a/endorsed/src/org.apache.sis.openoffice/main/org/apache/sis/openoffice/ReferencingFunctions.java
+++ b/endorsed/src/org.apache.sis.openoffice/main/org/apache/sis/openoffice/ReferencingFunctions.java
@@@ -43,6 -43,6 +42,10 @@@ import org.apache.sis.storage.DataStore
import org.apache.sis.storage.DataStoreException;
import org.apache.sis.storage.base.CodeType;
++// Specific to the main branch:
++import org.apache.sis.referencing.DefaultObjectDomain;
++import org.apache.sis.referencing.internal.Legacy;
++
/**
* Implements the {@link XReferencing} methods to make available to Apache OpenOffice.
@@@ -190,7 -190,12 +193,12 @@@ public class ReferencingFunctions exten
final Object value;
try {
final IdentifiedObject object = getIdentifiedObject(codeOrPath, null);
- value = IdentifiedObjects.getProperties(object).get(ReferenceSystem.SCOPE_KEY);
- for (final ObjectDomain domain : object.getDomains()) {
++ for (final DefaultObjectDomain domain : Legacy.getDomains(object)) {
+ InternationalString scope = domain.getScope();
+ if (scope != null) {
+ return scope.toString(getJavaLocale());
+ }
+ }
} catch (Exception exception) {
return getLocalizedMessage(exception);
}
@@@ -206,10 -210,17 +213,17 @@@
*/
@Override
public String getDomainOfValidity(final String codeOrPath) {
- final Object domain;
try {
final IdentifiedObject object = getIdentifiedObject(codeOrPath, null);
- domain = IdentifiedObjects.getProperties(object).get(ReferenceSystem.DOMAIN_OF_VALIDITY_KEY);
- for (final ObjectDomain domain : object.getDomains()) {
++ for (final DefaultObjectDomain domain : Legacy.getDomains(object)) {
+ final Extent extent = domain.getDomainOfValidity();
+ if (extent != null) {
+ final InternationalString description = extent.getDescription();
+ if (description != null) {
+ return description.toString(getJavaLocale());
+ }
+ }
+ }
} catch (Exception exception) {
return getLocalizedMessage(exception);
}
@@@ -242,9 -247,11 +250,11 @@@
area = handler.peek();
if (area == null) try {
final IdentifiedObject object = getIdentifiedObject(codeOrPath, null);
- final Object domain = IdentifiedObjects.getProperties(object).get(ReferenceSystem.DOMAIN_OF_VALIDITY_KEY);
- if (domain instanceof Extent) {
- area = Extents.getGeographicBoundingBox((Extent) domain);
- for (final ObjectDomain domain : object.getDomains()) {
++ for (final DefaultObjectDomain domain : Legacy.getDomains(object)) {
+ area = Extents.getGeographicBoundingBox(domain.getDomainOfValidity());
+ if (area != null) {
+ break;
+ }
}
} catch (Exception exception) {
reportException("getGeographicArea", exception);
diff --cc endorsed/src/org.apache.sis.referencing/main/module-info.java
index 0f58149356,0f58149356..d0ffb6b5da
--- a/endorsed/src/org.apache.sis.referencing/main/module-info.java
+++ b/endorsed/src/org.apache.sis.referencing/main/module-info.java
@@@ -202,6 -202,6 +202,10 @@@ module org.apache.sis.referencing
org.glassfish.jaxb.core, // For access to various classes.
jakarta.xml.bind; // Seems ignored.
++ exports org.apache.sis.referencing.internal to // On main branch only, for transition from GeoAPI 3.0.
++ org.apache.sis.console,
++ org.apache.sis.openoffice;
++
/*
* Allow JAXB to use reflection for marshalling and
* unmarshalling Apache SIS objects in XML documents.
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/Formatter.java
index 46c6c9ddd6,7da0b28d40..41834545a4
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/Formatter.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/Formatter.java
@@@ -84,11 -85,11 +85,13 @@@ import org.apache.sis.referencing.util.
import org.apache.sis.referencing.util.WKTUtilities;
import org.apache.sis.geometry.AbstractDirectPosition;
import org.apache.sis.geometry.AbstractEnvelope;
- import org.apache.sis.metadata.iso.extent.Extents;
+ import org.apache.sis.xml.NilObject;
-// Specific to the geoapi-3.1 and geoapi-4.0 branches:
-import org.opengis.util.ControlledVocabulary;
-import org.opengis.referencing.ObjectDomain;
+// Specific to the main branch:
+import org.opengis.util.CodeList;
+import org.opengis.referencing.ReferenceIdentifier;
++import org.apache.sis.referencing.DefaultObjectDomain;
++import org.apache.sis.referencing.internal.Legacy;
/**
@@@ -878,30 -879,49 +881,49 @@@ public class Formatter implements Local
}
/**
- * Appends the anchor, scope and domain of validity of the given object. Those information are available
- * only for {@link ReferenceSystem}, {@link Datum} and {@link CoordinateOperation} objects.
+ * Appends the anchor, scope and domain of validity of the given object.
+ * In the ISO 19111 model, those information are valid only for {@link Datum},
+ * {@link ReferenceSystem} and {@link CoordinateOperation} objects.
*/
private void appendForSubtypes(final IdentifiedObject object) {
- final InternationalString anchor, scope;
- final Extent area;
- if (object instanceof ReferenceSystem) {
- anchor = null;
- scope = ((ReferenceSystem) object).getScope();
- area = ((ReferenceSystem) object).getDomainOfValidity();
- } else if (object instanceof Datum) {
+ InternationalString anchor = null, scope = null;
+ Extent area = null;
+ if (object instanceof Datum) {
anchor = ((Datum) object).getAnchorPoint();
- scope = ((Datum) object).getScope();
- area = ((Datum) object).getDomainOfValidity();
- } else if (object instanceof CoordinateOperation) {
- anchor = null;
- scope = ((CoordinateOperation) object).getScope();
- area = ((CoordinateOperation) object).getDomainOfValidity();
- } else {
+ } else if (!(object instanceof ReferenceSystem || object instanceof CoordinateOperation)) {
return;
}
- for (final ObjectDomain domain : object.getDomains()) {
++ for (final DefaultObjectDomain domain : Legacy.getDomains(object)) {
+ scope = domain.getScope();
+ area = domain.getDomainOfValidity();
+ if (area != null) break;
+ // TODO: in 2019 revision we need to format all USAGE[…] elements, not only the first one.
+ }
appendOnNewLine(WKTKeywords.Anchor, anchor, null);
- appendOnNewLine(WKTKeywords.Scope, scope, ElementKind.SCOPE);
- if (area != null) {
+ append(scope, area);
+ }
+
+ /**
+ * Appends the usage (scope and domain of validity) of an object.
- * The arguments are the components of an {@link ObjectDomain}.
++ * The arguments are the components of an {@link DefaultObjectDomain}.
+ * The given extent is decomposed in horizontal, vertical and temporal components.
+ * The horizontal component uses the default number of fraction digits recommended by ISO 19162.
+ *
+ * <h4>Usage element</h4>
+ * In a WKT string, the given elements should be enclosed in an {@code USAGE[…]} element
+ * according the ISO 19162:2019 standard but not according the previous version (2015).
+ * The {@code USAGE[…]} enclosing element shall be provided when needed by the caller.
+ *
+ * @param scope description of domain of usage, or {@code null} if none.
+ * @param area area for which the object is valid, or {@code null} if none.
+ *
+ * @since 1.4
+ */
+ public void append(final InternationalString scope, final Extent area) {
+ if (scope != null && !(scope instanceof NilObject)) {
+ appendOnNewLine(WKTKeywords.Scope, scope, ElementKind.SCOPE);
+ }
+ if (area != null && !(area instanceof NilObject)) {
appendOnNewLine(WKTKeywords.Area, area.getDescription(), ElementKind.EXTENT);
append(Extents.getGeographicBoundingBox(area), BBOX_ACCURACY);
appendVerticalExtent(Extents.getVerticalRange(area));
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/AbstractIdentifiedObject.java
index 522334dbdc,983ddf23cf..fd1e98c2a8
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/AbstractIdentifiedObject.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/AbstractIdentifiedObject.java
@@@ -71,8 -77,8 +77,9 @@@ import static org.apache.sis.util.inter
// Specific to the main and geoapi-3.1 branches:
import org.opengis.referencing.ReferenceIdentifier;
-// Specific to the geoapi-3.1 and geoapi-4.0 branches:
-import org.opengis.referencing.ObjectDomain;
+// Specific to the main branch:
+import org.apache.sis.metadata.iso.DefaultIdentifier;
++import org.apache.sis.referencing.internal.Legacy;
/**
@@@ -173,6 -181,6 +182,13 @@@ public class AbstractIdentifiedObject e
*/
public static final String DEPRECATED_KEY = "deprecated";
++ /**
++ * Key for the <code>{@value}</code> property to be given to the
++ * {@code ObjectFactory.createFoo(Map, ...)} methods.
++ * This is used for setting the value to be returned by {@link #getDomains()}.
++ */
++ static final String DOMAINS_KEY = "domains";
++
/**
* The name for this object or code. Shall never be {@code null}.
*
@@@ -209,6 -217,20 +225,20 @@@
@SuppressWarnings("serial") // Most SIS implementations are serializable.
private Set<ReferenceIdentifier> identifiers;
+ /**
+ * Scope and area for which this object is valid, or {@code null} if none.
+ * We must be prepared to handle either null or an empty set for "domains"
+ * because we may get both on unmarshalling.
+ *
+ * <p><b>Consider this field as final!</b>
+ * This field is modified only at unmarshalling time by {@link #setScope(InternationalString)}
+ * and {@link #setDomainOfValidity(Extent)}.</p>
+ *
+ * @see #getDomains()
+ */
+ @SuppressWarnings("serial") // Most SIS implementations are serializable.
- private Collection<ObjectDomain> domains;
++ private Collection<DefaultObjectDomain> domains;
+
/**
* Comments on or information about this object, or {@code null} if none.
*
@@@ -276,13 -291,11 +299,11 @@@
* <td>{@value org.opengis.referencing.ReferenceIdentifier#VERSION_KEY}</td>
* <td>{@link String}</td>
* <td>{@link NamedIdentifier#getVersion()} on the {@linkplain #getName() name}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.metadata.Identifier#DESCRIPTION_KEY}</td>
+ * <td>"description"</td>
* <td>{@link String}</td>
* <td>{@link NamedIdentifier#getDescription()} on the {@linkplain #getName() name}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
@@@ -291,8 -303,19 +311,19 @@@
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
* <td>{@link ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
+ * <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
+ * <td>{@link String} or {@link InternationalString}</td>
- * <td>{@link ObjectDomain#getScope()} on the {@linkplain #getDomains() domain}</td>
++ * <td>{@link DefaultObjectDomain#getScope()} on the {@linkplain #getDomains() domain}</td>
+ * </tr><tr>
+ * <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
+ * <td>{@link Extent}</td>
- * <td>{@link ObjectDomain#getDomainOfValidity()} on the {@linkplain #getDomains() domain}</td>
++ * <td>{@link DefaultObjectDomain#getDomainOfValidity()} on the {@linkplain #getDomains() domain}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
@@@ -373,6 -399,25 +407,25 @@@
throw illegalPropertyType(properties, IDENTIFIERS_KEY, value);
}
+ // -----------------------------------------
+ // "domains": ObjectDomain or ObjectDomain[]
+ // -----------------------------------------
+ value = properties.get(DOMAINS_KEY);
- if (value instanceof ObjectDomain) {
- domains = Collections.singleton((ObjectDomain) value);
- } else if (value instanceof ObjectDomain[]) {
- domains = immutableSet(true, (ObjectDomain[]) value);
++ if (value instanceof DefaultObjectDomain) {
++ domains = Collections.singleton((DefaultObjectDomain) value);
++ } else if (value instanceof DefaultObjectDomain[]) {
++ domains = immutableSet(true, (DefaultObjectDomain[]) value);
+ } else if (value != null) {
+ throw illegalPropertyType(properties, DOMAINS_KEY, value);
+ } else {
+ // Compatibility with previous way to specify domain.
+ final InternationalString scope = Types.toInternationalString(properties, ReferenceSystem.SCOPE_KEY);
+ final Extent domainOfValidity = Containers.property(properties, ReferenceSystem.DOMAIN_OF_VALIDITY_KEY, Extent.class);
+ if (scope != null || domainOfValidity != null) {
+ domains = Collections.singleton(new DefaultObjectDomain(scope, domainOfValidity));
+ }
+ }
+
// ----------------------------------------
// "remarks": String or InternationalString
// ----------------------------------------
@@@ -415,6 -460,7 +468,7 @@@
name = object.getName();
alias = nonEmpty(object.getAlias()); // Favor null for empty set in case it is not Collections.EMPTY_SET
identifiers = nonEmpty(object.getIdentifiers());
- domains = nonEmpty(object.getDomains());
++ domains = nonEmpty(Legacy.getDomains(object));
remarks = object.getRemarks();
deprecated = (object instanceof Deprecable) ? ((Deprecable) object).isDeprecated() : false;
}
@@@ -515,6 -561,20 +569,19 @@@
return nonNull(identifiers); // Needs to be null-safe because we may have a null value on unmarshalling.
}
+ /**
+ * Returns the usage of this CRS-related object.
+ * The domain includes a scope (description of the primary purpose of this object) together
+ * with a domain of validity (spatial and temporal extent in which the object can be used).
+ *
+ * @return scopes and domains of validity of this object.
+ *
+ * @since 1.4
+ */
- @Override
- public Collection<ObjectDomain> getDomains() {
++ public Collection<DefaultObjectDomain> getDomains() {
+ return nonNull(domains);
+ }
+
/**
* Returns a narrative explanation of the role of this object.
*
@@@ -732,6 -787,7 +801,7 @@@
return deepEquals(getName(), that.getName(), mode) &&
deepEquals(getAlias(), that.getAlias(), mode) &&
deepEquals(getIdentifiers(), that.getIdentifiers(), mode) &&
- deepEquals(getDomains(), that.getDomains(), mode) &&
++ deepEquals(getDomains(), Legacy.getDomains(that), mode) &&
deepEquals(getRemarks(), that.getRemarks(), mode);
}
case IGNORE_METADATA:
@@@ -1127,6 -1179,77 +1193,77 @@@
}
}
+ /**
+ * Finds the first non-null domain element.
+ *
+ * @param <T> type of domain element to get.
- * @param getter {@link ObjectDomain} getter method to invoke.
++ * @param getter {@code ObjectDomain} getter method to invoke.
+ * @return first non-null value, or {@code null} if none.
+ */
- private <T> T findFirst(final Function<ObjectDomain,T> getter) {
++ private <T> T findFirst(final Function<DefaultObjectDomain,T> getter) {
+ if (domains == null) return null;
+ return domains.stream().map(getter).filter(ImplementationHelper::nonNil).findFirst().orElse(null);
+ }
+
+ /**
+ * Returns the region or timeframe in which this object is valid, or {@code null} if unspecified.
+ * This is used for JAXB marshalling only.
+ *
+ * @return area or region or timeframe in which this object is valid, or {@code null}.
+ */
+ @XmlElement(name = "domainOfValidity")
+ // For an unknown reason, JAXB does not take the adapter declared in package-info for this particular property.
+ @Workaround(library = "JDK", version = "1.8")
+ @XmlJavaTypeAdapter(EX_Extent.class)
+ private Extent getDomainExtent() {
- return findFirst(ObjectDomain::getDomainOfValidity);
++ return findFirst(DefaultObjectDomain::getDomainOfValidity);
+ }
+
+ /**
+ * Returns the domain or limitations of usage, or {@code null} if unspecified.
+ * This is used for JAXB marshalling only. This property is mandatory in datum,
+ * coordinate reference system and coordinate operation but is not expected in
+ * other kind of objects, so we declare it as optional.
+ *
+ * @return description of domain of usage, or {@code null}.
+ */
+ @XmlElement(name ="scope")
+ private InternationalString getDomainScope() {
- return findFirst(ObjectDomain::getScope);
++ return findFirst(DefaultObjectDomain::getScope);
+ }
+
+ /**
+ * Invoked by JAXB only at unmarshalling time.
+ */
+ private void setDomainExtent(final Extent value) {
+ InternationalString scope = null;
- final DefaultObjectDomain domain = DefaultObjectDomain.castOrCopy(CollectionsExt.first(domains));
++ final DefaultObjectDomain domain = CollectionsExt.first(domains);
+ if (domain != null) {
+ if (domain.domainOfValidity != null) {
+ propertyAlreadySet("setDomain", "domainOfValidity");
+ return;
+ }
+ scope = domain.scope;
+ }
+ domains = Collections.singleton(new DefaultObjectDomain(scope, value));
+ }
+
+ /**
+ * Invoked by JAXB only at unmarshalling time.
+ */
+ private void setDomainScope(final InternationalString value) {
+ Extent area = null;
- final DefaultObjectDomain domain = DefaultObjectDomain.castOrCopy(CollectionsExt.first(domains));
++ final DefaultObjectDomain domain = CollectionsExt.first(domains);
+ if (domain != null) {
+ if (domain.scope != null) {
+ propertyAlreadySet("setDomainScope", "scope");
+ return;
+ }
+ area = domain.domainOfValidity;
+ }
+ domains = Collections.singleton(new DefaultObjectDomain(value, area));
+ }
+
/**
* Invoked by JAXB for setting the remarks.
*
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/AbstractReferenceSystem.java
index 9876cdc228,3c35b0cf24..26bcf03908
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/AbstractReferenceSystem.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/AbstractReferenceSystem.java
@@@ -23,19 -21,9 +21,11 @@@ import jakarta.xml.bind.annotation.XmlT
import org.opengis.util.GenericName;
import org.opengis.util.InternationalString;
import org.opengis.referencing.ReferenceSystem;
- import org.opengis.metadata.extent.Extent;
- import org.apache.sis.util.Workaround;
- import org.apache.sis.util.ComparisonMode;
- import org.apache.sis.util.iso.Types;
- import org.apache.sis.xml.bind.metadata.EX_Extent;
- import org.apache.sis.metadata.internal.ImplementationHelper;
-
- import static org.apache.sis.util.Utilities.deepEquals;
- import static org.apache.sis.util.collection.Containers.property;
-// Specific to the geoapi-3.1 and geoapi-4.0 branches:
-import org.opengis.metadata.Identifier;
+// Specific to the main branch:
++import org.apache.sis.referencing.internal.Legacy;
+import org.opengis.referencing.ReferenceIdentifier;
++import org.opengis.metadata.extent.Extent;
/**
@@@ -110,36 -70,23 +72,23 @@@ public class AbstractReferenceSystem ex
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
- * <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
- * <td>{@link Extent}</td>
- * <td>{@link #getDomainOfValidity()}</td>
- * </tr>
- * <tr>
- * <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
- * <td>{@link String} or {@link InternationalString}</td>
- * <td>{@link #getScope()}</td>
- * </tr>
- * <tr>
- * <th colspan="3" class="hsep">Defined in parent class (reminder)</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link Identifier} or {@link String}</td>
+ * <td>{@link ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link Identifier} (optionally as array)</td>
+ * <td>{@link ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
@@@ -181,82 -124,6 +126,33 @@@
return ReferenceSystem.class;
}
+ /**
+ * Returns the region or timeframe in which this reference system is valid, or {@code null} if unspecified.
+ *
+ * @return area or region or timeframe in which this (coordinate) reference system is valid, or {@code null}.
+ *
- * @see org.apache.sis.metadata.iso.extent.DefaultExtent
++ * @deprecated Replaced by {@link #getDomains()} as of ISO 19111:2019.
+ */
+ @Override
- @XmlElement(name = "domainOfValidity")
- // For an unknown reason, JAXB does not take the adapter declared in package-info for this particular property.
- @Workaround(library = "JDK", version = "1.8")
- @XmlJavaTypeAdapter(EX_Extent.class)
++ @Deprecated(since = "1.4")
+ public Extent getDomainOfValidity() {
- return domainOfValidity;
++ return Legacy.getDomainOfValidity(getDomains());
+ }
+
+ /**
+ * Returns the domain or limitations of usage, or {@code null} if unspecified.
+ *
+ * @return description of domain of usage, or limitations of usage, for which this
+ * (coordinate) reference system object is valid, or {@code null}.
- */
- @Override
- @XmlElement(name ="scope", required = true)
- public InternationalString getScope() {
- return scope;
- }
-
- /**
- * Compares this reference system with the specified object for equality.
- * If the {@code mode} argument value is {@link ComparisonMode#STRICT STRICT} or
- * {@link ComparisonMode#BY_CONTRACT BY_CONTRACT}, then all available properties are
- * compared including the {@linkplain #getDomainOfValidity() domain of validity} and
- * the {@linkplain #getScope() scope}.
+ *
- * @param object the object to compare to {@code this}.
- * @param mode {@link ComparisonMode#STRICT STRICT} for performing a strict comparison, or
- * {@link ComparisonMode#IGNORE_METADATA IGNORE_METADATA} for comparing only
- * properties relevant to coordinate transformations.
- * @return {@code true} if both objects are equal.
++ * @deprecated Replaced by {@link #getDomains()} as of ISO 19111:2019.
+ */
+ @Override
- public boolean equals(final Object object, final ComparisonMode mode) {
- if (!super.equals(object, mode)) {
- return false;
- }
- switch (mode) {
- case STRICT: {
- final AbstractReferenceSystem that = (AbstractReferenceSystem) object;
- return Objects.equals(domainOfValidity, that.domainOfValidity) &&
- Objects.equals(scope, that.scope);
- }
- case BY_CONTRACT: {
- final ReferenceSystem that = (ReferenceSystem) object;
- return deepEquals(getDomainOfValidity(), that.getDomainOfValidity(), mode) &&
- deepEquals(getScope(), that.getScope(), mode);
- }
- default: {
- // Domain of validity and scope are metadata, so they can be ignored.
- return true;
- }
- }
- }
-
- /**
- * Invoked by {@code hashCode()} for computing the hash code when first needed.
- * See {@link org.apache.sis.referencing.AbstractIdentifiedObject#computeHashCode()}
- * for more information.
- *
- * @return the hash code value. This value may change in any future Apache SIS version.
- */
- @Override
- protected long computeHashCode() {
- return super.computeHashCode() + Objects.hash(domainOfValidity, scope);
++ @Deprecated(since = "1.4")
++ public InternationalString getScope() {
++ return Legacy.getScope(getDomains());
+ }
+
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/DefaultObjectDomain.java
index 0000000000,b44848b058..aa1bd3f1de
mode 000000,100644..100644
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/DefaultObjectDomain.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/DefaultObjectDomain.java
@@@ -1,0 -1,297 +1,269 @@@
+ /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ package org.apache.sis.referencing;
+
+ import java.util.Objects;
+ import java.io.Serializable;
+ import java.io.ObjectStreamException;
+ import org.opengis.metadata.extent.Extent;
+ import org.opengis.util.InternationalString;
+ import org.apache.sis.util.ComparisonMode;
+ import org.apache.sis.util.LenientComparable;
+ import org.apache.sis.util.Utilities;
+ import org.apache.sis.util.resources.Vocabulary;
+ import org.apache.sis.referencing.util.WKTKeywords;
+ import org.apache.sis.io.wkt.FormattableObject;
+ import org.apache.sis.io.wkt.Formatter;
+ import org.apache.sis.xml.NilObject;
+ import org.apache.sis.xml.NilReason;
+ import org.apache.sis.metadata.iso.extent.DefaultExtent;
+
-// Specific to the geoapi-3.1 and geoapi-4.0 branches:
-import org.opengis.referencing.ObjectDomain;
-
+
+ /**
+ * Scope and domain of validity of a CRS-related object.
+ * Those two properties are mandatory according ISO 19111.
+ * If a property is unspecified (by passing {@code null} to the constructor),
+ * then this class substitutes the null value by a <i>"not known"</i> text in an
+ * object implementing the {@link NilObject} interface with {@link NilReason#UNKNOWN}.
+ * The use of <i>"not known"</i> text is an ISO 19111 recommendation.
+ *
++ * <div class="warning"><b>Note on International Standard versions</b><br>
++ * This class is derived from a new type defined in the ISO 19111 international standard published in 2019,
++ * while GeoAPI 3.0 is based on the version published in 2007. Consequently this implementation class does
++ * not yet implement a GeoAPI interface, but is expected to do so after the next GeoAPI releases.
++ * When the interface will become available, all references to this implementation class in Apache SIS will
++ * be replaced be references to the {@code ObjectDomain} interface.
++ * </div>
++ *
+ * <h2>Immutability and thread safety</h2>
+ * This class is immutable and thus thread-safe if the property values
+ * given to the constructor are also immutable.
+ *
+ * @author Martin Desruisseaux (Geomatys)
+ * @version 1.4
+ * @since 1.4
+ */
-public class DefaultObjectDomain extends FormattableObject implements ObjectDomain, LenientComparable, Serializable {
++public class DefaultObjectDomain extends FormattableObject implements LenientComparable, Serializable {
+ /**
+ * Serial number for inter-operability with different versions.
+ */
+ private static final long serialVersionUID = 5797839090924498526L;
+
+ /**
+ * The text used by default when the scope was not specified.
+ * The <i>"not known"</i> text is recommended by the ISO 19111 standard.
+ * The text may be localized.
+ */
+ private static final class UnknownScope extends Vocabulary.International implements NilObject {
+ /** For cross-version interoperability. */
+ private static final long serialVersionUID = 7235301883912422934L;
+
+ /** The singleton instance. */
+ static final UnknownScope INSTANCE = new UnknownScope();
+
+ /** Creates the singleton instance. */
+ private UnknownScope() {
+ super(Vocabulary.Keys.NotKnown);
+ }
+
+ /**
+ * {@return a reason saying that the extent is unknown}.
+ */
+ @Override
+ public NilReason getNilReason() {
+ return NilReason.UNKNOWN;
+ }
+
+ /**
+ * Returns the unique instance on deserialization.
+ *
+ * @return the object to use after deserialization.
+ * @throws ObjectStreamException if the serialized object contains invalid data.
+ */
+ private Object readResolve() throws ObjectStreamException {
+ return INSTANCE;
+ }
+ }
+
+ /**
+ * The extent used by default when the scope was not specified.
+ */
+ private static final class UnknownExtent extends DefaultExtent implements NilObject {
+ /** For cross-version interoperability. */
+ private static final long serialVersionUID = 662383891780679068L;
+
+ /** The singleton instance. */
+ static final UnknownExtent INSTANCE = new UnknownExtent();
+
+ /** Creates the singleton instance. */
+ private UnknownExtent() {
+ super(UnknownScope.INSTANCE, null, null, null);
+ transitionTo(DefaultExtent.State.FINAL);
+ }
+
+ /**
+ * {@return a reason saying that the extent is unknown}.
+ */
+ @Override
+ public NilReason getNilReason() {
+ return NilReason.UNKNOWN;
+ }
+
+ /**
+ * Returns the unique instance on deserialization.
+ *
+ * @return the object to use after deserialization.
+ * @throws ObjectStreamException if the serialized object contains invalid data.
+ */
+ private Object readResolve() throws ObjectStreamException {
+ return INSTANCE;
+ }
+ }
+
+ /**
+ * Description of domain of usage, or limitations of usage, for which the object is valid.
+ * This is {@code null} (i.e. is not replaced by the <i>"not known"</i> text) if the value given
+ * to the {@linkplain #DefaultObjectDomain(InternationalString, Extent) constructor} was null.
+ *
+ * @see #getScope()
+ */
+ @SuppressWarnings("serial") // Most SIS implementations are serializable.
+ protected final InternationalString scope;
+
+ /**
+ * Area for which the object is valid.
+ * This is {@code null} (i.e. is not replaced by the <i>"not known"</i> text) if the value given
+ * to the {@linkplain #DefaultObjectDomain(InternationalString, Extent) constructor} was null.
+ *
+ * @see #getDomainOfValidity()
+ */
+ @SuppressWarnings("serial") // Most SIS implementations are serializable.
+ protected final Extent domainOfValidity;
+
+ /**
+ * Creates a new domain with the given scope and extent.
+ * If any value is {@code null}, the text will be set to "not known" (potentially localized).
+ * The <i>"not known"</i> text is standardized by ISO 19111 for the scope.
+ *
+ * @param scope description of domain of usage, or limitations of usage.
+ * @param domainOfValidity area for which the object is valid.
+ */
+ public DefaultObjectDomain(final InternationalString scope, final Extent domainOfValidity) {
+ this.scope = scope;
+ this.domainOfValidity = domainOfValidity;
+ }
+
- /**
- * Creates a new domain with the same values than the specified one.
- * This copy constructor provides a way to convert an arbitrary implementation into a SIS one
- * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API.
- *
- * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
- *
- * @param domain the domain to copy.
- *
- * @see #castOrCopy(ObjectDomain)
- */
- public DefaultObjectDomain(final ObjectDomain domain) {
- scope = domain.getScope();
- domainOfValidity = domain.getDomainOfValidity();
- }
-
- /**
- * Returns a SIS datum implementation with the same values than the given arbitrary implementation.
- * If the given object is {@code null}, then this method returns {@code null}.
- * Otherwise if the given object is already a SIS implementation, then the given object is returned unchanged.
- * Otherwise a new SIS implementation is created and initialized to the attribute values of the given object.
- *
- * @param object the object to get as a SIS implementation, or {@code null} if none.
- * @return a SIS implementation containing the values of the given object (may be the
- * given object itself), or {@code null} if the argument was null.
- */
- public static DefaultObjectDomain castOrCopy(final ObjectDomain object) {
- return (object == null) || (object instanceof DefaultObjectDomain)
- ? (DefaultObjectDomain) object : new DefaultObjectDomain(object);
- }
-
+ /**
+ * Returns a description of usage, or limitations of usage, for which this object is valid.
+ * If no scope was specified to the constructor, then this method returns <i>"not known"</i>
+ * in an instance implementing the {@link NilObject} interface with {@link NilReason#UNKNOWN}.
+ *
+ * @return the domain of usage.
+ */
- @Override
+ public InternationalString getScope() {
+ return (scope != null) ? scope : UnknownScope.INSTANCE;
+ }
+
+ /**
+ * Returns the spatial and temporal extent in which this object is valid.
+ * If no extent was specified to the constructor, then this method returns <i>"not known"</i>
+ * in an instance implementing the {@link NilObject} interface with {@link NilReason#UNKNOWN}.
+ *
+ * @return the area or time frame of usage.
+ */
- @Override
+ public Extent getDomainOfValidity() {
+ return (domainOfValidity != null) ? domainOfValidity : UnknownExtent.INSTANCE;
+ }
+
+ /**
+ * Compares the specified object with this object for equality.
+ * This method is implemented as below (omitting assertions):
+ *
+ * {@snippet lang="java" :
+ * return equals(other, ComparisonMode.STRICT);
+ * }
+ *
+ * Subclasses shall override {@link #equals(Object, ComparisonMode)} instead of this method.
+ *
+ * @param object the other object (may be {@code null}).
+ * @return {@code true} if both objects are equal.
+ */
+ @Override
+ public final boolean equals(final Object object) {
+ final boolean eq = equals(object, ComparisonMode.STRICT);
+ // If objects are equal, then they must have the same hash code value.
+ assert !eq || hashCode() == object.hashCode() : this;
+ return eq;
+ }
+
+ /**
+ * Compares this object system with the specified object for equality.
+ *
+ * @param object the object to compare to {@code this}.
+ * @param mode {@link ComparisonMode#STRICT STRICT} or
+ * {@link ComparisonMode#IGNORE_METADATA IGNORE_METADATA}.
+ * @return {@code true} if both objects are equal.
+ */
+ @Override
+ public boolean equals(final Object object, final ComparisonMode mode) {
+ if (mode == ComparisonMode.STRICT) {
+ if (object != null && object.getClass() == getClass()) {
+ final var that = (DefaultObjectDomain) object;
+ return Objects.equals(scope, that.scope) &&
+ Objects.equals(domainOfValidity, that.domainOfValidity);
+ }
+ } else {
- if (object instanceof ObjectDomain) {
- final var that = (ObjectDomain) object;
++ if (object instanceof DefaultObjectDomain) {
++ final var that = (DefaultObjectDomain) object;
+ return Utilities.deepEquals(getScope(), that.getScope(), mode) &&
+ Utilities.deepEquals(getDomainOfValidity(), that.getDomainOfValidity(), mode);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Returns a hash code value for this domain.
+ *
+ * @return a hash code value.
+ */
+ @Override
+ public int hashCode() {
+ return Objects.hash(scope, domainOfValidity);
+ }
+
+ /**
+ * Formats the inner part of the <cite>Well Known Text</cite> (WKT) representation for this object.
+ * The default implementation writes the following elements:
+ *
+ * <ul>
+ * <li>The object {@linkplain #scope}.</li>
+ * <li>The geographic description of the {@linkplain #domainOfValidity domain of validity}.</li>
+ * <li>The geographic bounding box of the domain of validity.</li>
+ * </ul>
+ *
+ * @param formatter the formatter where to format the inner content of this WKT element.
+ * @return the {@linkplain org.apache.sis.io.wkt.KeywordCase#CAMEL_CASE CamelCase} keyword
+ * for the WKT element, or {@code null} if unknown.
+ */
+ @Override
+ protected String formatTo(final Formatter formatter) {
+ // Use the fields directly in order to keep null values.
+ formatter.append(scope, domainOfValidity);
+ return WKTKeywords.Usage;
+ }
+ }
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/IdentifiedObjects.java
index e41127dd5f,d4b50835d8..35e548cfe3
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/IdentifiedObjects.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/IdentifiedObjects.java
@@@ -87,12 -87,14 +87,14 @@@ public final class IdentifiedObjects ex
* <td>{@link IdentifiedObject#getAlias()}</td></tr>
* <tr><td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
* <td>{@link IdentifiedObject#getIdentifiers()}</td></tr>
- * <tr><td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link IdentifiedObject#getDomains()}</td></tr>
++ * <tr><td>"domains"</td>
++ * <td>{@link AbstractIdentifiedObject#getDomains()}</td></tr>
* <tr><td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link IdentifiedObject#getRemarks()}</td></tr>
- * <tr><td>{@value org.opengis.referencing.operation.CoordinateOperation#SCOPE_KEY}</td>
- * <td>{@link CoordinateOperation#getScope()} (also in datum and reference systems)</td></tr>
- * <tr><td>{@value org.opengis.referencing.operation.CoordinateOperation#DOMAIN_OF_VALIDITY_KEY}</td>
- * <td>{@link CoordinateOperation#getDomainOfValidity()} (also in datum and reference systems)</td></tr>
- * <tr><td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
- * <td>{@link ObjectDomain#getScope()}</td></tr>
++ * <tr><td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY</td>
++ * <td>{@link DefaultObjectDomain#getScope()}</td></tr>
+ * <tr><td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
- * <td>{@link ObjectDomain#getDomainOfValidity()}</td></tr>
++ * <td>{@link DefaultObjectDomain#getDomainOfValidity()}</td></tr>
* <tr><td>{@value org.opengis.referencing.operation.CoordinateOperation#OPERATION_VERSION_KEY}</td>
* <td>{@link CoordinateOperation#getOperationVersion()}</td></tr>
* <tr><td>{@value org.opengis.referencing.operation.CoordinateOperation#COORDINATE_OPERATION_ACCURACY_KEY}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/Properties.java
index 61e9aed557,bc8ba8e182..8fa5db6599
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/Properties.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/Properties.java
@@@ -34,6 -35,9 +35,7 @@@ import org.apache.sis.referencing.util.
// Specific to the main and geoapi-3.1 branches:
import org.opengis.referencing.ReferenceIdentifier;
-
-// Specific to the geoapi-4.0 branch:
-import org.opengis.referencing.ObjectDomain;
++import org.apache.sis.referencing.internal.Legacy;
/**
@@@ -62,14 -66,15 +64,15 @@@ final class Properties extends Abstract
/*[ 0]*/ IdentifiedObject .NAME_KEY,
/*[ 1]*/ IdentifiedObject .IDENTIFIERS_KEY,
/*[ 2]*/ IdentifiedObject .ALIAS_KEY,
- /*[ 3]*/ IdentifiedObject .REMARKS_KEY,
- /*[ 4]*/ CoordinateOperation .SCOPE_KEY, // same in Datum and ReferenceSystem
- /*[ 5]*/ CoordinateOperation .DOMAIN_OF_VALIDITY_KEY, // same in Datum and ReferenceSystem
- /*[ 6]*/ CoordinateOperation .OPERATION_VERSION_KEY,
- /*[ 7]*/ CoordinateOperation .COORDINATE_OPERATION_ACCURACY_KEY,
- /*[ 8]*/ OperationMethod .FORMULA_KEY,
- /*[ 9]*/ CoordinateOperations .PARAMETERS_KEY,
- /*[10]*/ AbstractIdentifiedObject.DEPRECATED_KEY
- /*[ 3]*/ IdentifiedObject .DOMAINS_KEY,
++ /*[ 3]*/ AbstractIdentifiedObject.DOMAINS_KEY,
+ /*[ 4]*/ IdentifiedObject .REMARKS_KEY,
+ /*[ 5]*/ CoordinateOperation .SCOPE_KEY, // same in Datum and ReferenceSystem
+ /*[ 6]*/ CoordinateOperation .DOMAIN_OF_VALIDITY_KEY, // same in Datum and ReferenceSystem
+ /*[ 7]*/ CoordinateOperation .OPERATION_VERSION_KEY,
+ /*[ 8]*/ CoordinateOperation .COORDINATE_OPERATION_ACCURACY_KEY,
+ /*[ 9]*/ OperationMethod .FORMULA_KEY,
+ /*[10]*/ CoordinateOperations .PARAMETERS_KEY,
+ /*[11]*/ AbstractIdentifiedObject.DEPRECATED_KEY
/*
* The current implementation does not look for minimum and maximum values in ParameterDescriptor
@@@ -126,33 -131,12 +129,12 @@@
final Object getAt(final int key) {
if ((excludeMask & (1 << key)) == 0) {
switch (key) {
- case 0: { // NAME_KEY
- return object.getName();
- }
- case 1: { // IDENTIFIERS_KEY
- final Collection<ReferenceIdentifier> c = object.getIdentifiers();
- if (c != null) {
- final int size = c.size();
- if (size != 0) {
- return c.toArray(new ReferenceIdentifier[size]);
- }
- }
- break;
- }
- case 2: { // ALIAS_KEY
- final Collection<GenericName> c = object.getAlias();
- if (c != null) {
- final int size = c.size();
- if (size != 0) {
- return c.toArray(new GenericName[size]);
- }
- }
- break;
- }
- case 3: { // REMARKS_KEY
- return object.getRemarks();
- }
- case 4: { // SCOPE_KEY
- case 0: return object.getName(); // NAME_KEY
- case 1: return toArray(object.getIdentifiers(), ReferenceIdentifier[]::new); // IDENTIFIERS_KEY
- case 2: return toArray(object.getAlias(), GenericName[]::new); // ALIAS_KEY
- case 3: return toArray(object.getDomains(), ObjectDomain[]::new); // DOMAINS_KEY
- case 4: return object.getRemarks(); // REMARKS_KEY
++ case 0: return object.getName(); // NAME_KEY
++ case 1: return toArray(object.getIdentifiers(), ReferenceIdentifier[]::new); // IDENTIFIERS_KEY
++ case 2: return toArray(object.getAlias(), GenericName[]::new); // ALIAS_KEY
++ case 3: return toArray(Legacy.getDomains(object), DefaultObjectDomain[]::new); // DOMAINS_KEY
++ case 4: return object.getRemarks(); // REMARKS_KEY
+ case 5: { // SCOPE_KEY
if (object instanceof ReferenceSystem) {
return ((ReferenceSystem) object).getScope();
} else if (object instanceof Datum) {
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractCRS.java
index 18d325caac,1e9475fd07..fe8fef1272
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractCRS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/AbstractCRS.java
@@@ -142,23 -139,23 +139,23 @@@ public class AbstractCRS extends Abstra
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
index 8b042607d1,12aebff9fe..ef66b68b50
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
@@@ -151,23 -154,23 +151,23 @@@ public class DefaultCompoundCRS extend
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
index 88c9b7836a,8eba29858d..1e2e807a39
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
@@@ -138,8 -136,11 +135,11 @@@ public class DefaultDerivedCRS extends
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
* <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
index 7a2abcf732,9894d4e09e..676eaf1bf4
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultEngineeringCRS.java
@@@ -109,23 -109,23 +109,23 @@@ public class DefaultEngineeringCRS exte
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
index 00d3f3744c,91e14a8ffa..930893ebbc
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultGeocentricCRS.java
@@@ -105,23 -105,23 +105,23 @@@ public class DefaultGeocentricCRS exten
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
index 5b856ab19e,12c60708ae..bee23168ba
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
@@@ -122,23 -122,23 +122,23 @@@ public class DefaultGeographicCRS exten
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultImageCRS.java
index a40c92d0bf,302b62acc3..dd49332ded
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultImageCRS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultImageCRS.java
@@@ -94,23 -94,23 +94,23 @@@ public class DefaultImageCRS extends Ab
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultParametricCRS.java
index 1a48dea4d6,a9ae91111b..ed9e7acd4a
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultParametricCRS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultParametricCRS.java
@@@ -107,28 -106,17 +104,21 @@@ public class DefaultParametricCRS exten
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
* <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
* </tr>
- * <tr>
- * <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
- * <td>{@link org.opengis.metadata.extent.Extent}</td>
- * <td>{@link #getDomainOfValidity()}</td>
- * </tr>
- * <tr>
- * <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
- * <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
- * <td>{@link #getScope()}</td>
- * </tr>
* </table>
*
+ * <div class="warning"><b>Warning:</b> in a future SIS version, the parameter types may be changed to
+ * {@code org.opengis.referencing.datum.ParametricDatum} and {@code org.opengis.referencing.cs.ParametricCS}
+ * Those change are pending GeoAPI revision.</div>
+ *
* @param properties the properties to be given to the coordinate reference system.
* @param datum the datum.
* @param cs the coordinate system.
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
index 56f422d67f,8f16974a2c..431eb08a29
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultProjectedCRS.java
@@@ -104,8 -101,11 +101,11 @@@ public class DefaultProjectedCRS extend
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
* <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultTemporalCRS.java
index f0db8d8a2c,e8de4c658e..83cf63a5f7
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultTemporalCRS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultTemporalCRS.java
@@@ -124,23 -124,23 +124,23 @@@ public class DefaultTemporalCRS extend
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultVerticalCRS.java
index d2d2d82dce,f6c43ee8f1..7a09c9df00
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultVerticalCRS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/crs/DefaultVerticalCRS.java
@@@ -92,23 -92,23 +92,23 @@@ public class DefaultVerticalCRS extend
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/AbstractCS.java
index 8ffa7d60e9,df9acffdca..5f10d03f43
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/AbstractCS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/AbstractCS.java
@@@ -144,23 -145,19 +145,19 @@@ public class AbstractCS extends Abstrac
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultAffineCS.java
index b2709b0f44,b6f2e9b7e2..0d81528156
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultAffineCS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultAffineCS.java
@@@ -82,23 -82,19 +82,19 @@@ public class DefaultAffineCS extends Ab
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultCartesianCS.java
index 25cb36807d,1959440f46..05fefab03b
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultCartesianCS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultCartesianCS.java
@@@ -91,23 -88,19 +88,19 @@@ public class DefaultCartesianCS extend
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultCompoundCS.java
index bd21edbf21,467add2046..0366b0f398
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultCompoundCS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultCompoundCS.java
@@@ -79,23 -79,19 +79,19 @@@ public class DefaultCompoundCS extends
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
index f58e18868a,957dc78758..826f0674c4
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
@@@ -255,26 -252,21 +252,21 @@@ public class DefaultCoordinateSystemAxi
* <td>{@value #RANGE_MEANING_KEY}</td>
* <td>{@link RangeMeaning}</td>
* <td>{@link #getRangeMeaning()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <th colspan="3" class="hsep">Defined in parent class (reminder)</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultCylindricalCS.java
index edf894fdab,a4ed713fc5..614f952ab1
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultCylindricalCS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultCylindricalCS.java
@@@ -84,23 -84,19 +84,19 @@@ public class DefaultCylindricalCS exten
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
index 1c1c02a3a8,ee3ab487af..a63a668157
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
@@@ -84,23 -84,19 +84,19 @@@ public class DefaultEllipsoidalCS exten
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultLinearCS.java
index dbad877aab,e5891f0245..cff6e76e78
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultLinearCS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultLinearCS.java
@@@ -81,23 -81,19 +81,19 @@@ public class DefaultLinearCS extends Ab
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultPolarCS.java
index f9bb98eaaa,ee44bc1c2b..2a0a754e17
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultPolarCS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultPolarCS.java
@@@ -84,23 -84,19 +84,19 @@@ public class DefaultPolarCS extends Abs
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultSphericalCS.java
index de14bfdbfc,1dae32f4d9..6d1e882aaf
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultSphericalCS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultSphericalCS.java
@@@ -88,23 -88,19 +88,19 @@@ public class DefaultSphericalCS extend
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultTimeCS.java
index 83e2f68fcb,ce610c83db..8658b4f68f
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultTimeCS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultTimeCS.java
@@@ -84,23 -84,19 +84,19 @@@ public class DefaultTimeCS extends Abst
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultUserDefinedCS.java
index e3e312bb0f,865c2f0a2a..e5c0fed8b9
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultUserDefinedCS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultUserDefinedCS.java
@@@ -75,23 -75,19 +75,19 @@@ public class DefaultUserDefinedCS exten
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultVerticalCS.java
index 3c5ef14247,daf102bb97..45d21b3437
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultVerticalCS.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/cs/DefaultVerticalCS.java
@@@ -95,23 -95,19 +95,19 @@@ public class DefaultVerticalCS extends
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} or {@link String}</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link org.opengis.util.GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
+ * <td>{@link org.opengis.referencing.ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/AbstractDatum.java
index 4d9aad42c7,42ca05dd72..9ceaa44165
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/AbstractDatum.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/AbstractDatum.java
@@@ -44,8 -43,8 +43,10 @@@ import org.apache.sis.io.wkt.Formatter
import static org.apache.sis.util.Utilities.deepEquals;
import static org.apache.sis.util.collection.Containers.property;
-// Specific to the geoapi-3.1 and geoapi-4.0 branches:
-import org.opengis.metadata.Identifier;
+// Specific to the main branch:
++import org.opengis.metadata.extent.Extent;
+import org.opengis.referencing.ReferenceIdentifier;
++import org.apache.sis.referencing.internal.Legacy;
/**
@@@ -160,36 -133,25 +135,25 @@@ public class AbstractDatum extends Abst
* <td>{@value org.opengis.referencing.datum.Datum#REALIZATION_EPOCH_KEY}</td>
* <td>{@link Date}</td>
* <td>{@link #getRealizationEpoch()}</td>
- * </tr>
- * <tr>
- * <td>{@value org.opengis.referencing.datum.Datum#DOMAIN_OF_VALIDITY_KEY}</td>
- * <td>{@link Extent}</td>
- * <td>{@link #getDomainOfValidity()}</td>
- * </tr>
- * <tr>
- * <td>{@value org.opengis.referencing.datum.Datum#SCOPE_KEY}</td>
- * <td>{@link InternationalString} or {@link String}</td>
- * <td>{@link #getScope()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <th colspan="3" class="hsep">Defined in parent class (reminder)</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link Identifier} or {@link String}</td>
+ * <td>{@link ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link Identifier} (optionally as array)</td>
+ * <td>{@link ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
@@@ -308,30 -266,6 +268,32 @@@
return ImplementationHelper.toDate(realizationEpoch);
}
+ /**
+ * Returns the region or timeframe in which this datum is valid, or {@code null} if unspecified.
+ *
+ * @return area or region or timeframe in which this datum is valid, or {@code null}.
+ *
- * @see org.apache.sis.metadata.iso.extent.DefaultExtent
++ * @deprecated Replaced by {@link #getDomains()} as of ISO 19111:2019.
+ */
+ @Override
- @XmlElement(name = "domainOfValidity")
++ @Deprecated(since = "1.4")
+ public Extent getDomainOfValidity() {
- return domainOfValidity;
++ return Legacy.getDomainOfValidity(getDomains());
+ }
+
+ /**
+ * Returns the domain or limitations of usage, or {@code null} if unspecified.
+ *
+ * @return description of domain of usage, or limitations of usage, for which this datum object is valid.
++ *
++ * @deprecated Replaced by {@link #getDomains()} as of ISO 19111:2019.
+ */
+ @Override
- @XmlElement(name = "scope", required = true)
++ @Deprecated(since = "1.4")
+ public InternationalString getScope() {
- return scope;
++ return Legacy.getScope(getDomains());
+ }
+
/**
* Returns {@code true} if either the {@linkplain #getName() primary name} or at least
* one {@linkplain #getAlias() alias} matches the given string according heuristic rules.
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultEllipsoid.java
index 93f707e5b7,c4b89f4354..96809cd5ca
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultEllipsoid.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultEllipsoid.java
@@@ -174,23 -174,19 +174,19 @@@ public class DefaultEllipsoid extends A
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link Identifier} or {@link String}</td>
+ * <td>{@link ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link Identifier} (optionally as array)</td>
+ * <td>{@link ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java
index 7d99eefc22,b2ecb9c866..782205614e
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java
@@@ -67,23 -67,23 +67,23 @@@ public class DefaultEngineeringDatum ex
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link Identifier} or {@link String}</td>
+ * <td>{@link ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link Identifier} (optionally as array)</td>
+ * <td>{@link ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
index 61c0e17283,a5809407a0..8d7942c478
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
@@@ -211,26 -210,25 +210,25 @@@ public class DefaultGeodeticDatum exten
* <td>{@value #BURSA_WOLF_KEY}</td>
* <td>{@link BursaWolfParameters} (optionally as array)</td>
* <td>{@link #getBursaWolfParameters()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <th colspan="3" class="hsep">Defined in parent classes (reminder)</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link Identifier} or {@link String}</td>
+ * <td>{@link ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link Identifier} (optionally as array)</td>
+ * <td>{@link ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultImageDatum.java
index c06d0f2ee7,59bed465f0..281d9d66eb
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultImageDatum.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultImageDatum.java
@@@ -87,20 -87,21 +87,21 @@@ public class DefaultImageDatum extends
* </tr>
* <tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link Identifier} or {@link String}</td>
+ * <td>{@link ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link Identifier} (optionally as array)</td>
+ * <td>{@link ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultParametricDatum.java
index 72342526b7,fcc1742aaa..a801e7f117
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultParametricDatum.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultParametricDatum.java
@@@ -88,8 -88,11 +85,11 @@@ public class DefaultParametricDatum ext
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
* <td>{@link org.opengis.metadata.Identifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link org.opengis.util.InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
index 1326029834,88298107f5..1678a6698e
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
@@@ -127,23 -127,19 +127,19 @@@ public class DefaultPrimeMeridian exten
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link Identifier} or {@link String}</td>
+ * <td>{@link ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link Identifier} (optionally as array)</td>
+ * <td>{@link ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
index 282abf24e8,ebea1a3861..68585bd076
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
@@@ -110,23 -110,23 +110,23 @@@ public class DefaultTemporalDatum exten
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link Identifier} or {@link String}</td>
+ * <td>{@link ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link Identifier} (optionally as array)</td>
+ * <td>{@link ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
index ed090f4ea5,609ef0d05f..8e2ead6cfe
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
@@@ -111,23 -111,23 +111,23 @@@ public class DefaultVerticalDatum exten
* <th>Property name</th>
* <th>Value type</th>
* <th>Returned by</th>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#NAME_KEY}</td>
- * <td>{@link Identifier} or {@link String}</td>
+ * <td>{@link ReferenceIdentifier} or {@link String}</td>
* <td>{@link #getName()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link #getAlias()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
- * <td>{@link Identifier} (optionally as array)</td>
+ * <td>{@link ReferenceIdentifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
index 0e55bed56c,85c2846cc2..68b952fa9a
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
@@@ -112,23 -108,19 +108,19 @@@ import org.apache.sis.xml.XML
* <td>{@value org.opengis.metadata.Identifier#CODE_KEY}</td>
* <td>{@link String}</td>
* <td>{@link NamedIdentifier#getCode()} on the {@linkplain AbstractIdentifiedObject#getName() name}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.metadata.Identifier#CODESPACE_KEY}</td>
+ * <td>"codespace"</td>
* <td>{@link String}</td>
* <td>{@link NamedIdentifier#getCodeSpace()} on the {@linkplain AbstractIdentifiedObject#getName() name}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.metadata.Identifier#VERSION_KEY}</td>
+ * <td>"version"</td>
* <td>{@link String}</td>
* <td>{@link NamedIdentifier#getVersion()} on the {@linkplain AbstractIdentifiedObject#getName() name}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.metadata.Identifier#DESCRIPTION_KEY}</td>
+ * <td>"description"</td>
* <td>{@link String}</td>
* <td>{@link NamedIdentifier#getDescription()} on the {@linkplain AbstractIdentifiedObject#getName() name}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}</td>
* <td>{@link GenericName} or {@link CharSequence} (optionally as array)</td>
* <td>{@link AbstractIdentifiedObject#getAlias()}</td>
@@@ -137,18 -128,19 +128,19 @@@
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
* <td>{@link Identifier} (optionally as array)</td>
* <td>{@link AbstractIdentifiedObject#getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.ReferenceSystem#DOMAIN_OF_VALIDITY_KEY}</td>
* <td>{@link Extent}</td>
- * <td>{@link AbstractReferenceSystem#getDomainOfValidity()}</td>
- * </tr>
- * <tr>
+ * <td>{@link DefaultObjectDomain#getDomainOfValidity()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.ReferenceSystem#SCOPE_KEY}</td>
* <td>{@link String} or {@link InternationalString}</td>
- * <td>{@link AbstractReferenceSystem#getScope()}</td>
- * </tr>
- * <tr>
+ * <td>{@link DefaultObjectDomain#getScope()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.datum.Datum#ANCHOR_POINT_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link AbstractDatum#getAnchorPoint()}</td>
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/Legacy.java
index bf950809d6,bf950809d6..74ed68042d
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/Legacy.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/Legacy.java
@@@ -29,11 -29,11 +29,23 @@@ import org.apache.sis.referencing.cs.De
import org.apache.sis.referencing.cs.DefaultCoordinateSystemAxis;
import org.apache.sis.referencing.util.ReferencingUtilities;
++// Specific to the main branch:
++import java.util.List;
++import java.util.Objects;
++import java.util.Collection;
++import org.opengis.util.InternationalString;
++import org.opengis.metadata.extent.Extent;
++import org.opengis.referencing.datum.Datum;
++import org.opengis.referencing.ReferenceSystem;
++import org.opengis.referencing.IdentifiedObject;
++import org.opengis.referencing.operation.CoordinateOperation;
++import org.apache.sis.referencing.DefaultObjectDomain;
++import org.apache.sis.referencing.AbstractIdentifiedObject;
import static org.opengis.referencing.IdentifiedObject.NAME_KEY;
/**
-- * Utilities related to version 1 of Well Known Text format.
++ * Utilities related to version 1 of Well Known Text format, or to ISO 19111:2007.
* Defined in a separated classes for reducing classes loading when not necessary.
*
* <p>This class implements the {@link AxisFilter} interface for opportunistic reasons.
@@@ -118,4 -118,4 +130,57 @@@ public final class Legacy
}
return cs;
}
++
++ /**
++ * Temporary getter method used as a workaround for the lack of this method in GeoAPI 3.0 interface.
++ *
++ * @param object the object from which to get the domain.
++ * @return domain of the given object.
++ */
++ public static Collection<DefaultObjectDomain> getDomains(final IdentifiedObject object) {
++ if (object instanceof AbstractIdentifiedObject) {
++ return ((AbstractIdentifiedObject) object).getDomains();
++ }
++ final Extent domainOfValidity;
++ final InternationalString scope;
++ if (object instanceof ReferenceSystem) {
++ final var c = (ReferenceSystem) object;
++ scope = c.getScope();
++ domainOfValidity = c.getDomainOfValidity();
++ } else if (object instanceof Datum) {
++ final var c = (Datum) object;
++ scope = c.getScope();
++ domainOfValidity = c.getDomainOfValidity();
++ } else if (object instanceof CoordinateOperation) {
++ final var c = (CoordinateOperation) object;
++ scope = c.getScope();
++ domainOfValidity = c.getDomainOfValidity();
++ } else {
++ return null;
++ }
++ if (scope == null && domainOfValidity == null) {
++ return null;
++ }
++ return List.of(new DefaultObjectDomain(scope, domainOfValidity));
++ }
++
++ /**
++ * Returns the first non-null scope found in the given collection.
++ *
++ * @param domains the value of {@link AbstractIdentifiedObject#getDomains()}.
++ * @return a description of domain of usage, or {@code null} if none.
++ */
++ public static InternationalString getScope(final Collection<DefaultObjectDomain> domains) {
++ return domains.stream().map(DefaultObjectDomain::getScope).filter(Objects::nonNull).findFirst().orElse(null);
++ }
++
++ /**
++ * Returns the first non-null domain of validity found in the given collection.
++ *
++ * @param domains the value of {@link AbstractIdentifiedObject#getDomains()}.
++ * @return the valid domain, or {@code null} if not available.
++ */
++ public static Extent getDomainOfValidity(final Collection<DefaultObjectDomain> domains) {
++ return domains.stream().map(DefaultObjectDomain::getDomainOfValidity).filter(Objects::nonNull).findFirst().orElse(null);
++ }
}
diff --cc endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
index 8732d7bb0f,adeeb82046..676dafa32d
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
@@@ -76,6 -74,6 +74,10 @@@ import org.apache.sis.system.Loggers
import static org.apache.sis.util.Utilities.deepEquals;
++// Specific to the main branch:
++import org.opengis.metadata.extent.Extent;
++import org.apache.sis.referencing.internal.Legacy;
++
/**
* Describes the operation for transforming coordinates in the source CRS to coordinates in the target CRS.
@@@ -314,8 -269,11 +273,11 @@@ public class AbstractCoordinateOperatio
* <td>{@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}</td>
* <td>{@link Identifier} (optionally as array)</td>
* <td>{@link #getIdentifiers()}</td>
- * </tr>
- * <tr>
+ * </tr><tr>
- * <td>{@value org.opengis.referencing.IdentifiedObject#DOMAINS_KEY}</td>
- * <td>{@link org.opengis.referencing.ObjectDomain} (optionally as array)</td>
++ * <td>"domains"</td>
++ * <td>{@link org.apache.sis.referencing.DefaultObjectDomain} (optionally as array)</td>
+ * <td>{@link #getDomains()}</td>
+ * </tr><tr>
* <td>{@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}</td>
* <td>{@link InternationalString} or {@link String}</td>
* <td>{@link #getRemarks()}</td>
@@@ -650,28 -606,6 +610,32 @@@ check: for (int isTarget=0; ; isTa
return PositionalAccuracyConstant.getLinearAccuracy(this);
}
+ /**
+ * Returns the area or region or timeframe in which this coordinate operation is valid.
+ *
+ * @return the coordinate operation valid domain, or {@code null} if not available.
++ *
++ * @deprecated Replaced by {@link #getDomains()} as of ISO 19111:2019.
+ */
+ @Override
- @XmlElement(name = "domainOfValidity")
++ @Deprecated(since = "1.4")
+ public Extent getDomainOfValidity() {
- return domainOfValidity;
++ return Legacy.getDomainOfValidity(getDomains());
+ }
+
+ /**
+ * Returns a description of domain of usage, or limitations of usage, for which this operation is valid.
+ *
+ * @return a description of domain of usage, or {@code null} if none.
++ *
++ * @deprecated Replaced by {@link #getDomains()} as of ISO 19111:2019.
+ */
+ @Override
- @XmlElement(name = "scope", required = true)
++ @Deprecated(since = "1.4")
+ public InternationalString getScope() {
- return scope;
++ return Legacy.getScope(getDomains());
+ }
+
/**
* Returns the object for transforming coordinates in the source CRS to coordinates in the target CRS.
* The transform may be {@code null} if this coordinate operation is a defining conversion.
diff --cc endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/gpx/WritableStore.java
index 08f66afe5a,2fd3599554..76139563d7
--- a/endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/gpx/WritableStore.java
+++ b/endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/gpx/WritableStore.java
@@@ -95,9 -95,10 +95,10 @@@ public final class WritableStore extend
* @throws DataStoreException if the feature stream cannot be obtained or updated.
*/
@Override
- public synchronized boolean removeIf(final Predicate<? super AbstractFeature> filter) throws DataStoreException {
- public synchronized void removeIf(final Predicate<? super Feature> filter) throws DataStoreException {
++ public synchronized void removeIf(final Predicate<? super AbstractFeature> filter) throws DataStoreException {
try (Updater updater = updater()) {
- return updater.removeIf(filter);
+ updater.removeIf(filter);
+ updater.flush();
}
}
diff --cc endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/xml/stream/RewriteOnUpdate.java
index 08307d9805,60ba5e50a4..826809e3d8
--- a/endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/xml/stream/RewriteOnUpdate.java
+++ b/endorsed/src/org.apache.sis.storage.xml/main/org/apache/sis/storage/xml/stream/RewriteOnUpdate.java
@@@ -161,29 -161,17 +161,17 @@@ public abstract class RewriteOnUpdate i
* Removes all feature instances from the {@code FeatureSet} which matches the given predicate.
*
* @param filter a predicate which returns {@code true} for feature instances to be removed.
- * @return {@code true} if any elements were removed.
* @throws DataStoreException if the feature stream cannot be obtained or updated.
*/
- public boolean removeIf(final Predicate<? super AbstractFeature> filter) throws DataStoreException {
- public void removeIf(final Predicate<? super Feature> filter) throws DataStoreException {
++ public void removeIf(final Predicate<? super AbstractFeature> filter) throws DataStoreException {
ArgumentChecks.ensureNonNull("filter", filter);
- if (isEmpty()) {
- return false;
+ if (!isEmpty()) {
+ filtered = filtered().filter((feature) -> {
+ return !filter.test(feature);
+ });
}
- filtered = filtered().filter((feature) -> {
- boolean r = filter.test(feature);
- if (r) modified = true;
- return !r;
- });
- modified = false;
- flush(); // Need immediate execution for getting the boolean value.
- return modified;
}
- /**
- * A flag telling whether {@link #removeIf(Predicate)} removed at least one feature.
- */
- private boolean modified;
-
/**
* Updates all feature instances from the {@code FeatureSet} which match the given predicate.
* If the given operator returns {@code null}, then the filtered feature is removed.
diff --cc endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/WritableFeatureSet.java
index 9cda6d5181,14820d87da..247a31c171
--- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/WritableFeatureSet.java
+++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/WritableFeatureSet.java
@@@ -94,7 -84,7 +84,7 @@@ public interface WritableFeatureSet ext
* @return {@code true} if any elements were removed.
* @throws DataStoreException if an error occurred while removing features.
*/
- boolean removeIf(Predicate<? super AbstractFeature> filter) throws DataStoreException;
- void removeIf(Predicate<? super Feature> filter) throws DataStoreException;
++ void removeIf(Predicate<? super AbstractFeature> filter) throws DataStoreException;
/**
* Updates all feature instances from this {@code FeatureSet} which match the given predicate.
diff --cc endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/base/StoreUtilities.java
index 99383ebd61,9e7947f4c9..fa9bcbc9a5
--- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/base/StoreUtilities.java
+++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/base/StoreUtilities.java
@@@ -51,11 -51,11 +51,12 @@@ import org.apache.sis.geometry.GeneralE
import org.apache.sis.metadata.internal.Identifiers;
import org.apache.sis.system.Configuration;
import org.apache.sis.system.Modules;
+ import org.apache.sis.util.ArraysExt;
import org.apache.sis.util.resources.Errors;
-// Specific to the geoapi-3.1 and geoapi-4.0 branches:
-import org.opengis.feature.Feature;
+// Specific to the main branch:
+import org.apache.sis.feature.AbstractFeature;
+import org.apache.sis.metadata.iso.identification.AbstractIdentification;
/**
diff --cc endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/csv/MovingFeatureBuilder.java
index 1958303238,73db51041d..ba00539d3c
--- a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/csv/MovingFeatureBuilder.java
+++ b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/csv/MovingFeatureBuilder.java
@@@ -113,10 -113,10 +113,10 @@@ final class MovingFeatureBuilder extend
/**
* Adds a time range.
- * The minimal and maximal values will be used by {@link #storeTimeRange(String, String, Feature)}.
+ * The minimal and maximal values will be used by {@link #storeTimeRange(String, String, AbstractFeature)}.
*
* @param startTime beginning in milliseconds since Java epoch of the period when the property value is valid.
- * @param endTime end in milliseconds since Java epoch of the period when the the property value is valid.
+ * @param endTime end in milliseconds since Java epoch of the period when the property value is valid.
*/
public final void addTimeRange(final long startTime, final long endTime) {
if (startTime < tmin) tmin = startTime;
diff --cc netbeans-project/build.xml
index 137875ed44,47443fb3a8..44a7f93ce6
--- a/netbeans-project/build.xml
+++ b/netbeans-project/build.xml
@@@ -25,9 -25,18 +25,14 @@@
configure NetBeans with `-add-reads` and `-add-exports` javac
arguments for test compilation only.
-->
- <target name="-pre-compile">
+ <target name="dir.check">
+ <condition property="dir.exists">
+ <available file="build/dependencies" type="dir"/>
+ </condition>
+ </target>
+ <target name="-pre-compile" depends="dir.check" unless="dir.exists">
<ivy:settings file="ivy-settings.xml"/>
<ivy:retrieve pattern="build/dependencies/[artifact].[ext]" symlink="true" sync="true"/>
- <symlink link="${basedir}/build/dependencies/geoapi-pending.jar"
- resource="../../../geoapi/snapshot/geoapi-pending/target/geoapi-pending-3.1-SNAPSHOT.jar"/>
- <symlink link="${basedir}/build/dependencies/geoapi-conformance.jar"
- resource="../../../geoapi/snapshot/geoapi-conformance/target/geoapi-conformance-3.1-SNAPSHOT.jar"/>
</target>
<!--
Called after compilation. Copies the "*.utf" resources files created by Gradle.