All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.milyn.edi.unedifact.d05a.IFTDGN.SegmentGroup14 Maven / Gradle / Ivy

There is a newer version: 1.7.1.0
Show newest version
/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d05a.IFTDGN;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d05a.common.DangerousGoods;    
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.PlaceLocationIdentification;    
import org.milyn.edi.unedifact.d05a.common.Reference;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup14 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private DangerousGoods dangerousGoods;
    private List freeText;
    private List measurements;
    private List placeLocationIdentification;
    private List reference;
    private List segmentGroup15;

    public void write(Writer writer, Delimiters delimiters) throws IOException {
        
        Writer nodeWriter = writer;

        if(dangerousGoods != null) {
            nodeWriter.write("DGS");
            nodeWriter.write(delimiters.getField());
            dangerousGoods.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(placeLocationIdentification != null && !placeLocationIdentification.isEmpty()) {
            for(PlaceLocationIdentification placeLocationIdentificationInst : placeLocationIdentification) {
                nodeWriter.write("LOC");
                nodeWriter.write(delimiters.getField());
                placeLocationIdentificationInst.write(nodeWriter, delimiters);
            }
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup15 != null && !segmentGroup15.isEmpty()) {
            for(SegmentGroup15 segmentGroup15Inst : segmentGroup15) {
                segmentGroup15Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public DangerousGoods getDangerousGoods() {
        return dangerousGoods;
    }

    public SegmentGroup14 setDangerousGoods(DangerousGoods dangerousGoods) {
        this.dangerousGoods = dangerousGoods;  return this;
    }

    public List getFreeText() {
        return freeText;
    }

    public SegmentGroup14 setFreeText(List freeText) {
        this.freeText = freeText;  return this;
    }

    public List getMeasurements() {
        return measurements;
    }

    public SegmentGroup14 setMeasurements(List measurements) {
        this.measurements = measurements;  return this;
    }

    public List getPlaceLocationIdentification() {
        return placeLocationIdentification;
    }

    public SegmentGroup14 setPlaceLocationIdentification(List placeLocationIdentification) {
        this.placeLocationIdentification = placeLocationIdentification;  return this;
    }

    public List getReference() {
        return reference;
    }

    public SegmentGroup14 setReference(List reference) {
        this.reference = reference;  return this;
    }

    public List getSegmentGroup15() {
        return segmentGroup15;
    }

    public SegmentGroup14 setSegmentGroup15(List segmentGroup15) {
        this.segmentGroup15 = segmentGroup15;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy