use of net.opengis.wps10.SupportedComplexDataInputType in project sldeditor by robward-scisys.
the class CustomProcessFunctionTest method createProcessDescriptionBBox.
/**
* Test the process description boundaing box values.
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@Test
public void createProcessDescriptionBBox() {
ProcessDescriptionType process = Wps10FactoryImpl.init().createProcessDescriptionType();
CodeType codeType = Ows11FactoryImpl.init().createCodeType();
codeType.setValue("JTS:area");
process.setIdentifier(codeType);
InputDescriptionType inputDescription = Wps10FactoryImpl.init().createInputDescriptionType();
CodeType codeType2 = Ows11FactoryImpl.init().createCodeType();
codeType2.setValue("dummyParameter");
inputDescription.setIdentifier(codeType2);
inputDescription.setMinOccurs(BigInteger.valueOf(1));
inputDescription.setMaxOccurs(BigInteger.valueOf(1));
DataInputsType dataInputs = Wps10FactoryImpl.init().createDataInputsType();
EList dataInputList = dataInputs.getInput();
dataInputList.add(inputDescription);
process.setDataInputs(dataInputs);
SupportedCRSsType crs = Wps10FactoryImpl.init().createSupportedCRSsType();
inputDescription.setBoundingBoxData(crs);
CustomProcessFunction obj = new CustomProcessFunction();
List<ProcessFunctionParameterValue> valueList = obj.extractParameters(process);
assertEquals(1, valueList.size());
ProcessFunctionParameterValue value = valueList.get(0);
assertEquals(1, value.minOccurences);
assertEquals(1, value.maxOccurences);
assertTrue(value.dataType.compareTo("BBOX") == 0);
SupportedComplexDataInputType complex = Wps10FactoryImpl.init().createSupportedComplexDataInputType();
inputDescription.setComplexData(complex);
inputDescription.setBoundingBoxData(null);
valueList = obj.extractParameters(process);
assertEquals(1, valueList.size());
value = valueList.get(0);
assertEquals(1, value.minOccurences);
assertEquals(1, value.maxOccurences);
assertTrue(value.dataType.compareTo("Geometry") == 0);
}
Aggregations