(sis) 01/01: Merge branch 'geoapi-3.1'
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 2466fc7ddff63f720bda1af23f118cfea8585b02 Merge: f636f75504 9b511f4d6a Author: Martin Desruisseaux AuthorDate: Tue Mar 12 20:17:32 2024 +0100 Merge branch 'geoapi-3.1' .../main/org/apache/sis/xml/bind/cat/CodeListAdapter.java | 4 +++- .../main/org/apache/sis/xml/bind/metadata/replace/SensorType.java | 6 -- .../main/org/apache/sis/referencing/GeodeticCalculator.java | 2 +- .../operation/transform/DefaultMathTransformFactory.java| 2 +- .../main/org/apache/sis/storage/netcdf/base/RasterResource.java | 2 +- .../main/org/apache/sis/util/collection/CodeListSet.java| 4 +++- .../main/org/apache/sis/util/collection/DefaultTreeTable.java | 2 +- .../main/org/apache/sis/util/privy/CodeLists.java | 4 +++- .../test/org/apache/sis/util/collection/LargeCodeList.java | 6 -- .../main/org/apache/sis/gui/referencing/PositionableProjection.java | 6 -- 10 files changed, 25 insertions(+), 13 deletions(-) diff --cc endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/metadata/replace/SensorType.java index 195808a474,2c96b8d2af..7a50418449 --- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/metadata/replace/SensorType.java +++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/metadata/replace/SensorType.java @@@ -22,6 -20,6 +20,10 @@@ import org.opengis.annotation.UML import org.opengis.annotation.Specification; import org.opengis.util.CodeList; ++// Specific to the main branch: ++import java.util.List; ++import java.util.ArrayList; ++ /** * The code list for {@code }. diff --cc endorsed/src/org.apache.sis.util/main/org/apache/sis/util/collection/CodeListSet.java index 95c9c2ff39,92e0be6861..432b03b807 --- a/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/collection/CodeListSet.java +++ b/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/collection/CodeListSet.java @@@ -27,7 -27,6 +27,9 @@@ import org.opengis.util.CodeList import org.apache.sis.util.privy.CheckedArrayList; import org.apache.sis.util.resources.Errors; ++// Specific to the main branch: ++import org.apache.sis.util.privy.CodeLists; ++ /** * A specialized {@code Set} implementation for use with {@link CodeList} values. diff --cc endorsed/src/org.apache.sis.util/main/org/apache/sis/util/privy/CodeLists.java index 7843f929d2,323e2cb003..271f6bdfdc --- a/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/privy/CodeLists.java +++ b/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/privy/CodeLists.java @@@ -26,6 -25,9 +25,9 @@@ import org.apache.sis.util.CharSequence import org.apache.sis.util.Characters.Filter; import org.apache.sis.util.resources.Errors; -// Specific to the geoapi-3.1 and geoapi-4.0 branches: -import org.opengis.util.ControlledVocabulary; ++// Specific to the main branch: ++import java.lang.reflect.Array; + /** * Implementation of some {@link org.apache.sis.util.iso.Types} methods needed by {@code org.apache.sis.util} module. diff --cc endorsed/src/org.apache.sis.util/test/org/apache/sis/util/collection/LargeCodeList.java index 08002fb18c,17954d32fb..c3841a0373 --- a/endorsed/src/org.apache.sis.util/test/org/apache/sis/util/collection/LargeCodeList.java +++ b/endorsed/src/org.apache.sis.util/test/org/apache/sis/util/collection/LargeCodeList.java @@@ -23,6 -21,6 +21,10 @@@ import org.opengis.util.CodeList // Test dependencies import static org.junit.jupiter.api.Assertions.*; ++// Specific to the main branch: ++import java.util.List; ++import java.util.ArrayList; ++ /** * A code list containing more than 64 elements. This implementation can be used by tests diff --cc optional/src/org.apache.sis.gui/main/org/apache/sis/gui/referencing/PositionableProjection.java index ab5b9b262e,0f7237ee39..16981e045b --- a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/referencing/PositionableProjection.java +++ b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/referencing/PositionableProjection.java @@@ -39,6 -37,6 +37,10 @@@ import org.apache.sis.util.resources.Er import org.apache.sis.util.logging.Logging; import static org.apache.sis.gui.internal.LogHandler.LOGGER; ++// Specific to the main branch: ++import java.util.List; ++import java.util.ArrayList; ++ /** * Provider of map projections centered on a point of interest.
(sis) branch main updated (f636f75504 -> 2466fc7ddf)
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 f636f75504 Merge branch 'geoapi-3.1'. add 03ea47e94c Post-merge automatic import reorder. add 9b511f4d6a Merge branch 'geoapi-4.0' into geoapi-3.1. new 2466fc7ddf 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: .../main/org/apache/sis/xml/bind/cat/CodeListAdapter.java | 4 +++- .../main/org/apache/sis/xml/bind/metadata/replace/SensorType.java | 6 -- .../main/org/apache/sis/referencing/GeodeticCalculator.java | 2 +- .../operation/transform/DefaultMathTransformFactory.java| 2 +- .../main/org/apache/sis/storage/netcdf/base/RasterResource.java | 2 +- .../main/org/apache/sis/util/collection/CodeListSet.java| 4 +++- .../main/org/apache/sis/util/collection/DefaultTreeTable.java | 2 +- .../main/org/apache/sis/util/privy/CodeLists.java | 4 +++- .../test/org/apache/sis/util/collection/LargeCodeList.java | 6 -- .../main/org/apache/sis/gui/referencing/PositionableProjection.java | 6 -- 10 files changed, 25 insertions(+), 13 deletions(-)
(sis) branch geoapi-3.1 updated (b8b49e9bc2 -> 9b511f4d6a)
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a change to branch geoapi-3.1 in repository https://gitbox.apache.org/repos/asf/sis.git from b8b49e9bc2 Merge branch 'geoapi-4.0' into geoapi-3.1. add 03ea47e94c Post-merge automatic import reorder. new 9b511f4d6a Merge branch 'geoapi-4.0' into 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: .../main/org/apache/sis/xml/bind/cat/CodeListAdapter.java | 2 ++ .../main/org/apache/sis/referencing/GeodeticCalculator.java | 2 +- .../main/org/apache/sis/referencing/internal/VerticalDatumTypes.java | 4 +--- .../referencing/operation/transform/DefaultMathTransformFactory.java | 2 +- .../main/org/apache/sis/storage/netcdf/base/RasterResource.java | 2 +- .../main/org/apache/sis/util/collection/DefaultTreeTable.java | 2 +- .../main/org/apache/sis/map/service/Scene2D.java | 1 + 7 files changed, 8 insertions(+), 7 deletions(-)
(sis) 01/01: Merge branch 'geoapi-4.0' into geoapi-3.1.
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-3.1 in repository https://gitbox.apache.org/repos/asf/sis.git commit 9b511f4d6a5fcfaa6f5c15bbff892496a6e61aa3 Merge: b8b49e9bc2 03ea47e94c Author: Martin Desruisseaux AuthorDate: Tue Mar 12 20:14:39 2024 +0100 Merge branch 'geoapi-4.0' into geoapi-3.1. .../main/org/apache/sis/xml/bind/cat/CodeListAdapter.java | 2 ++ .../main/org/apache/sis/referencing/GeodeticCalculator.java | 2 +- .../main/org/apache/sis/referencing/internal/VerticalDatumTypes.java | 4 +--- .../referencing/operation/transform/DefaultMathTransformFactory.java | 2 +- .../main/org/apache/sis/storage/netcdf/base/RasterResource.java | 2 +- .../main/org/apache/sis/util/collection/DefaultTreeTable.java | 2 +- .../main/org/apache/sis/map/service/Scene2D.java | 1 + 7 files changed, 8 insertions(+), 7 deletions(-) diff --cc endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/cat/CodeListAdapter.java index 4de8e1f5e3,9adc3ef22a..ffd8e31acf --- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/cat/CodeListAdapter.java +++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/cat/CodeListAdapter.java @@@ -21,8 -21,7 +21,10 @@@ import org.opengis.util.CodeList import org.apache.sis.util.privy.CodeLists; import org.apache.sis.xml.bind.Context; import org.apache.sis.xml.bind.FilterByVersion; + ++// Specific to the main and geoapi-3.1 branches: +import org.apache.sis.util.iso.Types; + /** * An adapter for {@link CodeList}, in order to implement the ISO 19115-3 standard.
(sis) branch geoapi-4.0 updated: Post-merge automatic import reorder.
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git The following commit(s) were added to refs/heads/geoapi-4.0 by this push: new 03ea47e94c Post-merge automatic import reorder. 03ea47e94c is described below commit 03ea47e94cade91fea4a7e025ec07e1dac8542ff Author: Martin Desruisseaux AuthorDate: Tue Mar 12 20:11:12 2024 +0100 Post-merge automatic import reorder. --- .../main/org/apache/sis/referencing/GeodeticCalculator.java | 2 +- .../main/org/apache/sis/referencing/internal/VerticalDatumTypes.java | 4 +--- .../referencing/operation/transform/DefaultMathTransformFactory.java | 2 +- .../main/org/apache/sis/storage/netcdf/base/RasterResource.java | 2 +- .../main/org/apache/sis/util/collection/DefaultTreeTable.java | 2 +- .../main/org/apache/sis/map/service/Scene2D.java | 1 + 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/GeodeticCalculator.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/GeodeticCalculator.java index 94fdf3cd50..7a6854 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/GeodeticCalculator.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/GeodeticCalculator.java @@ -47,10 +47,10 @@ import org.apache.sis.referencing.operation.transform.DefaultMathTransformFactor import org.apache.sis.referencing.operation.provider.MapProjection; import org.apache.sis.referencing.internal.PositionTransformer; import org.apache.sis.referencing.internal.Resources; +import org.apache.sis.referencing.internal.Bezier; import org.apache.sis.referencing.privy.ReferencingUtilities; import org.apache.sis.referencing.privy.Formulas; import org.apache.sis.referencing.privy.ShapeUtilities; -import org.apache.sis.referencing.internal.Bezier; import org.apache.sis.util.ArgumentChecks; import org.apache.sis.util.privy.Constants; import org.apache.sis.util.privy.Numerics; diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/VerticalDatumTypes.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/VerticalDatumTypes.java index b7720a9ffd..b6de9fa530 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/VerticalDatumTypes.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/VerticalDatumTypes.java @@ -17,6 +17,7 @@ package org.apache.sis.referencing.internal; import java.util.Collection; +import java.util.function.Predicate; import javax.measure.Unit; import org.opengis.util.CodeList; import org.opengis.util.GenericName; @@ -29,9 +30,6 @@ import org.apache.sis.util.StringBuilders; import org.apache.sis.util.privy.CodeLists; import org.apache.sis.measure.Units; -// Specific to the geoapi-3.1 and geoapi-4.0 branches: -import java.util.function.Predicate; - /** * Extensions to the standard set of {@link VerticalDatumType}. diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java index da747cbc19..39aa89dedb 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java @@ -64,12 +64,12 @@ import org.apache.sis.referencing.privy.Formulas; import org.apache.sis.referencing.privy.CoordinateOperations; import org.apache.sis.referencing.privy.ReferencingUtilities; import org.apache.sis.referencing.internal.ParameterizedAffine; +import org.apache.sis.referencing.internal.Resources; import org.apache.sis.referencing.operation.DefaultOperationMethod; import org.apache.sis.referencing.operation.provider.AbstractProvider; import org.apache.sis.referencing.operation.provider.VerticalOffset; import org.apache.sis.referencing.operation.provider.GeographicToGeocentric; import org.apache.sis.referencing.operation.provider.GeocentricToGeographic; -import org.apache.sis.referencing.internal.Resources; import org.apache.sis.system.Reflect; import org.apache.sis.metadata.iso.citation.Citations; import org.apache.sis.parameter.DefaultParameterValueGroup; diff --git a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/RasterResource.java b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/RasterResource.java index 5a0b0742f8..8101ff2362 100644 ---
(sis) branch main updated (2b40ccfdc4 -> f636f75504)
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 2b40ccfdc4 Merge branch 'geoapi-3.1'. https://issues.apache.org/jira/browse/SIS-596 add ff08b71b51 Add DPI parameter on GraphicsPortrayer add 106873efb3 Add javadoc on Scene2D and StylePainter add 646a6e2a15 Add stateful present method on GraphicsPortrayer add 09c131bf72 Remove final from RenderingException, subclassing should be allowed add dca5af8fc9 Update for a change in the way that CodeList are constructed in GeoAPI. https://github.com/opengeospatial/geoapi/issues/91 add b8b49e9bc2 Merge branch 'geoapi-4.0' into geoapi-3.1. new f636f75504 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: .../metadata/iso/distribution/DefaultMedium.java | 2 +- .../apache/sis/metadata/sql/MetadataFallback.java | 9 +- .../apache/sis/metadata/sql/MetadataSource.java| 12 ++- .../main/org/apache/sis/util/iso/Types.java| 68 +-- .../apache/sis/xml/bind/cat/CodeListAdapter.java | 8 +- .../sis/xml/bind/gco/GO_CharacterString.java | 24 -- .../apache/sis/xml/bind/gml/CodeListAdapter.java | 11 ++- .../apache/sis/xml/bind/gml/SC_VerticalCRS.java| 2 +- .../sis/xml/bind/metadata/replace/SensorType.java | 6 +- .../test/org/apache/sis/util/iso/TypesTest.java| 22 ++--- .../apache/sis/io/wkt/GeodeticObjectParser.java| 4 +- .../sis/referencing/cs/DirectionAlongMeridian.java | 2 +- .../referencing/internal/VerticalDatumTypes.java | 25 ++ .../apache/sis/storage/netcdf/MetadataReader.java | 12 +-- .../org/apache/sis/storage/netcdf/base/Axis.java | 4 +- .../org/apache/sis/converter/StringConverter.java | 10 +-- .../main/org/apache/sis/util/privy/CodeLists.java | 98 ++ .../apache/sis/util/collection/LargeCodeList.java | 3 +- .../gui/referencing/PositionableProjection.java| 24 +++--- .../apache/sis/gui/referencing/package-info.java | 2 +- 20 files changed, 225 insertions(+), 123 deletions(-)
(sis) 01/01: Merge branch 'geoapi-3.1'.
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 f636f7550492e46c26c1897d4a2688795ad034be Merge: 2b40ccfdc4 b8b49e9bc2 Author: Martin Desruisseaux AuthorDate: Tue Mar 12 20:06:26 2024 +0100 Merge branch 'geoapi-3.1'. .../metadata/iso/distribution/DefaultMedium.java | 2 +- .../apache/sis/metadata/sql/MetadataFallback.java | 9 +- .../apache/sis/metadata/sql/MetadataSource.java| 12 ++- .../main/org/apache/sis/util/iso/Types.java| 68 +-- .../apache/sis/xml/bind/cat/CodeListAdapter.java | 8 +- .../sis/xml/bind/gco/GO_CharacterString.java | 24 -- .../apache/sis/xml/bind/gml/CodeListAdapter.java | 11 ++- .../apache/sis/xml/bind/gml/SC_VerticalCRS.java| 2 +- .../sis/xml/bind/metadata/replace/SensorType.java | 6 +- .../test/org/apache/sis/util/iso/TypesTest.java| 22 ++--- .../apache/sis/io/wkt/GeodeticObjectParser.java| 4 +- .../sis/referencing/cs/DirectionAlongMeridian.java | 2 +- .../referencing/internal/VerticalDatumTypes.java | 25 ++ .../apache/sis/storage/netcdf/MetadataReader.java | 12 +-- .../org/apache/sis/storage/netcdf/base/Axis.java | 4 +- .../org/apache/sis/converter/StringConverter.java | 10 +-- .../main/org/apache/sis/util/privy/CodeLists.java | 98 ++ .../apache/sis/util/collection/LargeCodeList.java | 3 +- .../gui/referencing/PositionableProjection.java| 24 +++--- .../apache/sis/gui/referencing/package-info.java | 2 +- 20 files changed, 225 insertions(+), 123 deletions(-) diff --cc endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/sql/MetadataFallback.java index 5fb4e3cf41,f2e9856607..5a97fc34f9 --- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/sql/MetadataFallback.java +++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/sql/MetadataFallback.java @@@ -79,8 -80,12 +80,12 @@@ final class MetadataFallback extends Me ArgumentChecks.ensureNonNull("type", type); ArgumentChecks.ensureNonEmpty("identifier", identifier); Object value; -if (ControlledVocabulary.class.isAssignableFrom(type)) { +if (CodeList.class.isAssignableFrom(type)) { - value = getCodeList(type, identifier); + try { + value = getCodeList(type, identifier); + } catch (IllegalArgumentException e) { + throw new MetadataStoreException(Errors.format(Errors.Keys.DatabaseError_2, type, identifier), e); + } } else { value = null; if (type == Citation.class) { diff --cc endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/sql/MetadataSource.java index 048e59d276,49ad8d16ea..b49468feb2 --- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/sql/MetadataSource.java +++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/sql/MetadataSource.java @@@ -877,8 -878,12 +878,12 @@@ public class MetadataSource implements */ private Object lookup(final Class type, final String identifier, boolean verify) throws MetadataStoreException { Object value; -if (ControlledVocabulary.class.isAssignableFrom(type)) { +if (CodeList.class.isAssignableFrom(type)) { - value = getCodeList(type, identifier); + try { + value = getCodeList(type, identifier); + } catch (IllegalArgumentException e) { + throw new MetadataStoreException(Errors.format(Errors.Keys.DatabaseError_2, type, identifier), e); + } } else { final CacheKey key = new CacheKey(type, identifier); /* @@@ -1060,10 -1065,17 +1065,13 @@@ /** * Returns the code of the given type and name. This method is defined for avoiding the compiler warning * message when the actual class is unknown (it must have been checked dynamically by the caller however). + * + * @return the requested code, or {@code null} if the given name is null or empty. + * @throws IllegalArgumentException if there is no value for the given name and the code cannot be created. */ @SuppressWarnings("unchecked") -static ControlledVocabulary getCodeList(final Class type, final String name) { -if (type.isEnum()) { -return (ControlledVocabulary) CodeLists.forEnumName(type.asSubclass(Enum.class), name); -} else { -return CodeLists.getOrCreate(type.asSubclass(CodeList.class), name); -} +static CodeList getCodeList(final Class type, final String name) { - return Types.forCodeName(type.asSubclass(CodeList.class), name, true); ++return CodeLists.getOrCreate(type.asSubclass(CodeList.class), name); } /** diff --cc
(sis) branch geoapi-3.1 updated (9048ae55d3 -> b8b49e9bc2)
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a change to branch geoapi-3.1 in repository https://gitbox.apache.org/repos/asf/sis.git from 9048ae55d3 Merge branch 'geoapi-4.0' into geoapi-3.1. https://issues.apache.org/jira/browse/SIS-596 add ff08b71b51 Add DPI parameter on GraphicsPortrayer add 106873efb3 Add javadoc on Scene2D and StylePainter add 646a6e2a15 Add stateful present method on GraphicsPortrayer add 09c131bf72 Remove final from RenderingException, subclassing should be allowed add dca5af8fc9 Update for a change in the way that CodeList are constructed in GeoAPI. https://github.com/opengeospatial/geoapi/issues/91 new b8b49e9bc2 Merge branch 'geoapi-4.0' into 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: .../metadata/iso/distribution/DefaultMedium.java | 2 +- .../apache/sis/metadata/sql/MetadataFallback.java | 9 +- .../apache/sis/metadata/sql/MetadataSource.java| 14 ++- .../main/org/apache/sis/util/iso/Types.java| 78 +-- .../apache/sis/xml/bind/cat/CodeListAdapter.java | 10 +- .../sis/xml/bind/gco/GO_CharacterString.java | 24 +++-- .../apache/sis/xml/bind/gml/CodeListAdapter.java | 11 ++- .../apache/sis/xml/bind/gml/SC_VerticalCRS.java| 2 +- .../sis/xml/bind/metadata/replace/SensorType.java | 49 ++ .../apache/sis/metadata/TreeNodeChildrenTest.java | 18 ++-- .../metadata/iso/citation/DefaultContactTest.java | 2 +- .../test/org/apache/sis/util/iso/TypesTest.java| 22 ++--- .../apache/sis/io/wkt/GeodeticObjectParser.java| 4 +- .../sis/referencing/cs/DirectionAlongMeridian.java | 2 +- .../referencing/internal/VerticalDatumTypes.java | 7 +- .../apache/sis/storage/netcdf/MetadataReader.java | 12 ++- .../org/apache/sis/storage/netcdf/base/Axis.java | 4 +- .../org/apache/sis/converter/StringConverter.java | 10 +- .../apache/sis/util/collection/CodeListSet.java| 5 +- .../main/org/apache/sis/util/privy/CodeLists.java | 106 - .../sis/util/collection/CodeListSetTest.java | 2 +- .../apache/sis/util/collection/LargeCodeList.java | 31 +++--- geoapi/snapshot| 2 +- .../apache/sis/map/service/GraphicsPortrayer.java | 37 ++- .../apache/sis/map/service/RenderingException.java | 2 +- .../main/org/apache/sis/map/service/Scene2D.java | 54 ++- .../org/apache/sis/map/service/StylePainter.java | 40 +++- .../org/apache/sis/map/service/se1/SEPainter.java | 15 ++- .../sis/map/service/GraphicsPortrayerTest.java | 45 - .../gui/referencing/PositionableProjection.java| 48 +++--- .../apache/sis/gui/referencing/package-info.java | 2 +- 31 files changed, 450 insertions(+), 219 deletions(-)
(sis) 01/01: Merge branch 'geoapi-4.0' into geoapi-3.1.
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-3.1 in repository https://gitbox.apache.org/repos/asf/sis.git commit b8b49e9bc23a69c2f35e915e4cc77ff78cc7c40e Merge: 9048ae55d3 dca5af8fc9 Author: Martin Desruisseaux AuthorDate: Tue Mar 12 18:58:07 2024 +0100 Merge branch 'geoapi-4.0' into geoapi-3.1. .../metadata/iso/distribution/DefaultMedium.java | 2 +- .../apache/sis/metadata/sql/MetadataFallback.java | 9 +- .../apache/sis/metadata/sql/MetadataSource.java| 14 ++- .../main/org/apache/sis/util/iso/Types.java| 78 +-- .../apache/sis/xml/bind/cat/CodeListAdapter.java | 10 +- .../sis/xml/bind/gco/GO_CharacterString.java | 24 +++-- .../apache/sis/xml/bind/gml/CodeListAdapter.java | 11 ++- .../apache/sis/xml/bind/gml/SC_VerticalCRS.java| 2 +- .../sis/xml/bind/metadata/replace/SensorType.java | 49 ++ .../apache/sis/metadata/TreeNodeChildrenTest.java | 18 ++-- .../metadata/iso/citation/DefaultContactTest.java | 2 +- .../test/org/apache/sis/util/iso/TypesTest.java| 22 ++--- .../apache/sis/io/wkt/GeodeticObjectParser.java| 4 +- .../sis/referencing/cs/DirectionAlongMeridian.java | 2 +- .../referencing/internal/VerticalDatumTypes.java | 7 +- .../apache/sis/storage/netcdf/MetadataReader.java | 12 ++- .../org/apache/sis/storage/netcdf/base/Axis.java | 4 +- .../org/apache/sis/converter/StringConverter.java | 10 +- .../apache/sis/util/collection/CodeListSet.java| 5 +- .../main/org/apache/sis/util/privy/CodeLists.java | 106 - .../sis/util/collection/CodeListSetTest.java | 2 +- .../apache/sis/util/collection/LargeCodeList.java | 31 +++--- geoapi/snapshot| 2 +- .../apache/sis/map/service/GraphicsPortrayer.java | 37 ++- .../apache/sis/map/service/RenderingException.java | 2 +- .../main/org/apache/sis/map/service/Scene2D.java | 54 ++- .../org/apache/sis/map/service/StylePainter.java | 40 +++- .../org/apache/sis/map/service/se1/SEPainter.java | 15 ++- .../sis/map/service/GraphicsPortrayerTest.java | 45 - .../gui/referencing/PositionableProjection.java| 48 +++--- .../apache/sis/gui/referencing/package-info.java | 2 +- 31 files changed, 450 insertions(+), 219 deletions(-) diff --cc endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/distribution/DefaultMedium.java index e3c2ed9667,faf89f0a1c..4b41ed32eb --- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/distribution/DefaultMedium.java +++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/distribution/DefaultMedium.java @@@ -434,12 -422,7 +434,12 @@@ public class DefaultMedium extends ISOM /** * Sets the name of the medium on which the resource can be received. */ -private void setLegacyName(final MediumName newValue) { -name = newValue; +private void setNewName(final Citation newValue) { +if (newValue != null) { +final InternationalString title = newValue.getTitle(); +if (title != null) { - name = CodeLists.forName(MediumName.class, title.toString(), false); ++name = CodeLists.forCodeName(MediumName.class, title.toString()); +} +} } } diff --cc endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/cat/CodeListAdapter.java index 97a095e51f,9adc3ef22a..4de8e1f5e3 --- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/cat/CodeListAdapter.java +++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/xml/bind/cat/CodeListAdapter.java @@@ -18,9 -18,9 +18,10 @@@ package org.apache.sis.xml.bind.cat import jakarta.xml.bind.annotation.adapters.XmlAdapter; import org.opengis.util.CodeList; - import org.apache.sis.util.iso.Types; + import org.apache.sis.util.privy.CodeLists; import org.apache.sis.xml.bind.Context; import org.apache.sis.xml.bind.FilterByVersion; ++import org.apache.sis.util.iso.Types; /** diff --cc geoapi/snapshot index 3d58e2c44d,b2c419d046..bd981a850c --- a/geoapi/snapshot +++ b/geoapi/snapshot @@@ -1,1 -1,1 +1,1 @@@ - Subproject commit 3d58e2c44d64d0b84df243363f1ee1e571b081fd -Subproject commit b2c419d046315ef580eb8eb746bb20361df79f7d ++Subproject commit bd981a850cb1c23962d8db960580a31348a24347
(sis) branch geoapi-4.0 updated: Update for a change in the way that CodeList are constructed in GeoAPI. https://github.com/opengeospatial/geoapi/issues/91
This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git The following commit(s) were added to refs/heads/geoapi-4.0 by this push: new dca5af8fc9 Update for a change in the way that CodeList are constructed in GeoAPI. https://github.com/opengeospatial/geoapi/issues/91 dca5af8fc9 is described below commit dca5af8fc9a814c96f65c11b408c66616ee7c325 Author: Martin Desruisseaux AuthorDate: Tue Mar 12 17:24:36 2024 +0100 Update for a change in the way that CodeList are constructed in GeoAPI. https://github.com/opengeospatial/geoapi/issues/91 --- .../apache/sis/metadata/iso/legacy/MediumName.java | 77 ++- .../apache/sis/metadata/sql/MetadataFallback.java | 9 +- .../apache/sis/metadata/sql/MetadataSource.java| 14 ++- .../main/org/apache/sis/util/iso/Types.java| 78 +-- .../apache/sis/xml/bind/cat/CodeListAdapter.java | 9 +- .../sis/xml/bind/gco/GO_CharacterString.java | 24 +++-- .../apache/sis/xml/bind/gml/CodeListAdapter.java | 11 ++- .../apache/sis/xml/bind/gml/SC_VerticalCRS.java| 2 +- .../sis/xml/bind/metadata/replace/SensorType.java | 49 ++ .../apache/sis/metadata/TreeNodeChildrenTest.java | 18 ++-- .../metadata/iso/citation/DefaultContactTest.java | 2 +- .../test/org/apache/sis/util/iso/TypesTest.java| 22 ++--- .../apache/sis/io/wkt/GeodeticObjectParser.java| 4 +- .../sis/referencing/cs/DirectionAlongMeridian.java | 2 +- .../referencing/internal/VerticalDatumTypes.java | 7 +- .../apache/sis/storage/netcdf/MetadataReader.java | 12 ++- .../org/apache/sis/storage/netcdf/base/Axis.java | 4 +- .../org/apache/sis/converter/StringConverter.java | 10 +- .../apache/sis/util/collection/CodeListSet.java| 5 +- .../main/org/apache/sis/util/privy/CodeLists.java | 106 - .../sis/util/collection/CodeListSetTest.java | 2 +- .../apache/sis/util/collection/LargeCodeList.java | 31 +++--- geoapi/snapshot| 2 +- .../gui/referencing/PositionableProjection.java| 48 +++--- .../apache/sis/gui/referencing/package-info.java | 2 +- 25 files changed, 290 insertions(+), 260 deletions(-) diff --git a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/legacy/MediumName.java b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/legacy/MediumName.java index 14d6ad1afd..6901065c3c 100644 --- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/legacy/MediumName.java +++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/legacy/MediumName.java @@ -16,15 +16,12 @@ */ package org.apache.sis.metadata.iso.legacy; -import java.util.List; -import java.util.ArrayList; import org.opengis.annotation.UML; import org.opengis.metadata.citation.Citation; import org.opengis.util.CodeList; import org.opengis.util.InternationalString; import static org.opengis.annotation.Obligation.*; import static org.opengis.annotation.Specification.*; -import org.apache.sis.util.privy.CodeLists; import org.apache.sis.util.iso.Types; @@ -42,84 +39,86 @@ public final class MediumName extends CodeList implements Citation { /** Serial number for compatibility with different versions. */ private static final long serialVersionUID = 7157038832444373933L; -/** List of all enumerations of this type. */ -private static final List VALUES = new ArrayList<>(18); +/* + * We need to construct values with `valueOf(String)` instead of the constructor + * because this package is not exported to GeoAPI. See `CodeList` class javadoc. + */ /** Read-only optical disk. */ @UML(identifier="cdRom", obligation=CONDITIONAL, specification=ISO_19115) -public static final MediumName CD_ROM = new MediumName("CD_ROM"); +public static final MediumName CD_ROM = valueOf("CD_ROM"); /** Digital versatile disk. */ @UML(identifier="dvd", obligation=CONDITIONAL, specification=ISO_19115) -public static final MediumName DVD = new MediumName("DVD"); +public static final MediumName DVD = valueOf("DVD"); /** Digital versatile disk digital versatile disk, read only. */ @UML(identifier="dvdRom", obligation=CONDITIONAL, specification=ISO_19115) -public static final MediumName DVD_ROM = new MediumName("DVD_ROM"); +public static final MediumName DVD_ROM = valueOf("DVD_ROM"); /** 3½ inch magnetic disk. */ @UML(identifier="3halfInchFloppy", obligation=CONDITIONAL, specification=ISO_19115) -public static final MediumName FLOPPY_3_HALF_INCH = new MediumName("FLOPPY_3_HALF_INCH"); +public static final MediumName FLOPPY_3_HALF_INCH = valueOf("FLOPPY_3_HALF_INCH"); /** 5¼ inch magnetic disk. */ @UML(identifier="5quarterInchFloppy", obligation=CONDITIONAL,