Falko,

AbstractFeatureSource implements SimpleFeatureSource and is for simple 
features only. (AbstractFeatureSource is also deprecated, but its 
replacement ContentFeatureSource is also only for simple features.)

There are no suitable base classes for complex features so you will need 
to make your own. See gt-sample-data-access and gt-app-schema for 
working examples. There is also a gt-webservice but it is no longer 
maintained or built.

You are not implementing a DataStore; you are implementing a DataAccess 
(a DataStore is a DataAccess restricted to simple features). You will 
need to implement DataAccessFactory and have a 
src/main/resources/META-INF/services/org.geotools.data.DataAccessFactory 
to register it for SPI (pluggable module) so it can be loaded with 
DataAccessFinder.getDataStore.

See:
http://docs.geotools.org/latest/userguide/library/api/datastore.html
http://docs.geotools.org/latest/userguide/extension/app-schema.html#sample-dataaccess

Kind regards,
Ben.


On 23/10/15 03:49, Falko Bräutigam wrote:
> Hi all,
>
> I'm struggling trying to work with complex features in GeoTools. I'm about to
> implement a store for complex features. It is something like:
>
> public class RDataStore
>           implements DataAccess {
>       ...
> }
>
> it produces FeatureStore like this:
>
> public class RFeatureStore
>           extends AbstractFeatureSource
>           implements FeatureStore {
>       ...
>
>       @Override
>       public DataStore getDataStore() {
>           return ???
>       }
>       ...
> }
>
> What should the getDataStore() method return here? Its "store" is of type
> DataAccess!
>
> What do I miss here?
>
> Thanks for any help.
>
> -Falko
>

-- 
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand

------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to