processOutputs( outputs, pf, name );
}
void dataInputs( DataInputsType inputs, ProcessFactory pf, Name name) {
for(Parameter<?> p : pf.getParameterInfo(name).values()) {
InputDescriptionType input = wpsf.createInputDescriptionType();
inputs.getInput().add( input );
input.setIdentifier( Ows11Util.code( p.key ) );
input.setTitle( Ows11Util.languageString( p.title ) );
input.setAbstract( Ows11Util.languageString( p.description ) );
// WPS spec specifies non-negative for unlimited inputs, so -1 -> 0
input.setMaxOccurs( p.maxOccurs == -1
? BigInteger.valueOf( Long.MAX_VALUE ) : BigInteger.valueOf( p.maxOccurs ) );
input.setMinOccurs( BigInteger.valueOf( p.minOccurs ) );
List<ProcessParameterIO> ppios = ProcessParameterIO.findAll( p, context);
if ( ppios.isEmpty() ) {
throw new WPSException( "Could not find process parameter for type " + p.key + "," + p.type );
}
//handle the literal case
if ( ppios.size() == 1 && ppios.get( 0 ) instanceof LiteralPPIO ) {
LiteralPPIO lppio = (LiteralPPIO) ppios.get( 0 );
LiteralInputType literal = wpsf.createLiteralInputType();
input.setLiteralData( literal );
//map the java class to an xml type name
if ( !String.class.equals( lppio.getType() ) ) {
Name typeName = xsp.name( lppio.getType() );
if ( typeName != null ) {
literal.setDataType( Ows11Util.type( typeName.getLocalPart() ) );
}
}
literal.setAnyValue( owsf.createAnyValueType() );
//TODO: output the default value
}
else {
//handle the complex data case
SupportedComplexDataInputType complex = wpsf.createSupportedComplexDataInputType();
input.setComplexData( complex );
complex.setSupported( wpsf.createComplexDataCombinationsType() );
for ( ProcessParameterIO ppio : ppios ) {
ComplexPPIO cppio = (ComplexPPIO) ppio;