org.milyn.edi.unedifact.d06b.IFTDGN.SegmentGroup12 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.IFTDGN;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.GoodsItemDetails;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.FreeText;
import org.milyn.edi.unedifact.d06b.common.PackageIdentification;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup12 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private GoodsItemDetails goodsItemDetails;
private List freeText;
private PackageIdentification packageIdentification;
private List segmentGroup13;
private SegmentGroup14 segmentGroup14;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(goodsItemDetails != null) {
nodeWriter.write("GID");
nodeWriter.write(delimiters.getField());
goodsItemDetails.write(nodeWriter, delimiters);
}
if(freeText != null && !freeText.isEmpty()) {
for(FreeText freeTextInst : freeText) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeTextInst.write(nodeWriter, delimiters);
}
}
if(packageIdentification != null) {
nodeWriter.write("PCI");
nodeWriter.write(delimiters.getField());
packageIdentification.write(nodeWriter, delimiters);
}
if(segmentGroup13 != null && !segmentGroup13.isEmpty()) {
for(SegmentGroup13 segmentGroup13Inst : segmentGroup13) {
segmentGroup13Inst.write(nodeWriter, delimiters);
}
}
if(segmentGroup14 != null) {
segmentGroup14.write(nodeWriter, delimiters);
}
}
public GoodsItemDetails getGoodsItemDetails() {
return goodsItemDetails;
}
public SegmentGroup12 setGoodsItemDetails(GoodsItemDetails goodsItemDetails) {
this.goodsItemDetails = goodsItemDetails; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup12 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
public PackageIdentification getPackageIdentification() {
return packageIdentification;
}
public SegmentGroup12 setPackageIdentification(PackageIdentification packageIdentification) {
this.packageIdentification = packageIdentification; return this;
}
public List getSegmentGroup13() {
return segmentGroup13;
}
public SegmentGroup12 setSegmentGroup13(List segmentGroup13) {
this.segmentGroup13 = segmentGroup13; return this;
}
public SegmentGroup14 getSegmentGroup14() {
return segmentGroup14;
}
public SegmentGroup12 setSegmentGroup14(SegmentGroup14 segmentGroup14) {
this.segmentGroup14 = segmentGroup14; return this;
}
}