The basic capabilities of the DataStore interface are:
- Persistent store (data set) feature type extraction. Can manage multiple FeatureTypes per DataStore. This mean that a spatial database or a complex file format can be managed as a single data store.
- Data manipulation, that is, create (write), update, delete operations, either by using a transaction or in auto-commit mode.
- Supports feature locking.
- Provides support for data streaming as well as full data loading into a FeatureCollection in memory: either full reading, or filtered by means of a Filter or a Query
Data streaming is particularly important when dealing with huge amounts of data. It provides interfaces to load and manipulate one Feature at a time instead of trying to load everything into memory. This makes it easy to write filter oriented data processors that can manage any quantity of data in limited amounts of memory. It also allows efficient server side applications like Geoserver and supports one time stateless map generation of dynamic context such as a WMS service with low per use memory consumption.
Should you need in-memory data handling, you can request a feature collection from the FeatureResults class. A FeatureCollection is a convenient way to manage a collection of features that also provides a typed iterator that can be used to move through the collection contents. Feature collections can also be created directly by the user with the FeatureCollections factory class. Also, you can use the MemoryDataStore as a memory cache without losing the DataStore capabilities.
It exists many means to read/store data from:
- proprietary file formats like shapefiles, ...
- databases : MySQL, Postgresql, Oracle, ...
- XML : GML