Opened 11 years ago
Closed 10 years ago
#626 closed defect (fixed)
WCS incomplete supported formats listing in service capabilities
Reported by: | Piero Campalani | Owned by: | gxinghua |
---|---|---|---|
Priority: | major | Milestone: | 9.0.x |
Component: | petascope | Version: | development |
Keywords: | supported formats wcs | Cc: | |
Complexity: | Easy |
Description
A partial list of supported output formats is provided by Petascope:
<wcs:ServiceMetadata xmlns="http://www.opengis.net/ows/2.0"> <wcs:formatSupported>image/jp2</wcs:formatSupported> <wcs:formatSupported>image/tiff</wcs:formatSupported> <wcs:formatSupported>application/gml+xml</wcs:formatSupported> </wcs:ServiceMetadata>
whereas:
$ grep MIME ./petascope/wcs2/extensions/ -r ./petascope/wcs2/extensions/MultipartFormatExtension.java: public static final String[] SET_VALUES = new String[] { MIME_TIFF, MIME_JP2 }; ./petascope/wcs2/extensions/FormatExtension.java: String MIME_TEXT = "text/plain"; ./petascope/wcs2/extensions/FormatExtension.java: String MIME_MULTIPART = "multipart/related"; ./petascope/wcs2/extensions/FormatExtension.java: String MIME_GML = "application/gml+xml"; ./petascope/wcs2/extensions/FormatExtension.java: String MIME_XML = "text/xml"; ./petascope/wcs2/extensions/FormatExtension.java: String MIME_TIFF = "image/tiff"; ./petascope/wcs2/extensions/FormatExtension.java: String MIME_JP2 = "image/jp2"; ./petascope/wcs2/extensions/FormatExtension.java: String MIME_NETCDF = "application/netcdf"; ./java/petascope/wcs2/extensions/NetcdfFormatExtension.java: return MIME_NETCDF; ./petascope/wcs2/extensions/JPEG2000FormatExtension.java: return MIME_JP2; ./petascope/wcs2/extensions/GeotiffFormatExtension.java: return MIME_TIFF; ./petascope/wcs2/extensions/GmlFormatExtension.java: return MIME_GML;
The key code is in the class GetCapabilitiesHandler
:
254 // 255 // ServiceMetadata 256 // 257 Element serviceMetadata = Templates.getXmlTemplate(Templates.SERVICE_METADATA); 258 if (serviceMetadata != null) { 259 // add supported formats 260 //: [Req6 /req/core/serviceMetadata-structure] 261 //: [Req9 /req/core/formats-supported] 262 Set<String> mimeTypes = new HashSet<String>(); 263 for (Extension extension : ExtensionsRegistry.getExtensions()) { 264 if (extension instanceof FormatExtension) { 265 mimeTypes.add(((FormatExtension) extension).getMimeType()); 266 } 267 } 268 for (String mimeType : mimeTypes) { 269 Element formatSupported = new Element(PREFIX_WCS + ":" + LABEL_FORMAT_SUPPORTED, NAMESPACE_WCS); 270 formatSupported.appendChild(mimeType); 271 // Insert it on top, in case the template already contains some other fixed content 272 serviceMetadata.insertChild(formatSupported, 0); 273 }
Change History (5)
comment:1 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 10 years ago
comment:4 by , 10 years ago
Cc: | added |
---|
comment:5 by , 10 years ago
Cc: | removed |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Has this been fixed?