org.milyn.edi.unedifact.d97a.common.DGSDangerousGoods Maven / Gradle / Ivy
The newest version!
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d97a.common;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d97a.common.field.C205HazardCode;
import org.milyn.edi.unedifact.d97a.common.field.C234UndgInformation;
import org.milyn.edi.unedifact.d97a.common.field.C223DangerousGoodsShipmentFlashpoint;
import org.milyn.edi.unedifact.d97a.common.field.C235HazardIdentification;
import org.milyn.edi.unedifact.d97a.common.field.C236DangerousGoodsLabel;
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 DGSDangerousGoods implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private String e8273DangerousGoodsRegulationsCoded;
private C205HazardCode c205HazardCode;
private C234UndgInformation c234UndgInformation;
private C223DangerousGoodsShipmentFlashpoint c223DangerousGoodsShipmentFlashpoint;
private String e8339PackingGroupCoded;
private String e8364EMSNumber;
private String e8410Mfag;
private String e8126TremCardNumber;
private C235HazardIdentification c235HazardIdentification;
private C236DangerousGoodsLabel c236DangerousGoodsLabel;
private String e8255PackingInstructionCoded;
private String e8325CategoryOfMeansOfTransportCoded;
private String e8211PermissionForTransportCoded;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(e8273DangerousGoodsRegulationsCoded != null) {
nodeWriter.write(delimiters.escape(e8273DangerousGoodsRegulationsCoded.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c205HazardCode != null) {
c205HazardCode.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c234UndgInformation != null) {
c234UndgInformation.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c223DangerousGoodsShipmentFlashpoint != null) {
c223DangerousGoodsShipmentFlashpoint.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e8339PackingGroupCoded != null) {
nodeWriter.write(delimiters.escape(e8339PackingGroupCoded.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e8364EMSNumber != null) {
nodeWriter.write(delimiters.escape(e8364EMSNumber.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e8410Mfag != null) {
nodeWriter.write(delimiters.escape(e8410Mfag.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e8126TremCardNumber != null) {
nodeWriter.write(delimiters.escape(e8126TremCardNumber.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c235HazardIdentification != null) {
c235HazardIdentification.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(c236DangerousGoodsLabel != null) {
c236DangerousGoodsLabel.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e8255PackingInstructionCoded != null) {
nodeWriter.write(delimiters.escape(e8255PackingInstructionCoded.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e8325CategoryOfMeansOfTransportCoded != null) {
nodeWriter.write(delimiters.escape(e8325CategoryOfMeansOfTransportCoded.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(e8211PermissionForTransportCoded != null) {
nodeWriter.write(delimiters.escape(e8211PermissionForTransportCoded.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 getE8273DangerousGoodsRegulationsCoded() {
return e8273DangerousGoodsRegulationsCoded;
}
public DGSDangerousGoods setE8273DangerousGoodsRegulationsCoded(String e8273DangerousGoodsRegulationsCoded) {
this.e8273DangerousGoodsRegulationsCoded = e8273DangerousGoodsRegulationsCoded; return this;
}
public C205HazardCode getC205HazardCode() {
return c205HazardCode;
}
public DGSDangerousGoods setC205HazardCode(C205HazardCode c205HazardCode) {
this.c205HazardCode = c205HazardCode; return this;
}
public C234UndgInformation getC234UndgInformation() {
return c234UndgInformation;
}
public DGSDangerousGoods setC234UndgInformation(C234UndgInformation c234UndgInformation) {
this.c234UndgInformation = c234UndgInformation; return this;
}
public C223DangerousGoodsShipmentFlashpoint getC223DangerousGoodsShipmentFlashpoint() {
return c223DangerousGoodsShipmentFlashpoint;
}
public DGSDangerousGoods setC223DangerousGoodsShipmentFlashpoint(C223DangerousGoodsShipmentFlashpoint c223DangerousGoodsShipmentFlashpoint) {
this.c223DangerousGoodsShipmentFlashpoint = c223DangerousGoodsShipmentFlashpoint; return this;
}
public String getE8339PackingGroupCoded() {
return e8339PackingGroupCoded;
}
public DGSDangerousGoods setE8339PackingGroupCoded(String e8339PackingGroupCoded) {
this.e8339PackingGroupCoded = e8339PackingGroupCoded; return this;
}
public String getE8364EMSNumber() {
return e8364EMSNumber;
}
public DGSDangerousGoods setE8364EMSNumber(String e8364EMSNumber) {
this.e8364EMSNumber = e8364EMSNumber; return this;
}
public String getE8410Mfag() {
return e8410Mfag;
}
public DGSDangerousGoods setE8410Mfag(String e8410Mfag) {
this.e8410Mfag = e8410Mfag; return this;
}
public String getE8126TremCardNumber() {
return e8126TremCardNumber;
}
public DGSDangerousGoods setE8126TremCardNumber(String e8126TremCardNumber) {
this.e8126TremCardNumber = e8126TremCardNumber; return this;
}
public C235HazardIdentification getC235HazardIdentification() {
return c235HazardIdentification;
}
public DGSDangerousGoods setC235HazardIdentification(C235HazardIdentification c235HazardIdentification) {
this.c235HazardIdentification = c235HazardIdentification; return this;
}
public C236DangerousGoodsLabel getC236DangerousGoodsLabel() {
return c236DangerousGoodsLabel;
}
public DGSDangerousGoods setC236DangerousGoodsLabel(C236DangerousGoodsLabel c236DangerousGoodsLabel) {
this.c236DangerousGoodsLabel = c236DangerousGoodsLabel; return this;
}
public String getE8255PackingInstructionCoded() {
return e8255PackingInstructionCoded;
}
public DGSDangerousGoods setE8255PackingInstructionCoded(String e8255PackingInstructionCoded) {
this.e8255PackingInstructionCoded = e8255PackingInstructionCoded; return this;
}
public String getE8325CategoryOfMeansOfTransportCoded() {
return e8325CategoryOfMeansOfTransportCoded;
}
public DGSDangerousGoods setE8325CategoryOfMeansOfTransportCoded(String e8325CategoryOfMeansOfTransportCoded) {
this.e8325CategoryOfMeansOfTransportCoded = e8325CategoryOfMeansOfTransportCoded; return this;
}
public String getE8211PermissionForTransportCoded() {
return e8211PermissionForTransportCoded;
}
public DGSDangerousGoods setE8211PermissionForTransportCoded(String e8211PermissionForTransportCoded) {
this.e8211PermissionForTransportCoded = e8211PermissionForTransportCoded; return this;
}
}