org.milyn.edi.unedifact.d06b.SUPRES.SegmentGroup18 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.SUPRES;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.NameAndAddress;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.Attribute;
import org.milyn.edi.unedifact.d06b.common.Reference;
import org.milyn.edi.unedifact.d06b.common.Language;
import org.milyn.edi.unedifact.d06b.common.FreeText;
import org.milyn.edi.unedifact.d06b.common.CommunicationContact;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup18 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private NameAndAddress nameAndAddress;
private List attribute;
private List reference;
private Language language;
private List freeText;
private List communicationContact;
private SegmentGroup19 segmentGroup19;
private List segmentGroup20;
private List segmentGroup21;
private List segmentGroup22;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(nameAndAddress != null) {
nodeWriter.write("NAD");
nodeWriter.write(delimiters.getField());
nameAndAddress.write(nodeWriter, delimiters);
}
if(attribute != null && !attribute.isEmpty()) {
for(Attribute attributeInst : attribute) {
nodeWriter.write("ATT");
nodeWriter.write(delimiters.getField());
attributeInst.write(nodeWriter, delimiters);
}
}
if(reference != null && !reference.isEmpty()) {
for(Reference referenceInst : reference) {
nodeWriter.write("RFF");
nodeWriter.write(delimiters.getField());
referenceInst.write(nodeWriter, delimiters);
}
}
if(language != null) {
nodeWriter.write("LAN");
nodeWriter.write(delimiters.getField());
language.write(nodeWriter, delimiters);
}
if(freeText != null && !freeText.isEmpty()) {
for(FreeText freeTextInst : freeText) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeTextInst.write(nodeWriter, delimiters);
}
}
if(communicationContact != null && !communicationContact.isEmpty()) {
for(CommunicationContact communicationContactInst : communicationContact) {
nodeWriter.write("COM");
nodeWriter.write(delimiters.getField());
communicationContactInst.write(nodeWriter, delimiters);
}
}
if(segmentGroup19 != null) {
segmentGroup19.write(nodeWriter, delimiters);
}
if(segmentGroup20 != null && !segmentGroup20.isEmpty()) {
for(SegmentGroup20 segmentGroup20Inst : segmentGroup20) {
segmentGroup20Inst.write(nodeWriter, delimiters);
}
}
if(segmentGroup21 != null && !segmentGroup21.isEmpty()) {
for(SegmentGroup21 segmentGroup21Inst : segmentGroup21) {
segmentGroup21Inst.write(nodeWriter, delimiters);
}
}
if(segmentGroup22 != null && !segmentGroup22.isEmpty()) {
for(SegmentGroup22 segmentGroup22Inst : segmentGroup22) {
segmentGroup22Inst.write(nodeWriter, delimiters);
}
}
}
public NameAndAddress getNameAndAddress() {
return nameAndAddress;
}
public SegmentGroup18 setNameAndAddress(NameAndAddress nameAndAddress) {
this.nameAndAddress = nameAndAddress; return this;
}
public List getAttribute() {
return attribute;
}
public SegmentGroup18 setAttribute(List attribute) {
this.attribute = attribute; return this;
}
public List getReference() {
return reference;
}
public SegmentGroup18 setReference(List reference) {
this.reference = reference; return this;
}
public Language getLanguage() {
return language;
}
public SegmentGroup18 setLanguage(Language language) {
this.language = language; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup18 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
public List getCommunicationContact() {
return communicationContact;
}
public SegmentGroup18 setCommunicationContact(List communicationContact) {
this.communicationContact = communicationContact; return this;
}
public SegmentGroup19 getSegmentGroup19() {
return segmentGroup19;
}
public SegmentGroup18 setSegmentGroup19(SegmentGroup19 segmentGroup19) {
this.segmentGroup19 = segmentGroup19; return this;
}
public List getSegmentGroup20() {
return segmentGroup20;
}
public SegmentGroup18 setSegmentGroup20(List segmentGroup20) {
this.segmentGroup20 = segmentGroup20; return this;
}
public List getSegmentGroup21() {
return segmentGroup21;
}
public SegmentGroup18 setSegmentGroup21(List segmentGroup21) {
this.segmentGroup21 = segmentGroup21; return this;
}
public List getSegmentGroup22() {
return segmentGroup22;
}
public SegmentGroup18 setSegmentGroup22(List segmentGroup22) {
this.segmentGroup22 = segmentGroup22; return this;
}
}