sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject svn commit: r1803647 - 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 Tue, 01 Aug 2017 14:30:38 GMT
Author: jsorel
Date: Tue Aug  1 14:30:38 2017
New Revision: 1803647

URL: http://svn.apache.org/viewvc?rev=1803647&view=rev
Log:
Store : add Resource,DataSet API

Added:
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Aggregate.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/DataSet.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/FeatureSet.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java
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/csv/Store.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/Store.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/Store.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java
    sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/storage/DataStoreMock.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.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=1803647&r1=1803646&r2=1803647&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] Tue Aug  1 14:30:38 2017
@@ -28,6 +28,7 @@ import org.apache.sis.storage.DataStoreR
 import org.apache.sis.storage.UnsupportedStorageException;
 import org.apache.sis.storage.StorageConnector;
 import org.apache.sis.setup.OptionKey;
+import org.apache.sis.storage.Resource;
 import org.apache.sis.util.Debug;
 
 
@@ -120,6 +121,14 @@ public class LandsatStore extends DataSt
     }
 
     /**
+     * This implementation do not provide any resource yet.
+     */
+    @Override
+    public Resource getRootResource() throws DataStoreException {
+        return null;
+    }
+
+    /**
      * 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=1803647&r1=1803646&r2=1803647&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] Tue Aug  1 14:30:38 2017
@@ -36,6 +36,7 @@ import org.apache.sis.internal.storage.M
 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.Resource;
 import org.apache.sis.util.resources.Errors;
 
 
@@ -132,6 +133,14 @@ public class GeoTiffStore extends DataSt
     }
 
     /**
+     * This implementation do not provide any resource yet.
+     */
+    @Override
+    public Resource getRootResource() throws DataStoreException {
+        return null;
+    }
+
+    /**
      * Returns the reader if it is not closed, or thrown an exception otherwise.
      */
     private Reader reader() throws DataStoreException {

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=1803647&r1=1803646&r2=1803647&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] Tue Aug  1 14:30:38 2017
@@ -26,6 +26,7 @@ import org.apache.sis.storage.StorageCon
 import org.apache.sis.internal.netcdf.Decoder;
 import org.apache.sis.metadata.ModifiableMetadata;
 import org.apache.sis.setup.OptionKey;
+import org.apache.sis.storage.Resource;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Version;
 import ucar.nc2.constants.CDM;
@@ -117,6 +118,14 @@ public class NetcdfStore extends DataSto
     }
 
     /**
+     * This implementation do not provide any resource yet.
+     */
+    @Override
+    public Resource getRootResource() throws DataStoreException {
+        return null;
+    }
+
+    /**
      * Returns the version number of the Climate and Forecast (CF) conventions used in the
NetCDF file.
      * The use of CF convention is mandated by the OGC 11-165r2 standard
      * (<cite>CF-netCDF3 Data Model Extension standard</cite>).

Modified: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java?rev=1803647&r1=1803646&r2=1803647&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
[UTF-8] Tue Aug  1 14:30:38 2017
@@ -68,6 +68,7 @@ import java.time.Instant;
 import java.time.DateTimeException;
 import java.util.stream.Stream;
 import java.util.stream.StreamSupport;
+import org.apache.sis.storage.Resource;
 import org.opengis.feature.Feature;
 import org.opengis.feature.FeatureType;
 import org.opengis.feature.PropertyType;
@@ -604,6 +605,14 @@ public final class Store extends Feature
     }
 
     /**
+     * This implementation do not provide any resource yet.
+     */
+    @Override
+    public Resource getRootResource() throws DataStoreException {
+        return null;
+    }
+
+    /**
      * Returns the feature type for the given name. The {@code name} argument should be the
      * value specified at the following path (only one such value exists for a CSV data store):
      *

Modified: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/Store.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/Store.java?rev=1803647&r1=1803646&r2=1803647&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/Store.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/Store.java
[UTF-8] Tue Aug  1 14:30:38 2017
@@ -39,6 +39,7 @@ import org.apache.sis.storage.DataStoreE
 import org.apache.sis.storage.DataStoreContentException;
 import org.apache.sis.internal.referencing.DefinitionVerifier;
 import org.apache.sis.metadata.iso.DefaultMetadata;
+import org.apache.sis.storage.Resource;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.CharSequences;
 
@@ -193,6 +194,14 @@ final class Store extends DataStore {
     }
 
     /**
+     * This implementation do not provide any resource.
+     */
+    @Override
+    public Resource getRootResource() throws DataStoreException {
+        return null;
+    }
+
+    /**
      * Closes this data store and releases any underlying resources.
      *
      * @throws DataStoreException if an error occurred while closing this data store.

Modified: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/Store.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/Store.java?rev=1803647&r1=1803646&r2=1803647&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/Store.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/Store.java
[UTF-8] Tue Aug  1 14:30:38 2017
@@ -40,6 +40,7 @@ import org.apache.sis.internal.system.Lo
 import org.apache.sis.internal.referencing.DefinitionVerifier;
 
 import static java.util.Collections.singleton;
+import org.apache.sis.storage.Resource;
 
 
 /**
@@ -208,6 +209,14 @@ final class Store extends DataStore {
     }
 
     /**
+     * This implementation do not provide any resource.
+     */
+    @Override
+    public Resource getRootResource() throws DataStoreException {
+        return null;
+    }
+
+    /**
      * Closes this data store and releases any underlying resources.
      *
      * @throws DataStoreException if an error occurred while closing this data store.

Added: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Aggregate.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Aggregate.java?rev=1803647&view=auto
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Aggregate.java
(added)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Aggregate.java
Tue Aug  1 14:30:38 2017
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage;
+
+import java.util.Collection;
+
+/**
+ * An Aggregate is a resources which references a list of children resources.
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public interface Aggregate extends Resource {
+
+    /**
+     * List children resources of this aggregate.
+     *
+     * @return collection of children {@link Resource}, never null, can be empty
+     */
+    Collection<Resource> components();
+
+}

Added: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/DataSet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/DataSet.java?rev=1803647&view=auto
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/DataSet.java
(added)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/DataSet.java
Tue Aug  1 14:30:38 2017
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage;
+
+
+/**
+ * A dataset is a resource which manage a data type.
+ * Multiple subtypes may exist.
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public interface DataSet extends Resource {
+
+
+}

Modified: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java?rev=1803647&r1=1803646&r2=1803647&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java
[UTF-8] Tue Aug  1 14:30:38 2017
@@ -16,13 +16,20 @@
  */
 package org.apache.sis.storage;
 
+import java.util.Collection;
 import java.util.Locale;
 import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.function.Function;
+import org.apache.sis.internal.metadata.NameToIdentifier;
 import org.opengis.metadata.Metadata;
 import org.apache.sis.util.Localized;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.logging.WarningListener;
 import org.apache.sis.util.logging.WarningListeners;
+import org.opengis.metadata.Identifier;
+import org.opengis.metadata.citation.Citation;
+import org.opengis.metadata.identification.Identification;
 
 
 /**
@@ -174,6 +181,71 @@ public abstract class DataStore implemen
     public abstract Metadata getMetadata() throws DataStoreException;
 
     /**
+     * Get root data store resource.
+     *
+     * @return Resource, may be null
+     * @throws DataStoreException if an I/O or decoding error occurs.
+     */
+    public abstract Resource getRootResource() throws DataStoreException;
+
+    /**
+     * Search for a resource identified by given name.
+     *
+     * @param  name  identifier of the data to acquire. Must be non-null.
+     * @return resource associated to the given input name, never null.
+     * @throws DataStoreException if an I/O error occurs
+     * @throws IllegalNameException if input name is not found.
+     */
+    public Resource findResource(final String name) throws DataStoreException, IllegalNameException
{
+        ArgumentChecks.ensureNonEmpty("Name of the searched resource", name);
+
+        final Resource root = getRootResource();
+        if (root==null) throw new IllegalNameException("No resource found for name : "+name);
+
+        //recursive search
+        Object res = new Function<Resource,Object>() {
+            @Override
+            public Object apply(final Resource candidate) {
+
+                final Metadata metadata;
+                try { metadata = candidate.getMetadata(); }
+                catch (DataStoreException ex) { return ex; }
+
+                final boolean match = metadata.getIdentificationInfo().stream()
+                   .map(Identification::getCitation)
+                   .filter(Objects::nonNull)
+                   .map(Citation::getIdentifiers)
+                   .anyMatch((Collection<? extends Identifier> t) -> NameToIdentifier.isHeuristicMatchForIdentifier(t,
name));
+
+                Object result = match ? candidate : null;
+
+                if (candidate instanceof Aggregate) {
+                    final Aggregate agg = (Aggregate) candidate;
+                    for (Resource comp : agg.components()) {
+                        Object rr = apply(comp);
+                        if (rr instanceof DataStoreException) {
+                            return rr;
+                        } else if (rr instanceof Resource) {
+                            if (result!=null) {
+                                return new IllegalNameException("Multiple resources match
the name : "+name);
+                            }
+                            result = rr;
+                        }
+                    }
+                }
+                return result;
+            }
+        }.apply(root);
+
+        if (res==null) {
+            throw new IllegalNameException("No resource found for name : "+name);
+        } else if (res instanceof DataStoreException) {
+            throw (DataStoreException) res;
+        }
+        return (Resource) res;
+    }
+
+    /**
      * Adds a listener to be notified when a warning occurred while reading from or writing
to the storage.
      * When a warning occurs, there is a choice:
      *

Added: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/FeatureSet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/FeatureSet.java?rev=1803647&view=auto
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/FeatureSet.java
(added)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/FeatureSet.java
Tue Aug  1 14:30:38 2017
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage;
+
+import java.util.stream.Stream;
+import org.opengis.feature.Feature;
+import org.opengis.feature.FeatureType;
+
+/**
+ * Specialized type of DataSet which manage features.
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public interface FeatureSet extends DataSet {
+
+    /**
+     * Get dataset feature type.
+     * The feature type contains the definition of all fields, including but not only :
+     * <ul>
+     * <li>description</li>
+     * <li>primitive type</li>
+     * <li>cardinality</li>
+     * <li>{@link CoordinateReferenceSystem}</li>
+     * </ul>
+     *
+     * @return the feature type, never null.
+     * @throws DataStoreException if an I/O or decoding error occurs.
+     */
+    FeatureType getType() throws DataStoreException;
+
+    /**
+     * Reads features from the dataset.
+     *
+     * @return stream of features.
+     * @throws DataStoreException if an I/O or decoding error occurs.
+     */
+    Stream<Feature> features() throws DataStoreException;
+
+}

Added: 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=1803647&view=auto
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java
(added)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/storage/Resource.java
Tue Aug  1 14:30:38 2017
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage;
+
+import org.opengis.geometry.Envelope;
+import org.opengis.metadata.Metadata;
+
+/**
+ * A resource is an accessor to geospatial data.
+ * The user should test if the resource is a {@link CoverageResource} or {@link FeatureResource}.
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public interface Resource {
+
+    /**
+     * Gets resource metadata object.
+     *
+     * @return metadata about the resource, never null.
+     * @throws DataStoreException if an I/O error occurs.
+     */
+    Metadata getMetadata() throws DataStoreException;
+
+    /**
+     * Returns the spatio-temporal envelope of this resource.
+     *
+     * @return the spatio-temporal envelope, never null.
+     * @throws DataStoreException if an I/O or decoding error occurs.
+     */
+    Envelope getEnvelope() throws DataStoreException;
+
+}

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=1803647&r1=1803646&r2=1803647&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] Tue Aug  1 14:30:38 2017
@@ -52,6 +52,11 @@ final strictfp class DataStoreMock exten
     public Metadata getMetadata() {
         return null;
     }
+    
+    @Override
+    public Resource getRootResource() throws DataStoreException {
+        return null;
+    }
 
     @Override
     public void close() {

Modified: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java?rev=1803647&r1=1803646&r2=1803647&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java
[UTF-8] Tue Aug  1 14:30:38 2017
@@ -42,6 +42,7 @@ import org.apache.sis.metadata.iso.distr
 import java.util.stream.Stream;
 import java.util.stream.StreamSupport;
 import java.io.UncheckedIOException;
+import org.apache.sis.storage.Resource;
 import org.opengis.feature.Feature;
 import org.opengis.feature.FeatureType;
 
@@ -167,6 +168,14 @@ public final class Store extends StaxDat
     }
 
     /**
+     * This implementation do not provide any resource yet.
+     */
+    @Override
+    public Resource getRootResource() throws DataStoreException {
+        return null;
+    }
+
+    /**
      * Returns the feature type for the given name. The {@code name} argument should be the
result of calling
      * {@link org.opengis.util.GenericName#toString()} on the name of one of the feature
types in this data store.
      *



Mime
View raw message