Hi,

The XStreamPersister Andrea designed is working great for me after I made
the small change I mentioned a few hours ago. But this still leaves part of
the problem of feeding featuretype.xml configuration to DataStores /
FeatureSources.

The parsed metadata is part of the GS catalog FeatureTypeInfo and
currently, I'm not aware of any mechanism to pass the metadata to the
actual GT feature source.

Here's a few approches I've thought of so far:

1. add a MetadataAware interface into GT:

public interface MetadataAware {
  public void setMetadata(Map<String, ?> metadata);
  pblic Map<String, ?> getMetadata();
}

The setter would be called for FeatureSources which implement this
interface when the FeatureSource is created, in
FeatureTypeInfoImpl.getFeatureSource(). This is however clumsy as the
FeatureSources are more often than not wrapped in other FeatureSources. And
as there is no common abstract class, it's a lot of work implementing this
for every wrapping FeatureSource, not to mention error-prone when new
wrappers are written.

2. Add similar methods to SimpleFeatureSource. Most classes implement this
anyway, so it would negate the issue of forgetting to implement an extra
interface for FeatureSource implementations and wrappers.

3. Add the featuretype metadata in the GT FeatureType.userData. This is a
crufty as this information is not really to do with the feature type, but
the current layer based on this feature type. There's a strong possibility
of things getting mixed up in situations where multiple layers are created
from the same feature type.

Thoughts? Any better ideas that come to mind?


 Sampo

-- 
Sampo Savolainen
R&D Director, Spatineo Oy
sampo.savolai...@spatineo.com
+358-407555649
Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland
www.spatineo.com, twitter.com/#!/spatineo
www.linkedin.com/company/spatineo-inc

This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate, or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to