sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 01/01: Merge branch 'geoapi-3.1'
Date Sat, 07 Sep 2019 16:13:41 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sis.git

commit e6937d1ac129eab5167f433c6482fdba4b2fce06
Merge: bd04498 5db8d26
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Sat Sep 7 18:13:19 2019 +0200

    Merge branch 'geoapi-3.1'

 .../org/apache/sis/console/TransformCommand.java   |   3 +-
 .../java/org/apache/sis/internal/jaxb/Context.java |  13 +-
 .../apache/sis/metadata/sql/MetadataSource.java    |   6 +
 .../src/main/java/org/apache/sis/xml/Pooled.java   |  12 +-
 .../src/main/java/org/apache/sis/xml/XML.java      |  16 +
 .../metadata/iso/citation/DefaultContactTest.java  |  20 +-
 .../identification/DefaultBrowseGraphicTest.java   |  17 +-
 .../main/java/org/apache/sis/referencing/CRS.java  |  41 +-
 .../org/apache/sis/internal/system/Modules.java    |   5 +
 .../java/org/apache/sis/util/logging/Logging.java  |  18 +-
 .../apache/sis/util/logging/QuietLogRecord.java    |   3 +
 .../apache/sis/util/logging/WarningListener.java   |  19 +-
 .../apache/sis/util/logging/WarningListeners.java  |  16 +-
 .../sis/util/logging/EmptyWarningListeners.java    |  71 ---
 .../sis/util/logging/WarningListenersTest.java     |   1 +
 pom.xml                                            |   1 -
 .../storage/earthobservation/LandsatReader.java    |  13 +-
 .../sis/storage/earthobservation/LandsatStore.java |  30 +-
 .../earthobservation/LandsatReaderTest.java        |   7 +-
 .../apache/sis/storage/geotiff/GeoTiffStore.java   |  40 +-
 .../sis/storage/geotiff/ImageFileDirectory.java    |   2 +-
 .../org/apache/sis/internal/netcdf/Decoder.java    |   7 +-
 .../sis/internal/netcdf/DiscreteSampling.java      |   7 +-
 .../apache/sis/internal/netcdf/NamedElement.java   |   4 +-
 .../sis/internal/netcdf/impl/ChannelDecoder.java   |  13 +-
 .../sis/internal/netcdf/impl/FeaturesInfo.java     |   6 +-
 .../sis/internal/netcdf/ucar/DecoderWrapper.java   |  15 +-
 .../sis/internal/netcdf/ucar/FeaturesWrapper.java  |   5 +-
 .../sis/internal/netcdf/ucar/LogAdapter.java       |  11 +-
 .../apache/sis/storage/netcdf/MetadataReader.java  |   9 +-
 .../org/apache/sis/storage/netcdf/NetcdfStore.java |  30 +-
 .../sis/storage/netcdf/NetcdfStoreProvider.java    |   8 +-
 .../org/apache/sis/internal/netcdf/TestCase.java   |  11 +-
 .../internal/netcdf/impl/ChannelDecoderTest.java   |   3 +-
 .../storage/netcdf/NetcdfStoreProviderTest.java    |   9 +-
 .../apache/sis/internal/shapefile/AutoChecker.java |   4 +-
 .../internal/shapefile/ShapefileByteReader.java    |   2 +-
 .../sis/storage/shapefile/InputFeatureStream.java  |   2 +-
 .../jdbc/AbstractTestBaseForInternalJDBC.java      |   2 +-
 .../sis/storage/shapefile/ShapeFileTest.java       |   4 +-
 .../apache/sis/internal/sql/feature/Analyzer.java  |   7 +-
 .../apache/sis/internal/sql/feature/Database.java  |   5 +-
 .../java/org/apache/sis/storage/sql/SQLStore.java  |  30 +-
 .../sis/internal/storage/AbstractFeatureSet.java   |  22 +-
 .../sis/internal/storage/AbstractGridResource.java |  22 +-
 .../sis/internal/storage/AbstractResource.java     |  95 +--
 .../internal/storage/DocumentedStoreProvider.java  |   7 +-
 .../sis/internal/storage/MemoryFeatureSet.java     |  11 +-
 .../apache/sis/internal/storage/URIDataStore.java  |  31 +-
 .../org/apache/sis/internal/storage/csv/Store.java |   4 +-
 .../apache/sis/internal/storage/folder/Store.java  |  32 +-
 .../sis/internal/storage/io/ChannelFactory.java    |  33 +-
 .../sis/internal/storage/query/FeatureSubset.java  |  13 +-
 .../sis/internal/storage/wkt/StoreFormat.java      |  16 +-
 .../org/apache/sis/internal/storage/xml/Store.java |  39 +-
 .../java/org/apache/sis/storage/DataStore.java     |  90 ++-
 .../org/apache/sis/storage/DataStoreProvider.java  |  22 +
 .../main/java/org/apache/sis/storage/Resource.java |  62 +-
 .../org/apache/sis/storage/event/ChangeEvent.java  |  60 --
 .../apache/sis/storage/event/ChangeListener.java   |  54 --
 .../apache/sis/storage/event}/QuietLogRecord.java  |  14 +-
 .../org/apache/sis/storage/event/StoreEvent.java   |  91 +++
 .../apache/sis/storage/event/StoreListener.java    |  56 ++
 .../apache/sis/storage/event/StoreListeners.java   | 673 +++++++++++++++++++++
 .../org/apache/sis/storage/event/WarningEvent.java |  90 +++
 .../org/apache/sis/storage/event/package-info.java |  18 +-
 .../internal/storage/AbstractGridResourceTest.java |   3 -
 .../java/org/apache/sis/storage/DataStoreMock.java |  40 +-
 .../sis/storage/event/StoreListenersTest.java      | 109 ++++
 .../apache/sis/test/suite/StorageTestSuite.java    |   1 +
 .../internal/storage/xml/stream/StaxDataStore.java |  29 +-
 71 files changed, 1577 insertions(+), 708 deletions(-)

diff --cc core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultContactTest.java
index eb37c03,e4c0dbe..0261fae
--- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultContactTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultContactTest.java
@@@ -18,11 -18,11 +18,11 @@@ package org.apache.sis.metadata.iso.cit
  
  import java.util.Arrays;
  import java.util.Collection;
+ import java.util.logging.Filter;
  import java.util.logging.LogRecord;
  import org.opengis.metadata.citation.Telephone;
 -import org.opengis.metadata.citation.TelephoneType;
  import org.apache.sis.internal.jaxb.Context;
 +import org.apache.sis.internal.geoapi.evolution.UnsupportedCodeList;
- import org.apache.sis.util.logging.WarningListener;
  import org.apache.sis.test.DependsOnMethod;
  import org.apache.sis.test.xml.TestCase;
  import org.junit.Test;
diff --cc storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
index fe65059,5e0567f..d7c66ca
--- a/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
+++ b/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
@@@ -21,12 -20,20 +20,11 @@@ import java.util.regex.Matcher
  import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStreamReader;
+ import org.apache.sis.internal.storage.AbstractResource;
  import org.opengis.metadata.Metadata;
 -import org.opengis.metadata.acquisition.Context;
 -import org.opengis.metadata.acquisition.OperationType;
 -import org.opengis.metadata.citation.DateType;
 -import org.opengis.metadata.content.CoverageContentType;
 -import org.opengis.metadata.content.TransferFunctionType;
 -import org.opengis.metadata.identification.Progress;
 -import org.opengis.metadata.identification.TopicCategory;
 -import org.opengis.metadata.maintenance.ScopeCode;
 -import org.opengis.metadata.spatial.DimensionNameType;
  import org.opengis.util.FactoryException;
 -import org.opengis.test.dataset.ContentVerifier;
 +import org.apache.sis.metadata.iso.DefaultMetadata;
  import org.apache.sis.storage.DataStoreException;
- import org.apache.sis.util.logging.EmptyWarningListeners;
- import org.apache.sis.internal.system.Modules;
  import org.apache.sis.test.TestCase;
  import org.junit.Test;
  
diff --cc storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java
index bb5dff6,ecbc331..c98525a
--- a/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java
+++ b/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java
@@@ -189,10 -198,10 +198,10 @@@ public class GeoTiffStore extends DataS
                  builder.setFormat(Constants.GEOTIFF);
              } catch (MetadataStoreException e) {
                  builder.addFormatName(Constants.GEOTIFF);
-                 warning(null, e);
+                 listeners.warning(e);
              }
              builder.addEncoding(encoding, MetadataBuilder.Scope.METADATA);
 -            builder.addResourceScope(ScopeCode.COVERAGE, null);
 +            builder.addResourceScope(ScopeCode.valueOf("COVERAGE"), null);
              final Locale locale = getLocale();
              int n = 0;
              try {
diff --cc storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
index f58e8b7,dafd338..e47d42c
--- a/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
+++ b/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
@@@ -49,10 -50,8 +49,9 @@@ import org.opengis.referencing.crs.Vert
  import org.opengis.referencing.crs.CoordinateReferenceSystem;
  
  import org.apache.sis.util.iso.Types;
 +import org.apache.sis.util.iso.DefaultNameFactory;
- import org.apache.sis.util.logging.WarningListeners;
- import org.apache.sis.storage.DataStore;
  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.*;
diff --cc storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/TestCase.java
index 917d4fa,fc8365a..2db1bb0
--- a/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/TestCase.java
+++ b/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/TestCase.java
@@@ -22,12 -22,11 +22,10 @@@ import java.util.EnumMap
  import java.util.Iterator;
  import java.io.IOException;
  import java.lang.reflect.UndeclaredThrowableException;
- import org.apache.sis.storage.DataStore;
  import org.apache.sis.storage.DataStoreException;
- import org.apache.sis.util.logging.EmptyWarningListeners;
+ import org.apache.sis.internal.storage.AbstractResource;
  import org.apache.sis.internal.netcdf.ucar.DecoderWrapper;
- import org.apache.sis.internal.system.Modules;
  import org.apache.sis.setup.GeometryLibrary;
 -import org.opengis.test.dataset.TestData;
  import ucar.nc2.dataset.NetcdfDataset;
  import ucar.nc2.NetcdfFile;
  import org.junit.AfterClass;
diff --cc storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java
index 19114d4,a18cf5e..2488cac
--- a/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java
+++ b/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java
@@@ -20,9 -20,9 +20,10 @@@ import java.io.IOException
  import java.io.InputStream;
  import java.nio.ByteBuffer;
  import java.nio.channels.Channels;
 +import org.apache.sis.internal.netcdf.TestData;
  import org.apache.sis.internal.netcdf.Decoder;
  import org.apache.sis.internal.netcdf.DecoderTest;
+ import org.apache.sis.internal.storage.AbstractResource;
  import org.apache.sis.internal.storage.io.ChannelDataInput;
  import org.apache.sis.storage.DataStoreException;
  import org.apache.sis.setup.GeometryLibrary;
diff --cc storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/ShapeFileTest.java
index 0e790cd,6605b24..ad42bdf
--- a/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/ShapeFileTest.java
+++ b/storage/sis-shapefile/src/test/java/org/apache/sis/storage/shapefile/ShapeFileTest.java
@@@ -118,12 -117,12 +118,12 @@@ public final strictfp class ShapeFileTe
       @Test @Ignore // TODO Adapt with another shapefile.
       public void testHandleEofNotification() throws URISyntaxException, DataStoreException
{
           ShapeFile shp = new ShapeFile(path("DEPARTEMENT.SHP"));
 -         Feature first = null, last = null;
 +         AbstractFeature first = null, last = null;
  
-          Logger log = org.apache.sis.util.logging.Logging.getLogger(ShapeFileTest.class.getName());
+          Logger log = org.apache.sis.util.logging.Logging.getLogger(ShapeFileTest.class);
  
           try(InputFeatureStream is = shp.findAll()) {
 -             Feature feature = is.readFeature();
 +             AbstractFeature feature = is.readFeature();
  
               // Read and retain the first and the last feature.
               while(feature != null) {
diff --cc storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractFeatureSet.java
index 30a4767,e07f19b..b685e9a
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractFeatureSet.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractFeatureSet.java
@@@ -21,11 -22,10 +22,10 @@@ import org.opengis.util.GenericName
  import org.apache.sis.storage.DataStore;
  import org.apache.sis.storage.DataStoreException;
  import org.apache.sis.storage.FeatureSet;
- import org.apache.sis.util.logging.WarningListeners;
- import org.opengis.util.GenericName;
+ import org.apache.sis.storage.event.StoreListeners;
  
  // Branch-dependent imports
 -import org.opengis.feature.FeatureType;
 +import org.apache.sis.feature.DefaultFeatureType;
  
  
  /**
diff --cc storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MemoryFeatureSet.java
index 2eebff6,061bbdf..451e3de
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MemoryFeatureSet.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MemoryFeatureSet.java
@@@ -19,13 -19,12 +19,12 @@@ package org.apache.sis.internal.storage
  import java.util.Collection;
  import java.util.OptionalLong;
  import java.util.stream.Stream;
- import org.apache.sis.storage.DataStore;
+ import org.apache.sis.storage.event.StoreListeners;
  import org.apache.sis.util.ArgumentChecks;
- import org.apache.sis.util.logging.WarningListeners;
  
  // Branch-dependent imports
 -import org.opengis.feature.Feature;
 -import org.opengis.feature.FeatureType;
 +import org.apache.sis.feature.AbstractFeature;
 +import org.apache.sis.feature.DefaultFeatureType;
  
  
  /**
@@@ -52,17 -51,15 +51,17 @@@ public class MemoryFeatureSet extends A
  
      /**
       * Creates a new set of features stored in memory. It is caller responsibility to ensure
that
 -     * <code>{@linkplain Feature#getType()} == type</code> for all elements
in the given collection
 +     * <code>{@linkplain AbstractFeature#getType()} == type</code> for all elements
in the given collection
       * (this is not verified).
       *
-      * @param listeners  the set of registered warning listeners for the data store, or
{@code null} if none.
+      * @param parent     listeners of the parent resource, or {@code null} if none.
       * @param type       the type of all features in the given collection.
       * @param features   collection of stored features. This collection will not be copied.
       */
-     public MemoryFeatureSet(final WarningListeners<DataStore> listeners,
 -    public MemoryFeatureSet(final StoreListeners parent, final FeatureType type, final Collection<Feature>
features) {
++    public MemoryFeatureSet(final StoreListeners parent,
 +                            final DefaultFeatureType type, final Collection<AbstractFeature>
features)
-     {
-         super(listeners);
++{
+         super(parent);
          ArgumentChecks.ensureNonNull("type",     type);
          ArgumentChecks.ensureNonNull("features", features);
          this.type     = type;
diff --cc storage/sis-storage/src/main/java/org/apache/sis/internal/storage/query/FeatureSubset.java
index 33b87d0,2a2b887..563f30e
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/query/FeatureSubset.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/query/FeatureSubset.java
@@@ -16,18 -16,23 +16,17 @@@
   */
  package org.apache.sis.internal.storage.query;
  
- import java.util.Optional;
 -import java.util.List;
  import java.util.stream.Stream;
- import org.opengis.util.GenericName;
 -import org.apache.sis.internal.feature.FeatureUtilities;
  import org.apache.sis.internal.storage.AbstractFeatureSet;
  import org.apache.sis.internal.storage.Resources;
 -import org.apache.sis.filter.InvalidExpressionException;
  import org.apache.sis.storage.DataStoreContentException;
  import org.apache.sis.storage.DataStoreException;
  import org.apache.sis.storage.FeatureSet;
+ import org.apache.sis.storage.event.StoreListeners;
  
  // Branch-dependent imports
 -import org.opengis.feature.Feature;
 -import org.opengis.feature.FeatureType;
 -import org.opengis.filter.Filter;
 -import org.opengis.filter.sort.SortBy;
 -import org.opengis.filter.expression.Expression;
 +import org.apache.sis.feature.AbstractFeature;
 +import org.apache.sis.feature.DefaultFeatureType;
  
  
  /**
diff --cc storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java
index 53461b3,194a435..59905cf
--- a/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java
@@@ -36,10 -35,10 +35,13 @@@ import org.apache.sis.internal.storage.
  import org.apache.sis.internal.storage.Resources;
  import org.apache.sis.internal.util.Strings;
  import org.apache.sis.referencing.NamedIdentifier;
+ import org.apache.sis.storage.event.StoreEvent;
+ import org.apache.sis.storage.event.StoreListener;
+ import org.apache.sis.storage.event.StoreListeners;
  
 +// Branch-specific imports
 +import org.opengis.referencing.ReferenceIdentifier;
 +
  
  /**
   * Manages a series of features, coverages or sensor data.


Mime
View raw message