private void setLocalInputDataBufferPoly(ExecuteProcessRequest exeRequest,
ProcessDescriptionsType processDesc, Geometry geom1) throws ParseException
{
// this process takes 2 input, a geometry and a buffer amount.
ProcessDescriptionType pdt = (ProcessDescriptionType) processDesc.getProcessDescription().get(0);
InputDescriptionType idt = (InputDescriptionType) pdt.getDataInputs().getInput().get(0);
// create input buffer
int bufferAmnt = 350;
// create and set the input on the exe request
if (idt.getIdentifier().getValue().equalsIgnoreCase("buffer"))
{
// set buffer input
DataType input = WPSUtils.createInputDataType(bufferAmnt, idt);
List<EObject> list = new ArrayList<EObject>();
list.add(input);
exeRequest.addInput(idt.getIdentifier().getValue(), list);
// set geom input
idt = (InputDescriptionType) pdt.getDataInputs().getInput().get(1);
DataType input2 = WPSUtils.createInputDataType(geom1, idt);
List<EObject> list2 = new ArrayList<EObject>();
list2.add(input2);
exeRequest.addInput(idt.getIdentifier().getValue(), list2);
}
else
{
// set geom input
DataType input2 = WPSUtils.createInputDataType(geom1, idt);
List<EObject> list2 = new ArrayList<EObject>();
list2.add(input2);
exeRequest.addInput(idt.getIdentifier().getValue(), list2);
// set buffer input
idt = (InputDescriptionType) pdt.getDataInputs().getInput().get(1);
DataType input = WPSUtils.createInputDataType(bufferAmnt, idt);
List<EObject> list = new ArrayList<EObject>();
list.add(input);
exeRequest.addInput(idt.getIdentifier().getValue(), list);