Package edu.harvard.fas.zfeledy.fiximulator.util

Examples of edu.harvard.fas.zfeledy.fiximulator.util.LogField


  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;
    }
View Full Code Here


    public int getRowCount() {
        return fields.size();
    }

    public Object getValueAt( int row, int column ) {
        LogField logField = fields.get( row );
        if (column == 0) return logField.getFieldName();
        if (column == 1) return logField.getTag();
        if (column == 2) return logField.getValue();
        if (column == 3) return logField.getFieldValueName();
        if (column == 4) return (logField.isRequired() ? "Yes" : "No");
        if (column == 5) {
            if (logField.isHeaderField()) return "Header";
            if (logField.isTrailerField()) return "Trailer";
            return "Body";
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of edu.harvard.fas.zfeledy.fiximulator.util.LogField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.