I think it is something we could address at the ContentDataStore level -
here are a couple options:
- hack: Predefine a NAMESPACE parameter that factories can consistently
advertise, and then rely on geoserver looking for the param called
"namespace".
- better: Define an Param metadata flag, similar to how password is handled
so GeoServer can smoothly detect which parameter to fill in with the
namespace setting. This is a bit better as it makes it part of the API and
not a convention.

Or we could define it as a wrapper in GeoServer, while this is "safer" I
would prefer to define / enforce this requirement if we can.



--
Jody Garnett

On 31 May 2015 at 15:38, Jim Hughes <[email protected]> wrote:

>  First, the PR looks great, and I think my question is tangential.  As a
> broad question, is this something we could address at the ContentDataStore
> level?
>
> I ask since we had to solve this problem separately for the GeoMesa
> datastore(1).  We end up cooking up a new DataStore for something
> interesting every couple of months around here, and having the abstract
> implementation handle it would be awesome.
>
> Perhaps getSchema(Name name) here
>
> https://github.com/geotools/geotools/blob/master/modules/library/data/src/main/java/org/geotools/data/store/ContentDataStore.java#L711-713
> could use the requested URI from the name?
>
> I'll admit that I've seen namespaces only in the context of GeoServer's
> use of a GT DS, so I might be missing something.  Assuming that the main
> way to inject a namespace is by requesting a FeatureSource/Schema with a
> specified URI + feature name, then either working with the CDS.getSchema or
> the CFS.getSchema should give us some room to address this generally.
>
>
> https://github.com/geotools/geotools/blob/master/modules/library/main/src/main/java/org/geotools/data/DataUtilities.java#L1948
>
> (1)  Here's the ticket where we addressed a similar ticket:
> https://github.com/locationtech/geomesa/commit/6a30b184e784d8a66a0e78c7aa71d4620804170b
> Please excuse our Scala;)  Also this addresses the problem in the context
> of the old, deprecated AbstractDataStore.
>
> Thanks,
>
> Jim
>
>
> On 05/31/2015 10:24 AM, Andrea Aime [Administrator] (JIRA) wrote:
>
>       Andrea Aime [Administrator]
> <https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?name=aaime>
> *created* an issue             GeoTools
> <https://osgeo-org.atlassian.net/browse/GEOT> / [image: Bug]
> <https://osgeo-org.atlassian.net/browse/GEOT-5139> GEOT-5139
> <https://osgeo-org.atlassian.net/browse/GEOT-5139>   CSV datastore won't
> honor the configured namespace URI
> <https://osgeo-org.atlassian.net/browse/GEOT-5139>       Issue Type:  [image:
> Bug] Bug   Assignee:  Andrea Aime [Administrator]
> <https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?name=aaime>
> Components:  csv   Created:  31/May/15 4:23 PM   Priority:  [image:
> Medium] Medium   Reporter:  Andrea Aime [Administrator]
> <https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?name=aaime>
>
> The namespace parameter is not advertised, and even when provided, it's
> not actually set in the datastore
>          [image: Add Comment]
> <https://osgeo-org.atlassian.net/browse/GEOT-5139#add-comment>  Add
> Comment <https://osgeo-org.atlassian.net/browse/GEOT-5139#add-comment>
>         This message was sent by Atlassian JIRA (v6.5-OD-04-052#65000-
> sha1:8b5a8f9)    [image: Atlassian logo]
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> GeoTools-Devel mailing 
> [email protected]https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> GeoTools-Devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
>
------------------------------------------------------------------------------
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to