@Override public OWSException inputInvalidBBoxCoordinates( CodeType inputParameterId, String[] suppliedCoordinates ) { String msg = processMsg + ", values for bounding box input parameter '" + inputParameterId + "' (='" + Arrays.toString( suppliedCoordinates ) + "') does not specify enough coordinates."; return new OWSException( msg, OWSException.INVALID_PARAMETER_VALUE, inputParameterId.toString() ); }
@Override public OWSException inputInvalidDatatype( CodeType parameterId, String foundDatatype, String definedDataType ) { String msg = processMsg + ", the value of datatype attribute (='" + foundDatatype + "') for input parameter '" + parameterId + "' does not match the datatype from the corresponding parameter definition (='" + definedDataType + "')"; return new OWSException( msg, OWSException.INVALID_PARAMETER_VALUE, parameterId.toString() ); }
@Override public OWSException inputInvalidParameter( CodeType inputParameterId, Pair<String, String> kvp ) { String msg = processMsg + "Given value: " + kvp + " of input parameter '" + inputParameterId + "' is not supported according the corresponding parameter definition."; return new OWSException( msg, OWSException.INVALID_PARAMETER_VALUE, inputParameterId.toString() ); }
@Override public OWSException outputInvalidParameter( CodeType outputParameterId, Pair<String, String> kvp ) { String msg = processMsg + "Given value: " + kvp + " of outputparameter '" + outputParameterId + "' is not supported according the corresponding parameter definition."; return new OWSException( msg, OWSException.INVALID_PARAMETER_VALUE, outputParameterId.toString() ); }
@Override public OWSException inputEvalutationNotSupported( CodeType inputParameterId, Pair<String, String> kvp, String explanation ) { String msg = "Evaluating " + kvp + " for input parameter '" + inputParameterId + "' is not supported, because: " + explanation; return new OWSException( msg, OWSException.INVALID_PARAMETER_VALUE, inputParameterId.toString() ); }
@Override public OWSException outputInvalidCombination( CodeType outputParameterId, List<Pair<String, String>> conflictingKVPs ) { StringBuilder sb = new StringBuilder( processMsg ); sb.append( "The combination of" ); Iterator<Pair<String, String>> it = conflictingKVPs.iterator(); while ( it.hasNext() ) { sb.append( it.next() ); if ( it.hasNext() ) { sb.append( " and " ); } } sb.append( " is not supported for output parameter '" ).append( outputParameterId ); sb.append( "' according to the corresponding parameter definition." ); return new OWSException( sb.toString(), OWSException.INVALID_PARAMETER_VALUE, outputParameterId.toString() ); }
@Override public OWSException inputInvalidCombination( CodeType inputParameterId, List<Pair<String, String>> conflictingKVPs ) { StringBuilder sb = new StringBuilder( processMsg ); sb.append( "The combination of" ); Iterator<Pair<String, String>> it = conflictingKVPs.iterator(); while ( it.hasNext() ) { sb.append( it.next() ); if ( it.hasNext() ) { sb.append( " and " ); } } sb.append( " is not supported for input parameter '" ).append( inputParameterId ); sb.append( "' according to the corresponding parameter definition." ); return new OWSException( sb.toString(), OWSException.INVALID_PARAMETER_VALUE, inputParameterId.toString() ); }
@Override public OWSException inputInvalidOccurrence( CodeType inputParameterId, int minOccurs, int maxOccurs, int actualOccurs ) { StringBuilder msg = new StringBuilder( processMsg ); msg.append( "Input parameter '" ).append( inputParameterId ).append( "' is present " ).append( actualOccurs ).append( " times, " ); if ( minOccurs < actualOccurs ) { msg.append( "but at least " ).append( minOccurs ); msg.append( " occurrence(s) is/are required" ); } else { msg.append( "but only " ).append( maxOccurs ); msg.append( " occurrence(s) is/are allowed" ); } msg.append( " according to the corresponding parameter definition." ); return new OWSException( msg.toString(), OWSException.INVALID_PARAMETER_VALUE, inputParameterId.toString() ); }