org.milyn.edi.unedifact.d06b.PROTAP.SegmentGroup1 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.PROTAP;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.Reference;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.ItemDescription;
import org.milyn.edi.unedifact.d06b.common.StructureIdentification;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup1 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private Reference reference;
private List itemDescription;
private List structureIdentification;
private List segmentGroup2;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(reference != null) {
nodeWriter.write("RFF");
nodeWriter.write(delimiters.getField());
reference.write(nodeWriter, delimiters);
}
if(itemDescription != null && !itemDescription.isEmpty()) {
for(ItemDescription itemDescriptionInst : itemDescription) {
nodeWriter.write("IMD");
nodeWriter.write(delimiters.getField());
itemDescriptionInst.write(nodeWriter, delimiters);
}
}
if(structureIdentification != null && !structureIdentification.isEmpty()) {
for(StructureIdentification structureIdentificationInst : structureIdentification) {
nodeWriter.write("BII");
nodeWriter.write(delimiters.getField());
structureIdentificationInst.write(nodeWriter, delimiters);
}
}
if(segmentGroup2 != null && !segmentGroup2.isEmpty()) {
for(SegmentGroup2 segmentGroup2Inst : segmentGroup2) {
segmentGroup2Inst.write(nodeWriter, delimiters);
}
}
}
public Reference getReference() {
return reference;
}
public SegmentGroup1 setReference(Reference reference) {
this.reference = reference; return this;
}
public List getItemDescription() {
return itemDescription;
}
public SegmentGroup1 setItemDescription(List itemDescription) {
this.itemDescription = itemDescription; return this;
}
public List getStructureIdentification() {
return structureIdentification;
}
public SegmentGroup1 setStructureIdentification(List structureIdentification) {
this.structureIdentification = structureIdentification; return this;
}
public List getSegmentGroup2() {
return segmentGroup2;
}
public SegmentGroup1 setSegmentGroup2(List segmentGroup2) {
this.segmentGroup2 = segmentGroup2; return this;
}
}