Iterator iterator = outputs.iterator();
while (iterator.hasNext())
{
OutputDataType odt = (OutputDataType) iterator.next();
DataType data = odt.getData();
ComplexDataType complexData = data.getComplexData();
LiteralDataType literalData = data.getLiteralData();
if (literalData != null)
{
// use the converters api to try and create an object of the type
// we want (default to the String value if it failed).
Object value = literalData.getValue();
if (literalData.getDataType() != null)
{
Class type = getLiteralTypeFromReference(literalData.getDataType());
Object convertedValue = Converters.convert(literalData.getValue(), type);
if (convertedValue != null)
{
value = convertedValue;
}
}
map.put(odt.getIdentifier().getValue(), value);
}
else if (complexData != null)
{
// if we have a list of values for this output, store it as a arraylist
EList datas = complexData.getData();
if (datas.size() > 1)
{
Iterator iterator2 = datas.iterator();
List<Object> values = new ArrayList<Object>();
while (iterator2.hasNext())