|
From: <gab...@te...> - 2004-05-21 16:55:05
|
Hi list,
I think it's time to get some agreement to DataStore.getView operation
behavoir. May be it was already discussed at list or IRC, but I have to
recognize I wasn't be able to give much attention.
The question is, now that we have DataUtilities.mixQueries, the
intention was to have a single entry point to things like
GeoserverFeatureSource, DtaStore.getView and MapLayer.setQuery (also for
on the fly reprojection in the future)
So please tell me if we have concensus to make DataStore.getView part of
the DataStore interface and to provide a default implementation on
AbstractDataStore.
So I have a question for you, Jody:
As shown bellow, the current AbstractDataStore.getView does not seems to
be holding the view query, but just overriding the featuretype.
My understanding was that it should hold the query too, in order to use
it when a FeatureResults is asked on the view, by mixing both queries,
the one that defines the view and the one the user provides.
Could you tell me if I am right or just missing something?
thanks,
Gabriel
// Jody - This is my recomendation for DataStore
// in order to support CS reprojection and override
public FeatureSource getView(final Query query)
throws IOException, SchemaException {
String typeName = query.getTypeName();
FeatureType origionalType = getSchema( typeName );
//CoordinateSystem cs = query.getCoordinateSystem();
//final FeatureType featureType = DataUtilities.createSubType(
origionalType, query.getPropertyNames(), cs );
final FeatureType featureType = DataUtilities.createSubType(
origionalType, query.getPropertyNames() );
return new AbstractFeatureSource() {
public DataStore getDataStore() {
return AbstractDataStore.this;
}
public void addFeatureListener(FeatureListener listener) {
listenerManager.addFeatureListener(this, listener);
}
public void removeFeatureListener(FeatureListener listener) {
listenerManager.removeFeatureListener(this, listener);
}
public FeatureType getSchema() {
return featureType;
}
};
}
|