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

org.milyn.edi.unedifact.d05a.DIRDEF.SegmentGroup4 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.d05a.DIRDEF;

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

public class SegmentGroup4 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private SegmentUsageDetails segmentUsageDetails;
    private List attribute;
    private List freeText;
    private SegmentGroup5 segmentGroup5;

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

        if(segmentUsageDetails != null) {
            nodeWriter.write("SGU");
            nodeWriter.write(delimiters.getField());
            segmentUsageDetails.write(nodeWriter, delimiters);
        }
        if(attribute != null && !attribute.isEmpty()) {
            for(Attribute attributeInst : attribute) {
                nodeWriter.write("ATT");
                nodeWriter.write(delimiters.getField());
                attributeInst.write(nodeWriter, delimiters);
            }
        }
        if(freeText != null && !freeText.isEmpty()) {
            for(FreeText freeTextInst : freeText) {
                nodeWriter.write("FTX");
                nodeWriter.write(delimiters.getField());
                freeTextInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup5 != null) {
            segmentGroup5.write(nodeWriter, delimiters);
        }
    }

    public SegmentUsageDetails getSegmentUsageDetails() {
        return segmentUsageDetails;
    }

    public SegmentGroup4 setSegmentUsageDetails(SegmentUsageDetails segmentUsageDetails) {
        this.segmentUsageDetails = segmentUsageDetails;  return this;
    }

    public List getAttribute() {
        return attribute;
    }

    public SegmentGroup4 setAttribute(List attribute) {
        this.attribute = attribute;  return this;
    }

    public List getFreeText() {
        return freeText;
    }

    public SegmentGroup4 setFreeText(List freeText) {
        this.freeText = freeText;  return this;
    }

    public SegmentGroup5 getSegmentGroup5() {
        return segmentGroup5;
    }

    public SegmentGroup4 setSegmentGroup5(SegmentGroup5 segmentGroup5) {
        this.segmentGroup5 = segmentGroup5;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy