sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject svn commit: r1828058 - in /sis/branches/JDK8/storage: sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/ sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/ sis-sto...
Date Fri, 30 Mar 2018 12:19:21 GMT
Author: jsorel
Date: Fri Mar 30 12:19:21 2018
New Revision: 1828058

URL: http://svn.apache.org/viewvc?rev=1828058&view=rev
Log:
Resource : uncomment and implement resource listeners methods

Modified:
    sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStore.java
    sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java
    sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractResource.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/URIDataStore.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/folder/Store.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java
    sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/storage/DataStoreMock.java

Modified: sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStore.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStore.java?rev=1828058&r1=1828057&r2=1828058&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStore.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatStore.java
[UTF-8] Fri Mar 30 12:19:21 2018
@@ -31,6 +31,8 @@ import org.apache.sis.storage.Unsupporte
 import org.apache.sis.storage.StorageConnector;
 import org.apache.sis.internal.storage.URIDataStore;
 import org.apache.sis.setup.OptionKey;
+import org.apache.sis.storage.event.ChangeEvent;
+import org.apache.sis.storage.event.ChangeListener;
 import org.apache.sis.util.Debug;
 
 
@@ -145,6 +147,24 @@ public class LandsatStore extends DataSt
     }
 
     /**
+     * This resource produces no events.
+     *
+     * {@inheritDoc }
+     */
+    @Override
+    public <T extends ChangeEvent> void addListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
+
+    /**
+     * This resource produces no events.
+     *
+     * {@inheritDoc }
+     */
+    @Override
+    public <T extends ChangeEvent> void removeListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
+
+    /**
      * Closes this Landsat store and releases any underlying resources.
      *
      * @throws DataStoreException if an error occurred while closing the Landsat file.

Modified: sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java?rev=1828058&r1=1828057&r2=1828058&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java
[UTF-8] Fri Mar 30 12:19:21 2018
@@ -40,6 +40,8 @@ import org.apache.sis.internal.storage.U
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.metadata.sql.MetadataStoreException;
 import org.apache.sis.storage.DataStoreClosedException;
+import org.apache.sis.storage.event.ChangeEvent;
+import org.apache.sis.storage.event.ChangeListener;
 import org.apache.sis.util.resources.Errors;
 
 
@@ -178,6 +180,24 @@ public class GeoTiffStore extends DataSt
     }
 
     /**
+     * This resource produces no events.
+     *
+     * {@inheritDoc }
+     */
+    @Override
+    public <T extends ChangeEvent> void addListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
+
+    /**
+     * This resource produces no events.
+     *
+     * {@inheritDoc }
+     */
+    @Override
+    public <T extends ChangeEvent> void removeListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
+
+    /**
      * Closes this GeoTIFF store and releases any underlying resources.
      *
      * @throws DataStoreException if an error occurred while closing the GeoTIFF file.

Modified: sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java?rev=1828058&r1=1828057&r2=1828058&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java
[UTF-8] Fri Mar 30 12:19:21 2018
@@ -34,6 +34,8 @@ import org.apache.sis.internal.util.Unmo
 import org.apache.sis.metadata.ModifiableMetadata;
 import org.apache.sis.setup.OptionKey;
 import org.apache.sis.storage.Resource;
+import org.apache.sis.storage.event.ChangeEvent;
+import org.apache.sis.storage.event.ChangeListener;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Version;
 import ucar.nc2.constants.CDM;
@@ -177,6 +179,24 @@ public class NetcdfStore extends DataSto
     }
 
     /**
+     * This resource produces no events.
+     *
+     * {@inheritDoc }
+     */
+    @Override
+    public <T extends ChangeEvent> void addListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
+
+    /**
+     * This resource produces no events.
+     *
+     * {@inheritDoc }
+     */
+    @Override
+    public <T extends ChangeEvent> void removeListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
+
+    /**
      * Closes this netCDF store and releases any underlying resources.
      *
      * @throws DataStoreException if an error occurred while closing the netCDF file.

Modified: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractResource.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractResource.java?rev=1828058&r1=1828057&r2=1828058&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractResource.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractResource.java
[UTF-8] Fri Mar 30 12:19:21 2018
@@ -29,6 +29,8 @@ import org.apache.sis.util.logging.Warni
 import org.apache.sis.storage.Resource;
 import org.apache.sis.storage.DataStore;
 import org.apache.sis.storage.DataStoreException;
+import org.apache.sis.storage.event.ChangeEvent;
+import org.apache.sis.storage.event.ChangeListener;
 
 
 /**
@@ -121,4 +123,22 @@ public abstract class AbstractResource i
         }
         return bounds;
     }
+
+    /**
+     * This resource produces no events.
+     *
+     * {@inheritDoc }
+     */
+    @Override
+    public <T extends ChangeEvent> void addListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
+
+    /**
+     * This resource produces no events.
+     *
+     * {@inheritDoc }
+     */
+    @Override
+    public <T extends ChangeEvent> void removeListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
 }

Modified: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/URIDataStore.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/URIDataStore.java?rev=1828058&r1=1828057&r2=1828058&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/URIDataStore.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/URIDataStore.java
[UTF-8] Fri Mar 30 12:19:21 2018
@@ -29,6 +29,8 @@ import org.apache.sis.storage.DataStoreP
 import org.apache.sis.storage.DataStoreException;
 import org.apache.sis.storage.IllegalOpenParameterException;
 import org.apache.sis.internal.storage.io.IOUtilities;
+import org.apache.sis.storage.event.ChangeEvent;
+import org.apache.sis.storage.event.ChangeListener;
 
 
 /**
@@ -227,4 +229,22 @@ public abstract class URIDataStore exten
             builder.addTitleOrIdentifier(IOUtilities.filenameWithoutExtension(super.getDisplayName()),
MetadataBuilder.Scope.ALL);
         }
     }
+
+    /**
+     * This resource produces no events.
+     *
+     * {@inheritDoc }
+     */
+    @Override
+    public <T extends ChangeEvent> void addListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
+
+    /**
+     * This resource produces no events.
+     *
+     * {@inheritDoc }
+     */
+    @Override
+    public <T extends ChangeEvent> void removeListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
 }

Modified: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/folder/Store.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/folder/Store.java?rev=1828058&r1=1828057&r2=1828058&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/folder/Store.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/folder/Store.java
[UTF-8] Fri Mar 30 12:19:21 2018
@@ -48,6 +48,8 @@ import org.apache.sis.internal.util.Unmo
 import org.apache.sis.internal.storage.MetadataBuilder;
 import org.apache.sis.internal.storage.StoreUtilities;
 import org.apache.sis.internal.storage.Resources;
+import org.apache.sis.storage.event.ChangeEvent;
+import org.apache.sis.storage.event.ChangeListener;
 
 
 /**
@@ -340,6 +342,24 @@ class Store extends DataStore implements
     }
 
     /**
+     * This resource produces no events.
+     *
+     * {@inheritDoc }
+     */
+    @Override
+    public <T extends ChangeEvent> void addListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
+
+    /**
+     * This resource produces no events.
+     *
+     * {@inheritDoc }
+     */
+    @Override
+    public <T extends ChangeEvent> void removeListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
+
+    /**
      * Closes all children resources.
      */
     @Override

Modified: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java?rev=1828058&r1=1828057&r2=1828058&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java
[UTF-8] Fri Mar 30 12:19:21 2018
@@ -16,6 +16,8 @@
  */
 package org.apache.sis.storage;
 
+import org.apache.sis.storage.event.ChangeEvent;
+import org.apache.sis.storage.event.ChangeListener;
 import org.opengis.metadata.Metadata;
 
 
@@ -124,8 +126,7 @@ public interface Resource {
      * @param  listener   listener to notify about changes.
      * @param  eventType  type of {@linkplain ChangeEvent} to listen (can not be {@code null}).
      */
-    //TODO: remove comment when implemented on all resources.
-    //<T extends ChangeEvent> void addListener(ChangeListener<? super T> listener,
Class<T> eventType);
+    <T extends ChangeEvent> void addListener(ChangeListener<? super T> listener,
Class<T> eventType);
 
     /**
      * Unregisters a listener previously added to this resource for the given type of events.
@@ -143,6 +144,5 @@ public interface Resource {
      * @param  listener   listener to stop notifying about changes.
      * @param  eventType  type of {@linkplain ChangeEvent} which were listened (can not be
{@code null}).
      */
-    //TODO: remove comment when implemented on all resources.
-    //<T extends ChangeEvent> void removeListener(ChangeListener<? super T> listener,
Class<T> eventType);
+    <T extends ChangeEvent> void removeListener(ChangeListener<? super T> listener,
Class<T> eventType);
 }

Modified: sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/storage/DataStoreMock.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/storage/DataStoreMock.java?rev=1828058&r1=1828057&r2=1828058&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/storage/DataStoreMock.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/storage/DataStoreMock.java
[UTF-8] Fri Mar 30 12:19:21 2018
@@ -16,6 +16,8 @@
  */
 package org.apache.sis.storage;
 
+import org.apache.sis.storage.event.ChangeEvent;
+import org.apache.sis.storage.event.ChangeListener;
 import org.opengis.metadata.Metadata;
 import org.opengis.parameter.ParameterValueGroup;
 
@@ -60,6 +62,14 @@ final strictfp class DataStoreMock exten
     }
 
     @Override
+    public <T extends ChangeEvent> void addListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
+
+    @Override
+    public <T extends ChangeEvent> void removeListener(ChangeListener<? super T>
listener, Class<T> eventType) {
+    }
+
+    @Override
     public void close() {
     }
 }



Mime
View raw message