I got Field like this:
, FieldEntry fid="15" name="CURRENCY" dataType="Enum" value="978"
and I need to convert 978 to some currency ISO code,
where I can look up a dictionary ?
Hello @monakhov
The Enum displays(names) are in the dictionary file named enumtype.def. Anyway, EMA downloads this dictionary from the server automatically by default. To get the Enum display according to its value, just call FieldEntry.enumDisplay(). FieldEntry is in com.thomsonreuters.ema.access package.
The example snipped source code:
//in onRefreshMsg(..) and onUpdateMsg(..)decode(msg.payload().fieldList());...void decode(FieldList fieldList){ for (FieldEntry fieldEntry : fieldList) { System.out.print("Fid: " + fieldEntry.fieldId() + " Name = " + fieldEntry.name() + " DataType: " + DataType.asString(fieldEntry.load().dataType()) + " Value: "); if (Data.DataCode.BLANK == fieldEntry.code()) System.out.println(" blank"); else switch (fieldEntry.loadType()) { ... case DataTypes.ENUM : System.out.println(fieldEntry.hasEnumDisplay() ? fieldEntry.enumDisplay() : fieldEntry.enumValue()); break; ... } }}
You can see the complete application source code in AppClient class of example360__MarketPrice__View that I have suggested you in your previous question.
Hope this help.