private static ComplexInput parseComplexInput( CodeType inputId, ComplexInputDefinition definition,
AttributedParameter parameter,
ExceptionCustomizer exceptionCustomizer )
throws OWSException {
if ( parameter.getHref() == null ) {
throw exceptionCustomizer.inputEvalutationNotSupported( inputId, new Pair<String, String>( "xlink:href",
null ),
"Inline complex values are not supported for KVP execute requests" );
}
URL url = null;
try {
url = new URL( parameter.getHref() );
} catch ( MalformedURLException e ) {
throw exceptionCustomizer.inputInvalidParameter( inputId, new Pair<String, String>( "xlink:href",
parameter.getHref() ) );
}
ComplexFormatType format = new ComplexFormatType();
format.setMimeType( parameter.getMimeType() );
format.setEncoding( parameter.getEncoding() );
format.setSchema( parameter.getSchema() );
ComplexFormatType augmentedFormat = validateAndAugmentFormat( format, definition, exceptionCustomizer );
InputReference reference = new InputReference( url, new HashMap<String, String>() );
return new ReferencedComplexInput( definition, null, null, augmentedFormat, reference );
}