org.milyn.edi.unedifact.d02a.SSIMOD.SegmentGroup2 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d02a.SSIMOD;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d02a.common.IndexDetails;
import org.milyn.edi.unedifact.d02a.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;
}
}