This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit fde8dfe8305ca2511d56665cabb16a70f7f6721c
Author: jsorel <[email protected]>
AuthorDate: Mon Sep 14 17:12:14 2026 +0200

    feat(Shapefile): minor changes on event classes
---
 .../storage/internal/shared/FeatureSetContentEvent.java    | 14 ++++++++------
 .../sis/storage/internal/shared/FeatureSetModelEvent.java  | 11 ++++++-----
 .../org/apache/sis/storage/internal/shared/ModelEvent.java |  6 +++++-
 3 files changed, 19 insertions(+), 12 deletions(-)

diff --git 
a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/internal/shared/FeatureSetContentEvent.java
 
b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/internal/shared/FeatureSetContentEvent.java
index b8af83b1d9..b0b7e8171e 100644
--- 
a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/internal/shared/FeatureSetContentEvent.java
+++ 
b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/internal/shared/FeatureSetContentEvent.java
@@ -18,6 +18,7 @@ package org.apache.sis.storage.internal.shared;
 
 import java.util.Set;
 import org.apache.sis.filter.DefaultFilterFactory;
+import org.apache.sis.storage.FeatureSet;
 import org.apache.sis.storage.Resource;
 import org.opengis.feature.Feature;
 import org.opengis.filter.Filter;
@@ -39,13 +40,13 @@ public class FeatureSetContentEvent extends ContentEvent {
     private final Type type;
     private Filter ids;
 
-    public FeatureSetContentEvent(final Resource source, final Type type, 
final Filter<Feature> identifiers) {
+    public FeatureSetContentEvent(final FeatureSet source, final Type type, 
final Filter<Feature> identifiers) {
         super(source);
         this.type = type;
         this.ids = identifiers;
     }
 
-    public FeatureSetContentEvent(final Resource source, final Type type, 
final Set<ResourceId> ids){
+    public FeatureSetContentEvent(final FeatureSet source, final Type type, 
final Set<ResourceId> ids){
         this(source, type, resourceId(ids));
     }
 
@@ -77,19 +78,20 @@ public class FeatureSetContentEvent extends ContentEvent {
         return ids;
     }
 
+    @Override
     public FeatureSetContentEvent copy(final Resource source){
-        return new FeatureSetContentEvent(source, type, ids);
+        return new FeatureSetContentEvent((FeatureSet)source, type, ids);
     }
 
-    public static FeatureSetContentEvent createAddEvent(final Resource source, 
final Filter<Feature> ids){
+    public static FeatureSetContentEvent createAddEvent(final FeatureSet 
source, final Filter<Feature> ids){
         return new FeatureSetContentEvent(source, Type.ADD, ids);
     }
 
-    public static FeatureSetContentEvent createUpdateEvent(final Resource 
source, final Filter<Feature> ids){
+    public static FeatureSetContentEvent createUpdateEvent(final FeatureSet 
source, final Filter<Feature> ids){
         return new FeatureSetContentEvent(source, Type.UPDATE, ids);
     }
 
-    public static FeatureSetContentEvent createDeleteEvent(final Resource 
source, final Filter<Feature> ids){
+    public static FeatureSetContentEvent createDeleteEvent(final FeatureSet 
source, final Filter<Feature> ids){
         return new FeatureSetContentEvent(source, Type.DELETE, ids);
     }
 
diff --git 
a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/internal/shared/FeatureSetModelEvent.java
 
b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/internal/shared/FeatureSetModelEvent.java
index 81304dcc90..06868ebcca 100644
--- 
a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/internal/shared/FeatureSetModelEvent.java
+++ 
b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/internal/shared/FeatureSetModelEvent.java
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.storage.internal.shared;
 
+import org.apache.sis.storage.FeatureSet;
 import org.apache.sis.storage.Resource;
 import static org.apache.sis.util.ArgumentChecks.*;
 import org.opengis.feature.FeatureType;
@@ -38,7 +39,7 @@ public class FeatureSetModelEvent extends ModelEvent {
     private final FeatureType oldType;
     private final FeatureType newType;
 
-    private FeatureSetModelEvent(final Resource source, final Type type, final 
FeatureType oldtype, final FeatureType newtype){
+    private FeatureSetModelEvent(final FeatureSet source, final Type type, 
final FeatureType oldtype, final FeatureType newtype){
         super(source);
 
         ensureNonNull("type", type);
@@ -79,18 +80,18 @@ public class FeatureSetModelEvent extends ModelEvent {
 
     @Override
     public FeatureSetModelEvent copy(Resource source) {
-        return new FeatureSetModelEvent(source, type, oldType, newType);
+        return new FeatureSetModelEvent((FeatureSet)source, type, oldType, 
newType);
     }
 
-    public static FeatureSetModelEvent createAddEvent(final Resource source, 
final FeatureType type){
+    public static FeatureSetModelEvent createAddEvent(final FeatureSet source, 
final FeatureType type){
         return new FeatureSetModelEvent(source, Type.ADD, null, type);
     }
 
-    public static FeatureSetModelEvent createUpdateEvent(final Resource 
source, final FeatureType oldType, final FeatureType newType){
+    public static FeatureSetModelEvent createUpdateEvent(final FeatureSet 
source, final FeatureType oldType, final FeatureType newType){
         return new FeatureSetModelEvent(source, Type.UPDATE, oldType, newType);
     }
 
-    public static FeatureSetModelEvent createDeleteEvent(final Resource 
source, final FeatureType type){
+    public static FeatureSetModelEvent createDeleteEvent(final FeatureSet 
source, final FeatureType type){
         return new FeatureSetModelEvent(source, Type.DELETE, type, null);
     }
 
diff --git 
a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/internal/shared/ModelEvent.java
 
b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/internal/shared/ModelEvent.java
index 97f30ad989..eaa3d93674 100644
--- 
a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/internal/shared/ModelEvent.java
+++ 
b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/internal/shared/ModelEvent.java
@@ -25,10 +25,14 @@ import org.apache.sis.storage.Resource;
  *
  * @author Johann Sorel (Geomatys)
  */
-public abstract class ModelEvent extends StorageEvent {
+public class ModelEvent extends StorageEvent {
 
     public ModelEvent(Resource resource) {
         super(resource);
     }
 
+    @Override
+    public ModelEvent copy(Resource source) {
+        return new ModelEvent(source);
+    }
 }

Reply via email to