}
void processOutputs( ProcessOutputsType outputs, ProcessFactory pf, Name name) {
Map<String,Parameter<?>> outs = pf.getResultInfo(name, null);
for ( Parameter p : outs.values() ) {
OutputDescriptionType output = wpsf.createOutputDescriptionType();
outputs.getOutput().add( output );
output.setIdentifier( Ows11Util.code( p.key ) );
output.setTitle( Ows11Util.languageString( p.title ) );
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 );
LiteralOutputType literal = wpsf.createLiteralOutputType();
output.setLiteralOutput(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() ) );
}
}
}
else {
//handle the complex data case
SupportedComplexDataType complex = wpsf.createSupportedComplexDataType();
output.setComplexOutput( complex );
complex.setSupported( wpsf.createComplexDataCombinationsType() );
for ( ProcessParameterIO ppio : ppios ) {
ComplexPPIO cppio = (ComplexPPIO) ppio;