private void checkGetFeatureInfo( Version version, org.deegree.protocol.wms.ops.GetFeatureInfo gfi ) throws OWSException { if ( gfi.getInfoFormat() != null && !gfi.getInfoFormat().equals( "" ) && !featureInfoManager.getSupportedFormats().contains( gfi.getInfoFormat() ) ) { throw new OWSException( get( "WMS.INVALID_INFO_FORMAT", gfi.getInfoFormat() ), OWSException.INVALID_FORMAT ); } for ( LayerRef lr : gfi.getQueryLayers() ) { if ( !service.hasTheme( lr.getName() ) ) { throw new OWSException( "The layer with name " + lr.getName() + " is not defined.", "LayerNotDefined", "layers" ); } } for ( StyleRef sr : gfi.getStyles() ) { // TODO check style availability } try { if ( gfi.getCoordinateSystem() == null ) { // this can happen if some AUTO SRS id was invalid controllers.get( version ).throwSRSException( "automatic" ); } ICRS crs = gfi.getCoordinateSystem(); if ( crs instanceof CRSRef ) { ( (CRSRef) crs ).getReferencedObject(); } } catch ( ReferenceResolvingException e ) { // only throw an exception if a truly invalid srs is found // this makes it possible to request srs that are not advertised, which may be useful controllers.get( version ).throwSRSException( gfi.getCoordinateSystem().getAlias() ); } }
List<String> queryLayers = map( fi.getQueryLayers(), CollectionUtils.<LayerRef> getToStringMapper() ); RenderingInfo info = new RenderingInfo( fi.getInfoFormat(), fi.getWidth(), fi.getHeight(), false, null, fi.getEnvelope(), 0.28, map ); String format = fi.getInfoFormat(); info.setFormat( format ); info.setFeatureCount( fi.getFeatureCount() );