org.milyn.edi.unedifact.d06b.DMRDEF.SegmentGroup4 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.DMRDEF;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.SegmentUsageDetails;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.Attribute;
import org.milyn.edi.unedifact.d06b.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;
}
}