private LogField createLogField(Message message, Field field) {
MsgType messageType = getMessageType(message);
String messageTypeValue = messageType.getValue();
LogField logField =
LogField.createLogField(messageType, field, dictionary);
final DataDictionary.GroupInfo groupInfo = dictionary.getGroup(
messageTypeValue, field.getTag());
if (groupInfo != null) {
int delimeterField = groupInfo.getDelimeterField();
Group group = new Group(field.getTag(), delimeterField);
int numberOfGroups = Integer.valueOf((String) field.getObject());
for (int index = 0; index < numberOfGroups; index++) {
LogGroup logGroup =
new LogGroup(messageType, field, dictionary);
try {
message.getGroup(index + 1, group);
Iterator groupIterator = group.iterator();
while (groupIterator.hasNext()) {
Field groupField = (Field) groupIterator.next();
logGroup.addField(LogField.createLogField(messageType,
groupField, dictionary));
}
} catch (FieldNotFound fieldNotFound) {
}
logField.addGroup(logGroup);
}
}
return logField;
}