[Geoserver-devel] DataStoreInfo/Namespace/FeatureTypeInfo model conflicts

It seems that there are several models in use trying to relate the holy trinity of GeoServer data representation:

DataStoreInfo: id, namespaceId, enabled, title, abstract, params
- connection information for a real live GeoTools2 DataStore
- can be used to access a DataStore for a list of typeNames

Namespace: prefix, uri, default
- represents a GML namespace

FeatureTypeInfo: name, Title, dataStoreId, Abstract, keywords, ...
- represents a FeatureType made available by a DataStore
- name matches to DataStore typeName
- contains a XMLSchema fragment describing schema (or can generate one)

We have two ways in which these are related (and I think both maybe wrong):

GeoServer 1.1: Conflict on Name and namespace.typeName for a FeatureTypeInfo

FeatureTypeInfo points to DataStoreInfo using dataStoreId (match to DataStoreInfo.id)
DataStoreInfo points to Namespace using namespaceId (match to prefix)
Namespace has the prefix

Currently GeoServer depends on a FeatureTypeInfo "name" to allow for lookup.
We can set up name conflicts by having:
DataStoreInfo1.namespaceId = "topp"
DataStoreInfo2.namespaceId = "topp"

If both DataStoreInfo1 and DataStoreInfo2 define a "road" type we would have two schemas for topp.name

GeoTools: Conflict on namespace between two DataStores

Catalog provides lookup by namespace for a DataStore - each DataStore is assumed to have a unique "namespace"

We can set up conflict:
DataStore1.namespace = "topp"
DataStore2.namespace = "topp"