LOG.warn( "Assuming two-dimensional coordinates in BBOX string: '" + parameter.getValue() + "'" ); if ( parts.length < 4 ) { throw exceptionCustomizer.inputInvalidBBoxCoordinates( inputId, parts ); upperY = Double.parseDouble( parts[3] ); } catch ( NumberFormatException e ) { throw exceptionCustomizer.inputInvalidBBoxCoordinates( inputId, parts ); throw exceptionCustomizer.inputInvalidParameter( inputId, new Pair<String, String>( "crs", crsName ) );
parameter = AttributedParameter.valueOf( encodedParameter ); } catch ( IllegalArgumentException ie ) { throw exceptionCustomizer.invalidAttributedParameter( new Pair<String, String>( "DataInputs", encodedParameter ) ); int actualOccurs = inputIdToCount.get( inputId ) != null ? inputIdToCount.get( inputId ) : 0; if ( actualOccurs < minOccurs ) { throw exceptionCustomizer.inputInvalidOccurrence( inputId, minOccurs, maxOccurs, actualOccurs ); throw exceptionCustomizer.inputInvalidOccurrence( inputId, minOccurs, maxOccurs, actualOccurs );
private static ProcessletInputDefinition lookupInputDefinition( CodeType identifier, ProcessDefinition processDef, ExceptionCustomizer exceptionCustomizer ) throws OWSException { LOG.trace( "Looking up input type: " + identifier ); ProcessletInputDefinition inputType = null; InputParameters inputParams = processDef.getInputParameters(); for ( JAXBElement<? extends ProcessletInputDefinition> el : inputParams.getProcessInput() ) { LOG.trace( "Defined input type: " + el.getValue().getIdentifier().getValue() ); org.deegree.process.jaxb.java.CodeType inputId = el.getValue().getIdentifier(); if ( equals( identifier, inputId ) ) { inputType = el.getValue(); } } if ( inputType == null ) { throw exceptionCustomizer.inputNoSuchParameter( identifier ); } return inputType; }
inputElements = getRequiredElements( dataInputsElement, new XPath( "wps:Input", nsContext ) ); } catch ( XMLParsingException e ) { throw eCustomizer.missingParameter( new QName( WPS_100_NS, "Input" ).toString() ); int actualOccurs = inputIdToCount.get( inputId ) != null ? inputIdToCount.get( inputId ) : 0; if ( actualOccurs < minOccurs || actualOccurs > maxOccurs ) { throw eCustomizer.inputInvalidOccurrence( inputId, minOccurs, maxOccurs, actualOccurs );
: wpsElement( "BoundingBoxData" ); throw eCustomizer.inputMissingParameter( inputId, allowedInputParam ); throw eCustomizer.inputMissingParameter( inputId, wpsElement( "LiteralInput" ) + "/" + wpsElement( "LiteralData" ) ); } else if ( definition instanceof BoundingBoxInputDefinition ) { if ( !"BoundingBoxData".equals( name ) ) { throw eCustomizer.inputMissingParameter( inputId, wpsElement( "BoundingBox" ) + "/" + wpsElement( "BoundingBoxData" ) ); } else if ( definition instanceof ComplexInputDefinition ) { if ( !"ComplexData".equals( name ) ) { throw eCustomizer.inputMissingParameter( inputId, wpsElement( "ComplexInput" ) + "/" + wpsElement( "ComplexData" ) ); Pair<String, String> kvp = new Pair<String, String>( new QName( WPS_100_NS, "Reference" ).toString(), href ); throw eCustomizer.inputEvalutationNotSupported( inputId, kvp, "Reference may only be used with complex data." ); throw eCustomizer.mutualExclusive( wpsElement( "Data" ), wpsElement( "Reference" ) ); } else { throw eCustomizer.inputMissingParameters( inputId, wpsElement( "Data" ), wpsElement( "Reference" ) );
href = getRequiredNodeAsURL( referenceElement, new XPath( "@xlink:href", nsContext ) ); } catch ( XMLParsingException e ) { throw eCustomizer.inputMissingParameter( getIdentifier( definition ), wpsElement( "Reference" ) + "/@xlink:href" ); isPost = true; } else { throw eCustomizer.invalidAttributedParameter( new Pair<String, String>( wpsElement( "Reference" ) + "/@method", method ) ); key = getRequiredNodeAsString( headerElement, new XPath( "@key", nsContext ) ); } catch ( XMLParsingException e ) { throw eCustomizer.inputMissingParameter( getIdentifier( definition ), wpsElement( "Header" ) + "/@key" ); value = getRequiredNodeAsString( headerElement, new XPath( "@value", nsContext ) ); } catch ( XMLParsingException e ) { throw eCustomizer.inputMissingParameter( getIdentifier( definition ), wpsElement( "Header" ) + "/@value" ); bodyURL = getRequiredNodeAsURL( bodyReferenceElement, new XPath( "@xlink:href", nsContext ) ); } catch ( XMLParsingException e ) { throw eCustomizer.inputMissingParameter( getIdentifier( definition ), wpsElement( "BodyReference" ) + "/@xlink:href" ); throw eCustomizer.inputMutualExclusive( getIdentifier( definition ), wpsElement( "Body" ), wpsElement( "BodyReference" ) ); } else { throw eCustomizer.inputMissingParameters( getIdentifier( definition ), wpsElement( "Body" ), wpsElement( "BodyReference" ) );
String definedDataType = definition.getDataType() != null ? definition.getDataType().getValue() : dataType; if ( dataType != null && !dataType.equals( definedDataType ) ) { throw eCustomizer.inputInvalidDatatype( identifier, dataType, definedDataType ); throw eCustomizer.inputInvalidParameter( identifier, new Pair<String, String>( "@uom", uom ) );
throw eCustomizer.inputInvalidParameter( getIdentifier( definition ), new Pair<String, String>( "mimetype", format.getMimeType() ) ); combi.add( new Pair<String, String>( "mimetype", format.getMimeType() ) ); combi.add( new Pair<String, String>( "schema", format.getSchema() ) ); throw eCustomizer.inputInvalidCombination( getIdentifier( definition ), combi ); combi.add( new Pair<String, String>( "schema", format.getSchema() ) ); combi.add( new Pair<String, String>( "encoding", format.getEncoding() ) ); throw eCustomizer.inputInvalidCombination( getIdentifier( definition ), combi );
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 ); }
throw eCustomizer.inputInvalidParameter( getIdentifier( definition ), new Pair<String, String>( "@crs", crs ) );
String definedDataType = definition.getDataType() != null ? definition.getDataType().getValue() : dataType; if ( dataType != null && !dataType.equals( definedDataType ) ) { throw exceptionCustomizer.inputInvalidDatatype( inputId, dataType, definedDataType ); throw exceptionCustomizer.inputInvalidParameter( inputId, new Pair<String, String>( "uom", uom ) );
CodeType identifier = new CodeType( definition.getIdentifier().getValue(), definition.getIdentifier().getCodeSpace() ); throw exceptionCustomizer.inputInvalidParameter( identifier, new Pair<String, String>( "mimetype", format.getMimeType() ) ); combi.add( new Pair<String, String>( "mimetype", format.getMimeType() ) ); combi.add( new Pair<String, String>( "schema", format.getSchema() ) ); throw exceptionCustomizer.inputInvalidCombination( identifier, combi ); combi.add( new Pair<String, String>( "schema", format.getSchema() ) ); combi.add( new Pair<String, String>( "encoding", format.getEncoding() ) ); throw exceptionCustomizer.inputInvalidCombination( identifier, combi );
private ProcessletInputDefinition lookupInputDefinition( CodeType identifier, ProcessDefinition processDef, ExceptionCustomizer eCustomizer ) throws OWSException { LOG.trace( "Looking up input type: " + identifier ); ProcessletInputDefinition inputType = null; InputParameters inputParams = processDef.getInputParameters(); if ( inputParams != null ) { for ( JAXBElement<? extends ProcessletInputDefinition> el : inputParams.getProcessInput() ) { LOG.trace( "Defined input type: " + el.getValue().getIdentifier().getValue() ); org.deegree.process.jaxb.java.CodeType inputId = el.getValue().getIdentifier(); if ( equals( identifier, inputId ) ) { inputType = el.getValue(); } } } if ( inputType == null ) { throw eCustomizer.inputNoSuchParameter( identifier ); } return inputType; }