On 23/04/2010, at 2:37 PM, Andrea Aime wrote:

> Oh no, not another map. Building the datastores by creating a
> map is painful enough already.

Fair enough; I was more thinking in how we define well known keys.

> A capabilities bean as a concrete class that stores can subclass
> should be much better.

Sure :-)
> 
> I honestly never used getInfo() but it seems to be related to GUI
> concerns (despite of what the DataAccess javadoc says about filter
> capabilities, all I see is titles, icons, keywords),
> mixing actual usage capabilities seems a way to confuse matters.

The point was to add to it as it is describing the DataAccess; I did not add 
filter capabilities because there were two implementations (geoapi and 
geotools) and I was not sure they had settled down.

> I prefer an explicit Capabilities() method that returns
> a SchemaCapabilities object where SchemaCapabilities is a class
> just like QueryCapabilities:
> 
> public class SchemaCapabilities {
> 
>    boolean supportsDrop(Name name) {
>       return false;
>    }
> 
>    boolean supportsCreate(FeatureType featureType) {
>       return false;
>    }
> 
>    boolean supportsUpdate(Name name, FeatureType featureType) {
>       return false;
>    }
> }
I was not thinking of going that far at this point; just a simple 
"isCreateSupported()".

I guess at the end of the day a fine grained description would describe what 
the datastore can do so you can build a valid FeatureType.  As an example 
shapefile should be able to say that column names are limited to 15 characters? 
Could return a AttributeTypeBuilder that is configured to throw exceptions or 
otherwise police the construction of an AttributeType....

> The thing I'm not convinced about in the above:
> - it forces the qualified names into the simpler DataStore API....
> - not sure if we want to pass the FeatureType as a parameter
>  in supportsCreate and supportsUpdate, maybe they should just be:
>  supportsUpdate(Name) and supportsCreate()


interface DataAccessInfo (){
  ....
  boolean isCreateSchemaSuppported();  // for shapefile you can only call 
createSchema once!
  boolean isDropSchemaSupported();
  boolean isUpdateSchemaSupported();
}
Jody
------------------------------------------------------------------------------
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to