org.milyn.edi.unedifact.d05a.BERMAN.SegmentGroup10 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d05a.BERMAN;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d05a.common.NatureOfCargo;
import java.util.List;
import org.milyn.edi.unedifact.d05a.common.FreeText;
import org.milyn.edi.unedifact.d05a.common.Measurements;
import org.milyn.edi.unedifact.d05a.common.NumberOfUnits;
import org.milyn.edi.unedifact.d05a.common.DangerousGoods;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup10 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private NatureOfCargo natureOfCargo;
private List freeText;
private List measurements;
private List numberOfUnits;
private List dangerousGoods;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(natureOfCargo != null) {
nodeWriter.write("GDS");
nodeWriter.write(delimiters.getField());
natureOfCargo.write(nodeWriter, delimiters);
}
if(freeText != null && !freeText.isEmpty()) {
for(FreeText freeTextInst : freeText) {
nodeWriter.write("FTX");
nodeWriter.write(delimiters.getField());
freeTextInst.write(nodeWriter, delimiters);
}
}
if(measurements != null && !measurements.isEmpty()) {
for(Measurements measurementsInst : measurements) {
nodeWriter.write("MEA");
nodeWriter.write(delimiters.getField());
measurementsInst.write(nodeWriter, delimiters);
}
}
if(numberOfUnits != null && !numberOfUnits.isEmpty()) {
for(NumberOfUnits numberOfUnitsInst : numberOfUnits) {
nodeWriter.write("EQN");
nodeWriter.write(delimiters.getField());
numberOfUnitsInst.write(nodeWriter, delimiters);
}
}
if(dangerousGoods != null && !dangerousGoods.isEmpty()) {
for(DangerousGoods dangerousGoodsInst : dangerousGoods) {
nodeWriter.write("DGS");
nodeWriter.write(delimiters.getField());
dangerousGoodsInst.write(nodeWriter, delimiters);
}
}
}
public NatureOfCargo getNatureOfCargo() {
return natureOfCargo;
}
public SegmentGroup10 setNatureOfCargo(NatureOfCargo natureOfCargo) {
this.natureOfCargo = natureOfCargo; return this;
}
public List getFreeText() {
return freeText;
}
public SegmentGroup10 setFreeText(List freeText) {
this.freeText = freeText; return this;
}
public List getMeasurements() {
return measurements;
}
public SegmentGroup10 setMeasurements(List measurements) {
this.measurements = measurements; return this;
}
public List getNumberOfUnits() {
return numberOfUnits;
}
public SegmentGroup10 setNumberOfUnits(List numberOfUnits) {
this.numberOfUnits = numberOfUnits; return this;
}
public List getDangerousGoods() {
return dangerousGoods;
}
public SegmentGroup10 setDangerousGoods(List dangerousGoods) {
this.dangerousGoods = dangerousGoods; return this;
}
}