//handle the literal case
if (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()) ) {
Class type = lppio.getType();
if(PRIMITIVE_TO_WRAPPER.containsKey(type)) {
type = PRIMITIVE_TO_WRAPPER.get(type);
}
Name typeName = xsp.name(type);
if ( typeName != null ) {
literal.setDataType(Ows11Util.type("xs:" + typeName.getLocalPart()));
}
}
if (p.metadata.get(Parameter.OPTIONS) != null) {
List<Object> options = (List<Object>) p.metadata.get(Parameter.OPTIONS);
Object[] optionsArray = options.toArray(new Object[options.size()]);
addAllowedValues(literal, optionsArray);
} else if (lppio.getType().isEnum()) {
Object[] enumValues = lppio.getType().getEnumConstants();
addAllowedValues(literal, enumValues);
} else {
literal.setAnyValue( owsf.createAnyValueType() );
}
try {
if (p.sample != null) {
literal.setDefaultValue(lppio.encode(p.sample));
}
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Failed to fill the default value for input " + p.key
+ " of process " + name, e);
}