private LimitedSupportedEncodings parseEncodingWithSupportedEncodings( List<String> supportedEncodingsForAllRequestTypes ) { LimitedSupportedEncodings<WMSRequestType> limitedSupportedEncodings = new LimitedSupportedEncodings(); for ( WMSRequestType type : WMSRequestType.values() ) { limitedSupportedEncodings.addEnabledEncodings( type, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); } return limitedSupportedEncodings; }
/** * Add enabled encodings for a request type. * * @param requestType * the type of the request to add enabled requests for, never <code>null</code> * @param enabledEncodingsPerRequestType * a list of encodings enabled for the request type. May be empty (all encodings are disabled), but never * <code>null</code>. */ public void addEnabledEncodings( E requestType, Set<String> enabledEncodingsPerRequestType ) { this.getEnabledEncodingsPerRequestType().put( requestType, enabledEncodingsPerRequestType ); }
private LimitedSupportedEncodings parseEncodingsWithSpecifiedRequestTypes( SupportedRequests supportedRequests, List<String> supportedEncodingsForAllRequestTypes ) { LimitedSupportedEncodings<WMSRequestType> limitedSupportedEncodings = new LimitedSupportedEncodings(); for ( WMSRequestType type : WMSRequestType.values() ) { RequestType requestType = retrieveEncodings( supportedRequests, type ); Set<String> enabledEncodingsPerRequestType = collectEnabledEncodings( requestType, supportedEncodingsForAllRequestTypes ); limitedSupportedEncodings.addEnabledEncodings( type, enabledEncodingsPerRequestType ); } return limitedSupportedEncodings; }
@Override public boolean isEncodingSupported( E requestType, String encoding ) { if ( getEnabledEncodingsPerRequestType().containsKey( requestType ) ) { Set<String> enabledEncodings = getEnabledEncodingsPerRequestType().get( requestType ); for ( String enabledEncoding : enabledEncodings ) { if ( enabledEncoding.equalsIgnoreCase( encoding ) ) return true; } } return false; }
private LimitedSupportedEncodings parseEncodingWithSupportedEncodings( List<String> supportedEncodingsForAllRequestTypes ) { LimitedSupportedEncodings<WFSRequestType> limitedSupportedEncodings = new LimitedSupportedEncodings(); limitedSupportedEncodings.addEnabledEncodings( CreateStoredQuery, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DescribeFeatureType, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DescribeStoredQueries, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DropStoredQuery, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetCapabilities, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetFeature, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetFeatureWithLock, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetGmlObject, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetPropertyValue, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( ListStoredQueries, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( LockFeature, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( Transaction, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); return limitedSupportedEncodings; }
private LimitedSupportedEncodings parseEncodingsWithSpecifiedRequestTypes( SupportedRequests supportedRequests, List<String> supportedEncodingsForAllRequestTypes ) { LimitedSupportedEncodings<WFSRequestType> limitedSupportedEncodings = new LimitedSupportedEncodings(); limitedSupportedEncodings.addEnabledEncodings( CreateStoredQuery, collectEnabledEncodings( supportedRequests.getCreateStoredQuery(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DescribeFeatureType, collectEnabledEncodings( supportedRequests.getDescribeFeatureType(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DescribeStoredQueries, collectEnabledEncodings( supportedRequests.getDescribeStoredQueries(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DropStoredQuery, collectEnabledEncodings( supportedRequests.getDropStoredQuery(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetCapabilities, collectEnabledEncodings( supportedRequests.getGetCapabilities(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetFeature, collectEnabledEncodings( supportedRequests.getGetFeature(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetFeatureWithLock, collectEnabledEncodings( supportedRequests.getGetFeatureWithLock(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetGmlObject, collectEnabledEncodings( supportedRequests.getGetGmlObject(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetPropertyValue, collectEnabledEncodings( supportedRequests.getGetPropertyValue(), supportedEncodingsForAllRequestTypes ) );