I like the second option more too.
Gabriel
Justin Deoliveira wrote:
> I see two possible solutions:
>
> 1) we add the method you are proposing. However I see a possible problem
> with this (i might be understanding). The problem is that isn't there
> loss of information in the cases there the output format actually does
> multiple different formats, rather just provide synonims. For instance
> with geotiff and geotiff8, if you map this two a single string how do
> you know how to do the reverse mapping.
>
> Or... are you prosing that getOutputFormat return a list... and based on
> the flag that list might contain synonyms or not.
>
> 2) the second way to solve this would be to come up with some sort of
> mapping extension point, that could map mime types or output format
> names to human readable titles. Something like:
>
> class OutputFormatTitle {
>
> String getTitle( String outputFormat );
> }
>
> With this extension point the ui could walk through and build up the
> list of titles (factoring out synonyms since synonyms would map to the
> same title string).
>
> While I think the first would be easier to implement it kind of seems a
> bit hackish... the second I think is a bit cleaner and means we don't
> have to muck up any of the existing output format code.
>
> Andrea Aime wrote:
>> Hi,
>> so doing the map preview I stumbled upon a few hiccups
>> of how the output formats are handled.
>> In particular, each output format has not one, but a
>> number of possible output formats names:
>>
>> - GetMapProducer.getOutputFormatNames()
>> - WFSGetFeatureOutputFormat.getOutputFormats()
>>
>> Capabilities documents build on top of this list directly,
>> but there are a few hiccups: some output formats list three
>> different synonyms for the same result, that is not good for
>> UI generation at all...
>> For example, we have GeoRSS list the following:
>> * application/rss+xml
>> * rss
>> * application/rss xml (yeah, without the +)
>> And GML ones list something like:
>> * gml3
>> * text/xml; subtype=gml/3.1.1
>>
>> For the map preview I need just one. But there is also
>> the opposite, output formats that list more because
>> they can do more than one, this is the case of the
>> image output formats, where one class is usually
>> able to produce both the 24 and 8 bit outputs:
>> * "image/geotiff"
>> * "image/geotiff8"
>> (whilst the output mime type is just image/tiff since
>> there is no actual geotiff MIME)
>>
>> So what I'd need is a list of valid output format
>> name, but without duplicates, if there are multiple
>> names I'm fine, but I need them to be doing different
>> things.
>>
>> Afaik the output of getOutputFormats() is used for
>> matching the output format in the dispatcher, and
>> for that case the availability of synonims is good.
>>
>> It seems we need a new call for a distilled list?
>> Or adding a boolean flag to the existing one?
>> Like:
>> getOutputFormat(synonims)
>>
>> Opinions?
>> Cheers
>> Andrea
>>
>>
>>
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel