All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.milyn.edi.unedifact.d98a.SSIMOD.SegmentGroup2 Maven / Gradle / Ivy

There is a newer version: 1.7.1.0
Show newest version
/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d98a.SSIMOD;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d98a.common.IndexDetails;    
import org.milyn.edi.unedifact.d98a.common.FreeText;    
import java.util.List;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup2 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private IndexDetails indexDetails;
    private FreeText freeText;
    private List segmentGroup3;

    public void write(Writer writer, Delimiters delimiters) throws IOException {
        
        Writer nodeWriter = writer;

        if(indexDetails != null) {
            nodeWriter.write("IND");
            nodeWriter.write(delimiters.getField());
            indexDetails.write(nodeWriter, delimiters);
        }
        if(freeText != null) {
            nodeWriter.write("FTX");
            nodeWriter.write(delimiters.getField());
            freeText.write(nodeWriter, delimiters);
        }
        if(segmentGroup3 != null && !segmentGroup3.isEmpty()) {
            for(SegmentGroup3 segmentGroup3Inst : segmentGroup3) {
                segmentGroup3Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public IndexDetails getIndexDetails() {
        return indexDetails;
    }

    public SegmentGroup2 setIndexDetails(IndexDetails indexDetails) {
        this.indexDetails = indexDetails;  return this;
    }

    public FreeText getFreeText() {
        return freeText;
    }

    public SegmentGroup2 setFreeText(FreeText freeText) {
        this.freeText = freeText;  return this;
    }

    public List getSegmentGroup3() {
        return segmentGroup3;
    }

    public SegmentGroup2 setSegmentGroup3(List segmentGroup3) {
        this.segmentGroup3 = segmentGroup3;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy