org.milyn.edi.unedifact.d05a.common.FTXFreeText Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d05a.common;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d05a.common.field.C107TextReference;
import org.milyn.edi.unedifact.d05a.common.field.C108TextLiteral;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
import java.io.StringWriter;
import java.util.List;
import java.util.ArrayList;
import org.milyn.edisax.util.EDIUtils;
import org.milyn.edisax.model.internal.DelimiterType;
public class FTXFreeText implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private String e4451TextSubjectCodeQualifier;
private String e4453FreeTextFunctionCode;
private C107TextReference c107TextReference;
private C108TextLiteral c108TextLiteral;
private String e3453LanguageNameCode;
private String e4447FreeTextFormatCode;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(e4451TextSubjectCodeQualifier != null) {
nodeWriter.write(delimiters.escape(e4451TextSubjectCodeQualifier.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e4453FreeTextFunctionCode != null) {
nodeWriter.write(delimiters.escape(e4453FreeTextFunctionCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c107TextReference != null) {
c107TextReference.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c108TextLiteral != null) {
c108TextLiteral.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e3453LanguageNameCode != null) {
nodeWriter.write(delimiters.escape(e3453LanguageNameCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e4447FreeTextFormatCode != null) {
nodeWriter.write(delimiters.escape(e4447FreeTextFormatCode.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeTokens.add(nodeWriter.toString());
writer.write(EDIUtils.concatAndTruncate(nodeTokens, DelimiterType.FIELD, delimiters));
writer.write(delimiters.getSegmentDelimiter());
writer.flush();
}
public String getE4451TextSubjectCodeQualifier() {
return e4451TextSubjectCodeQualifier;
}
public FTXFreeText setE4451TextSubjectCodeQualifier(String e4451TextSubjectCodeQualifier) {
this.e4451TextSubjectCodeQualifier = e4451TextSubjectCodeQualifier; return this;
}
public String getE4453FreeTextFunctionCode() {
return e4453FreeTextFunctionCode;
}
public FTXFreeText setE4453FreeTextFunctionCode(String e4453FreeTextFunctionCode) {
this.e4453FreeTextFunctionCode = e4453FreeTextFunctionCode; return this;
}
public C107TextReference getC107TextReference() {
return c107TextReference;
}
public FTXFreeText setC107TextReference(C107TextReference c107TextReference) {
this.c107TextReference = c107TextReference; return this;
}
public C108TextLiteral getC108TextLiteral() {
return c108TextLiteral;
}
public FTXFreeText setC108TextLiteral(C108TextLiteral c108TextLiteral) {
this.c108TextLiteral = c108TextLiteral; return this;
}
public String getE3453LanguageNameCode() {
return e3453LanguageNameCode;
}
public FTXFreeText setE3453LanguageNameCode(String e3453LanguageNameCode) {
this.e3453LanguageNameCode = e3453LanguageNameCode; return this;
}
public String getE4447FreeTextFormatCode() {
return e4447FreeTextFormatCode;
}
public FTXFreeText setE4447FreeTextFormatCode(String e4447FreeTextFormatCode) {
this.e4447FreeTextFormatCode = e4447FreeTextFormatCode; return this;
}
}