*/
Map<String, Object> parseProcessInputs(ExecuteType request, Name processName, ProcessFactory pf) {
Map<String, Object> inputs = new HashMap<String, Object>();
final Map<String, Parameter<?>> parameters = pf.getParameterInfo(processName);
for (Iterator i = request.getDataInputs().getInput().iterator(); i.hasNext();) {
InputType input = (InputType) i.next();
String inputId = input.getIdentifier().getValue();
// locate the parameter for this request
Parameter p = parameters.get(inputId);
if (p == null) {
throw new WPSException("No such parameter: " + inputId);
}
// find the ppio
String mime = null;
if (input.getData() != null && input.getData().getComplexData() != null) {
mime = input.getData().getComplexData().getMimeType();
} else if (input.getReference() != null) {
mime = input.getReference().getMimeType();
}
ProcessParameterIO ppio = ProcessParameterIO.find(p, context, mime);
if (ppio == null) {
throw new WPSException("Unable to decode input: " + inputId);
}
// read the data
Object decoded = null;
try {
if (input.getReference() != null) {
// this is a reference
InputReferenceType ref = input.getReference();
// grab the location and method
String href = ref.getHref();
if (href.startsWith("http://geoserver/wfs")) {
decoded = handleAsInternalWFS(ppio, ref);
} else if (href.startsWith("http://geoserver/wcs")) {
decoded = handleAsInternalWCS(ppio, ref);
} else if (href.startsWith("http://geoserver/wps")) {
decoded = handleAsInternalWPS(ppio, ref);
} else {
decoded = executeRemoteRequest(ref, (ComplexPPIO) ppio, inputId);
}
} else {
// actual data, figure out which type
DataType data = input.getData();
if (data.getLiteralData() != null) {
LiteralDataType literal = data.getLiteralData();
decoded = ((LiteralPPIO) ppio).decode(literal.getValue());
} else if (data.getComplexData() != null) {