On Mon, Sep 5, 2011 at 2:33 PM, Nikolai Bock <[email protected]> wrote: > Hi, > > I have a question on developing an datastore. For a research project I > have to develope a datastore for hibernate spatial. > I've started with the tutorial of extending the ContentDataStore in your > 8.0-M0 User Guide and working with POJOs predefined in sourcecode. For > our project this is enough. Dynamically creation of Hibernate Spatial > POJOs will be a nice feature and I will maybe integrate this when I have > time for that (and the knowhow). :-) > > The datatore is developed in a first result for reading all data from a > table via hibernate spatial. This till work. > Now I want to implement the filter mechanism for my datastore. For that > I have to convert the filter (geotools/opengis) to a hibernate criterion > of hibernate spatial. > > When I have a look on JDBCDataStore I found the class FilterToSQL which > implements all the visitor-methods for the possible filter operators. > Will be using a visitor, implementing all this methods, the best > practise for me too, and where should I integrate the conversion into > the whole datastore implementation (FeatureSource, FeatureReader)?
Many years ago I wrote a datastore wrapping Hibernate, unfortunately I was not allowed to open source it. Just like you suggest the best way is to implement your own FilterToSQL translating the OGC Filter towards the Criteria API. The conversion should be integrated in the FeautureSource imho. When I did that work back at the time the store could return the beans directly, but could also be configured at runtime with new types derived from a Criteria query, this was done to make custom flattenings of the object graph, joining togheter mutliple beans and cherry picking the resulting properties. As a curiosity, will you open source this work? Cheers Andrea > I hope anyone can say me, as a newbie with geotools, if I'm on the right > way and give me some tips and tricks for including the filter conversion. > > Thanks in advance. > Nikolai > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
