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
commit bcbc83338d446d6a546f04259379229a906f6f54 Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Fri Aug 25 17:16:44 2023 +0200 Add comment on the left side of UCAR imports. The previous comment on top of them is lost during import reorganization. --- .../apache/sis/storage/netcdf/AttributeNames.java | 8 +++--- .../apache/sis/storage/netcdf/MetadataReader.java | 30 ++++++++++------------ .../org/apache/sis/storage/netcdf/NetcdfStore.java | 16 ++++++------ .../org/apache/sis/storage/netcdf/base/Axis.java | 14 +++++----- .../apache/sis/storage/netcdf/base/AxisType.java | 2 +- .../apache/sis/storage/netcdf/base/Convention.java | 6 ++--- .../apache/sis/storage/netcdf/base/Decoder.java | 6 ++--- .../apache/sis/storage/netcdf/base/FeatureSet.java | 14 +++++----- .../sis/storage/netcdf/base/GridMapping.java | 4 +-- .../apache/sis/storage/netcdf/base/Variable.java | 8 +++--- .../sis/storage/netcdf/classic/GridInfo.java | 2 +- .../sis/storage/netcdf/classic/VariableInfo.java | 4 +-- 12 files changed, 56 insertions(+), 58 deletions(-) diff --git a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/AttributeNames.java b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/AttributeNames.java index 6ca3e79f6f..ca8b70174b 100644 --- a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/AttributeNames.java +++ b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/AttributeNames.java @@ -24,10 +24,10 @@ package org.apache.sis.storage.netcdf; * have no dependency to the UCAR packages. */ import java.io.Serializable; -import ucar.nc2.NetcdfFile; -import ucar.nc2.VariableSimpleIF; -import ucar.nc2.constants.CF; -import ucar.nc2.constants.ACDD; +import ucar.nc2.NetcdfFile; // For Javadoc only. +import ucar.nc2.VariableSimpleIF; // For Javadoc only. +import ucar.nc2.constants.CF; // String constants are copied by the compiler with no UCAR reference left. +import ucar.nc2.constants.ACDD; // idem import org.opengis.metadata.Metadata; import org.opengis.metadata.Identifier; import org.opengis.metadata.citation.*; diff --git a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/MetadataReader.java b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/MetadataReader.java index d97fc4fa82..e6e41ee997 100644 --- a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/MetadataReader.java +++ b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/MetadataReader.java @@ -45,42 +45,40 @@ import org.opengis.metadata.constraint.Restriction; import org.opengis.referencing.cs.AxisDirection; import org.opengis.referencing.crs.VerticalCRS; import org.opengis.referencing.crs.CoordinateReferenceSystem; -import org.apache.sis.util.CharSequences; -import org.apache.sis.util.iso.Types; -import org.apache.sis.storage.DataStoreException; -import org.apache.sis.storage.event.StoreListeners; import org.apache.sis.metadata.iso.DefaultMetadata; import org.apache.sis.metadata.iso.citation.*; import org.apache.sis.metadata.iso.identification.*; import org.apache.sis.metadata.sql.MetadataStoreException; +import org.apache.sis.storage.DataStoreException; +import org.apache.sis.storage.base.MetadataBuilder; +import org.apache.sis.storage.event.StoreListeners; import org.apache.sis.storage.netcdf.base.Axis; import org.apache.sis.storage.netcdf.base.Decoder; import org.apache.sis.storage.netcdf.base.Variable; import org.apache.sis.storage.netcdf.base.VariableRole; import org.apache.sis.storage.netcdf.base.Dimension; import org.apache.sis.storage.netcdf.base.Grid; -import org.apache.sis.io.stream.IOUtilities; -import org.apache.sis.storage.base.MetadataBuilder; import org.apache.sis.storage.wkt.StoreFormat; +import org.apache.sis.io.stream.IOUtilities; import org.apache.sis.referencing.CRS; import org.apache.sis.referencing.util.AxisDirections; import org.apache.sis.system.Configuration; +import org.apache.sis.util.CharSequences; +import org.apache.sis.util.iso.Types; import org.apache.sis.util.internal.CollectionsExt; import org.apache.sis.util.internal.Strings; import org.apache.sis.util.resources.Errors; import org.apache.sis.measure.Units; import org.apache.sis.math.Vector; -import ucar.nc2.constants.ACDD; -import ucar.nc2.constants.CDM; -import ucar.nc2.constants.CF; +import ucar.nc2.constants.CF; // String constants are copied by the compiler with no UCAR reference left. +import ucar.nc2.constants.CDM; // idem +import ucar.nc2.constants.ACDD; // idem import static org.apache.sis.storage.netcdf.AttributeNames.*; // Specific to the geoapi-3.1 and geoapi-4.0 branches: import org.opengis.util.NameFactory; -import static org.apache.sis.util.internal.CollectionsExt.first; - /** * Mapping from netCDF metadata to ISO 19115-2 metadata. The {@link String} constants declared in @@ -471,12 +469,12 @@ split: while ((start = CharSequences.skipLeadingWhitespaces(value, start, lengt Address address = null; OnlineResource resource = null; if (responsibility != null) { - final Party party = first(responsibility.getParties()); + final Party party = CollectionsExt.first(responsibility.getParties()); if (party != null) { - contact = first(party.getContactInfo()); + contact = CollectionsExt.first(party.getContactInfo()); if (contact != null) { - address = first(contact.getAddresses()); - resource = first(contact.getOnlineResources()); + address = CollectionsExt.first(contact.getAddresses()); + resource = CollectionsExt.first(contact.getOnlineResources()); } if (!canShare(resource, url)) { resource = null; @@ -492,7 +490,7 @@ split: while ((start = CharSequences.skipLeadingWhitespaces(value, start, lengt if (party instanceof Organisation) { // Individual (if any) is considered an organisation member. See comment in next block. if (!canShare(party.getName(), organisationName) || - !canShare(first(((Organisation) party).getIndividual()).getName(), individualName)) + !canShare(CollectionsExt.first(((Organisation) party).getIndividual()).getName(), individualName)) { responsibility = null; } diff --git a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/NetcdfStore.java b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/NetcdfStore.java index 57ce0c05c2..2b1a5a784b 100644 --- a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/NetcdfStore.java +++ b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/NetcdfStore.java @@ -35,22 +35,22 @@ import org.apache.sis.storage.StorageConnector; import org.apache.sis.storage.Aggregate; import org.apache.sis.storage.DataStoreClosedException; import org.apache.sis.storage.Resource; +import org.apache.sis.storage.base.URIDataStore; import org.apache.sis.storage.netcdf.base.Decoder; import org.apache.sis.storage.netcdf.base.RasterResource; -import org.apache.sis.storage.base.URIDataStore; -import org.apache.sis.util.CharSequences; -import org.apache.sis.util.Version; -import org.apache.sis.util.internal.UnmodifiableArrayList; -import org.apache.sis.util.internal.Strings; -import org.apache.sis.setup.OptionKey; import org.apache.sis.storage.event.StoreEvent; import org.apache.sis.storage.event.StoreListener; import org.apache.sis.storage.event.WarningEvent; +import org.apache.sis.setup.OptionKey; +import org.apache.sis.util.Version; +import org.apache.sis.util.CharSequences; +import org.apache.sis.util.internal.Strings; +import org.apache.sis.util.internal.UnmodifiableArrayList; import org.apache.sis.util.collection.DefaultTreeTable; import org.apache.sis.util.collection.TableColumn; import org.apache.sis.util.collection.TreeTable; -import ucar.nc2.constants.ACDD; -import ucar.nc2.constants.CDM; +import ucar.nc2.constants.ACDD; // String constants are copied by the compiler with no UCAR reference left. +import ucar.nc2.constants.CDM; // idem /** diff --git a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Axis.java b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Axis.java index 7fe982bc95..25ecc76030 100644 --- a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Axis.java +++ b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Axis.java @@ -37,17 +37,17 @@ import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.MathTransformFactory; import org.opengis.referencing.operation.TransformException; import org.opengis.metadata.content.TransferFunctionType; +import org.apache.sis.metadata.iso.citation.Citations; import org.apache.sis.referencing.NamedIdentifier; import org.apache.sis.referencing.util.AxisDirections; -import org.apache.sis.util.ArraysExt; -import org.apache.sis.util.internal.Numerics; -import org.apache.sis.storage.DataStoreException; -import org.apache.sis.storage.netcdf.internal.Resources; import org.apache.sis.referencing.operation.builder.LocalizationGridException; import org.apache.sis.referencing.operation.builder.LocalizationGridBuilder; import org.apache.sis.referencing.operation.transform.TransferFunction; import org.apache.sis.referencing.operation.transform.MathTransforms; -import org.apache.sis.metadata.iso.citation.Citations; +import org.apache.sis.storage.DataStoreException; +import org.apache.sis.storage.netcdf.internal.Resources; +import org.apache.sis.util.ArraysExt; +import org.apache.sis.util.internal.Numerics; import org.apache.sis.util.resources.Errors; import org.apache.sis.util.collection.Cache; import org.apache.sis.util.iso.Types; @@ -55,8 +55,8 @@ import org.apache.sis.measure.Longitude; import org.apache.sis.measure.Latitude; import org.apache.sis.measure.Units; import org.apache.sis.math.Vector; -import ucar.nc2.constants.CDM; -import ucar.nc2.constants.CF; +import ucar.nc2.constants.CDM; // String constants are copied by the compiler with no UCAR reference left. +import ucar.nc2.constants.CF; // idem /** diff --git a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/AxisType.java b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/AxisType.java index 00dccafe8e..77e18469a6 100644 --- a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/AxisType.java +++ b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/AxisType.java @@ -23,7 +23,7 @@ import org.opengis.referencing.cs.AxisDirection; import org.apache.sis.referencing.util.AxisDirections; import org.apache.sis.measure.Units; import javax.measure.Unit; -import ucar.nc2.constants.CF; +import ucar.nc2.constants.CF; // String constants are copied by the compiler with no UCAR reference left. /** diff --git a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Convention.java b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Convention.java index e8ea84afdc..438174bd69 100644 --- a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Convention.java +++ b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Convention.java @@ -36,14 +36,14 @@ import org.apache.sis.referencing.operation.transform.TransferFunction; import org.apache.sis.referencing.datum.BursaWolfParameters; import org.apache.sis.coverage.Category; import org.apache.sis.coverage.grid.j2d.ColorModelFactory; -import org.apache.sis.system.Reflect; import org.apache.sis.measure.MeasurementRange; import org.apache.sis.measure.NumberRange; import org.apache.sis.math.Vector; import org.apache.sis.util.Numbers; import org.apache.sis.util.resources.Errors; -import ucar.nc2.constants.CDM; -import ucar.nc2.constants.CF; +import org.apache.sis.system.Reflect; +import ucar.nc2.constants.CDM; // String constants are copied by the compiler with no UCAR reference left. +import ucar.nc2.constants.CF; // idem /** diff --git a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Decoder.java b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Decoder.java index 3adb598631..2b0a369054 100644 --- a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Decoder.java +++ b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Decoder.java @@ -33,6 +33,7 @@ import java.nio.file.Path; import org.opengis.util.NameSpace; import org.opengis.referencing.datum.Datum; import org.opengis.referencing.crs.CoordinateReferenceSystem; +import org.apache.sis.system.Modules; import org.apache.sis.setup.GeometryLibrary; import org.apache.sis.storage.DataStore; import org.apache.sis.storage.DataStoreException; @@ -44,10 +45,9 @@ import org.apache.sis.util.logging.Logging; import org.apache.sis.util.logging.PerformanceLevel; import org.apache.sis.util.collection.TreeTable; import org.apache.sis.util.internal.StandardDateFormat; -import org.apache.sis.system.Modules; -import org.apache.sis.referencing.util.ReferencingFactoryContainer; import org.apache.sis.util.iso.DefaultNameFactory; -import ucar.nc2.constants.CF; +import org.apache.sis.referencing.util.ReferencingFactoryContainer; +import ucar.nc2.constants.CF; // String constants are copied by the compiler with no UCAR reference left. // Specific to the geoapi-3.1 and geoapi-4.0 branches: import org.opengis.util.NameFactory; diff --git a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/FeatureSet.java b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/FeatureSet.java index 02d40f2aa5..9a214554b2 100644 --- a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/FeatureSet.java +++ b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/FeatureSet.java @@ -35,21 +35,21 @@ import org.opengis.util.FactoryException; import org.opengis.referencing.crs.SingleCRS; import org.opengis.referencing.crs.TemporalCRS; import org.opengis.metadata.acquisition.GeometryType; -import org.apache.sis.referencing.crs.DefaultTemporalCRS; -import org.apache.sis.coverage.grid.GridExtent; import org.apache.sis.system.Configuration; +import org.apache.sis.referencing.crs.DefaultTemporalCRS; import org.apache.sis.feature.internal.MovingFeatures; -import org.apache.sis.util.Characters; -import org.apache.sis.util.internal.Strings; -import org.apache.sis.storage.DataStore; -import org.apache.sis.storage.DataStoreException; import org.apache.sis.feature.builder.AttributeRole; import org.apache.sis.feature.builder.FeatureTypeBuilder; import org.apache.sis.feature.builder.AttributeTypeBuilder; +import org.apache.sis.coverage.grid.GridExtent; +import org.apache.sis.storage.DataStore; +import org.apache.sis.storage.DataStoreException; import org.apache.sis.storage.netcdf.internal.Resources; +import org.apache.sis.util.Characters; +import org.apache.sis.util.internal.Strings; import org.apache.sis.util.collection.BackingStoreException; import org.apache.sis.math.Vector; -import ucar.nc2.constants.CF; +import ucar.nc2.constants.CF; // String constants are copied by the compiler with no UCAR reference left. // Specific to the geoapi-3.1 and geoapi-4.0 branches: import org.opengis.feature.Feature; diff --git a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/GridMapping.java b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/GridMapping.java index 43808c1066..0aeaf8bedd 100644 --- a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/GridMapping.java +++ b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/GridMapping.java @@ -57,13 +57,13 @@ import org.apache.sis.referencing.datum.DefaultGeodeticDatum; import org.apache.sis.referencing.operation.matrix.Matrix3; import org.apache.sis.referencing.operation.transform.MathTransforms; import org.apache.sis.referencing.operation.transform.TransformSeparator; +import org.apache.sis.referencing.operation.provider.PseudoPlateCarree; import org.apache.sis.referencing.util.AxisDirections; import org.apache.sis.referencing.util.j2d.AffineTransform2D; import org.apache.sis.storage.DataStoreContentException; import org.apache.sis.storage.netcdf.internal.Resources; import org.apache.sis.coverage.grid.GridGeometry; import org.apache.sis.coverage.grid.GridExtent; -import org.apache.sis.referencing.operation.provider.PseudoPlateCarree; import org.apache.sis.system.Modules; import org.apache.sis.util.CharSequences; import org.apache.sis.util.ArraysExt; @@ -74,7 +74,7 @@ import org.apache.sis.util.resources.Errors; import org.apache.sis.io.wkt.WKTFormat; import org.apache.sis.io.wkt.Warnings; import org.apache.sis.measure.Units; -import ucar.nc2.constants.CF; +import ucar.nc2.constants.CF; // String constants are copied by the compiler with no UCAR reference left. // Specific to the geoapi-3.1 and geoapi-4.0 branches: import org.opengis.referencing.operation.CoordinateOperationFactory; diff --git a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Variable.java b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Variable.java index 70af3ff28d..5e1e9c3101 100644 --- a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Variable.java +++ b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/base/Variable.java @@ -31,6 +31,8 @@ import org.apache.sis.referencing.operation.transform.TransferFunction; import org.apache.sis.storage.DataStoreException; import org.apache.sis.storage.DataStoreContentException; import org.apache.sis.storage.InternalDataStoreException; +import org.apache.sis.storage.netcdf.AttributeNames; +import org.apache.sis.storage.netcdf.internal.Resources; import org.apache.sis.coverage.grid.GridGeometry; import org.apache.sis.coverage.grid.GridExtent; import org.apache.sis.math.Vector; @@ -43,11 +45,9 @@ import org.apache.sis.util.collection.WeakHashSet; import org.apache.sis.util.internal.Numerics; import org.apache.sis.util.internal.CollectionsExt; import org.apache.sis.util.internal.UnmodifiableArrayList; -import org.apache.sis.storage.netcdf.AttributeNames; -import org.apache.sis.storage.netcdf.internal.Resources; import org.apache.sis.util.resources.Errors; -import ucar.nc2.constants.CDM; // We use only String constants. -import ucar.nc2.constants.CF; +import ucar.nc2.constants.CDM; // String constants are copied by the compiler with no UCAR reference left. +import ucar.nc2.constants.CF; // idem import static org.apache.sis.storage.base.StoreUtilities.ALLOW_LAST_RESORT_STATISTICS; diff --git a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/classic/GridInfo.java b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/classic/GridInfo.java index 1439418c89..cc7d5604b8 100644 --- a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/classic/GridInfo.java +++ b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/classic/GridInfo.java @@ -31,7 +31,7 @@ import org.apache.sis.storage.netcdf.base.Dimension; import org.apache.sis.storage.netcdf.internal.Resources; import org.apache.sis.util.ArraysExt; import org.apache.sis.util.internal.UnmodifiableArrayList; -import ucar.nc2.constants.CF; +import ucar.nc2.constants.CF; // String constants are copied by the compiler with no UCAR reference left. /** diff --git a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/classic/VariableInfo.java b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/classic/VariableInfo.java index 79fe12291b..7186c80102 100644 --- a/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/classic/VariableInfo.java +++ b/endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/classic/VariableInfo.java @@ -29,8 +29,8 @@ import java.nio.charset.Charset; import java.time.format.DateTimeParseException; import javax.measure.Unit; import javax.measure.format.MeasurementParseException; -import ucar.nc2.constants.CF; -import ucar.nc2.constants.CDM; +import ucar.nc2.constants.CF; // String constants are copied by the compiler with no UCAR reference left. +import ucar.nc2.constants.CDM; // idem import ucar.nc2.constants._Coordinate; import org.apache.sis.coverage.grid.GridExtent; import org.apache.sis.storage.DataStoreException;