Hello,
The current DataStore and FeatureStore API in SIS is limited, it is a
draft in an internal package.
Since there is no specification on how to design such an API, the
proposed API is resulting
from our work over the last years on our projects at geomatys.
It copies some aspects from the MetaData specification (ISO-19115) and
JCR (Java Content Repository).
+ DataStore would be defined by the methods :
- Metadata getMetadata()
- Resource getRootResource()
- Resource findResource(String name)
+ Resource :
- Metadata getMetadata()
- Envelope getEnvelope()
+ DataSet extends Resource :
- Collection<Resource> getResources();
+ FeatureResource extends Resource:
- Stream<Feature> read()
- FeatureResource subset(Query)
The main concept is 'Resource' similar to what is abstractly explained
in the metadata specification.
The subtype DataSet is a aggregation of resources which can again be
Datasets, so we obtain a tree structure
that can be used to map folder hierarchy, database schema/table or
anything else.
A Resource can be of multiple types, so far we can imagine several
subtypes :
- FeatureResource (or FeatureCollection?) for features obviously
- CoverageResource for images and OGC map services, WMS,WMTS,WCS ...
- MetadataResource (or Catalog) for services such as OGC CSW
- SensorResource for datas like NMEA or OGC SOS
- an custom implementation when nothing matches
For now I propose only a FeatureResource implementation because we don't
have anything yet for the other types.
The proposed interfaces are very light and leave a lot of space for
futur evolutions.
For example, having FeatureResource extents JDBC api later on.
The objective is to obtain a first usable datastore api which would
match any known format,
files, databases and services.
If you have any comments, suggestions or preferences, discussion is open :)
Thank you
Johann Sorel