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

org.milyn.edi.unedifact.d06b.PRODEX.SegmentGroup3 Maven / Gradle / Ivy

/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d06b.PRODEX;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.LineItem;    
import java.util.List;    
import org.milyn.edi.unedifact.d06b.common.ProcessingInformation;    
import org.milyn.edi.unedifact.d06b.common.PlaceLocationIdentification;    
import org.milyn.edi.unedifact.d06b.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d06b.common.Measurements;    
import org.milyn.edi.unedifact.d06b.common.Quantity;    
import org.milyn.edi.unedifact.d06b.common.TransportInformation;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup3 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private LineItem lineItem;
    private List processingInformation;
    private List placeLocationIdentification;
    private DateTimePeriod dateTimePeriod;
    private List measurements;
    private List quantity;
    private List transportInformation;
    private List segmentGroup4;

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

        if(lineItem != null) {
            nodeWriter.write("LIN");
            nodeWriter.write(delimiters.getField());
            lineItem.write(nodeWriter, delimiters);
        }
        if(processingInformation != null && !processingInformation.isEmpty()) {
            for(ProcessingInformation processingInformationInst : processingInformation) {
                nodeWriter.write("GEI");
                nodeWriter.write(delimiters.getField());
                processingInformationInst.write(nodeWriter, delimiters);
            }
        }
        if(placeLocationIdentification != null && !placeLocationIdentification.isEmpty()) {
            for(PlaceLocationIdentification placeLocationIdentificationInst : placeLocationIdentification) {
                nodeWriter.write("LOC");
                nodeWriter.write(delimiters.getField());
                placeLocationIdentificationInst.write(nodeWriter, delimiters);
            }
        }
        if(dateTimePeriod != null) {
            nodeWriter.write("DTM");
            nodeWriter.write(delimiters.getField());
            dateTimePeriod.write(nodeWriter, delimiters);
        }
        if(measurements != null && !measurements.isEmpty()) {
            for(Measurements measurementsInst : measurements) {
                nodeWriter.write("MEA");
                nodeWriter.write(delimiters.getField());
                measurementsInst.write(nodeWriter, delimiters);
            }
        }
        if(quantity != null && !quantity.isEmpty()) {
            for(Quantity quantityInst : quantity) {
                nodeWriter.write("QTY");
                nodeWriter.write(delimiters.getField());
                quantityInst.write(nodeWriter, delimiters);
            }
        }
        if(transportInformation != null && !transportInformation.isEmpty()) {
            for(TransportInformation transportInformationInst : transportInformation) {
                nodeWriter.write("TDT");
                nodeWriter.write(delimiters.getField());
                transportInformationInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup4 != null && !segmentGroup4.isEmpty()) {
            for(SegmentGroup4 segmentGroup4Inst : segmentGroup4) {
                segmentGroup4Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public LineItem getLineItem() {
        return lineItem;
    }

    public SegmentGroup3 setLineItem(LineItem lineItem) {
        this.lineItem = lineItem;  return this;
    }

    public List getProcessingInformation() {
        return processingInformation;
    }

    public SegmentGroup3 setProcessingInformation(List processingInformation) {
        this.processingInformation = processingInformation;  return this;
    }

    public List getPlaceLocationIdentification() {
        return placeLocationIdentification;
    }

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

    public DateTimePeriod getDateTimePeriod() {
        return dateTimePeriod;
    }

    public SegmentGroup3 setDateTimePeriod(DateTimePeriod dateTimePeriod) {
        this.dateTimePeriod = dateTimePeriod;  return this;
    }

    public List getMeasurements() {
        return measurements;
    }

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

    public List getQuantity() {
        return quantity;
    }

    public SegmentGroup3 setQuantity(List quantity) {
        this.quantity = quantity;  return this;
    }

    public List getTransportInformation() {
        return transportInformation;
    }

    public SegmentGroup3 setTransportInformation(List transportInformation) {
        this.transportInformation = transportInformation;  return this;
    }

    public List getSegmentGroup4() {
        return segmentGroup4;
    }

    public SegmentGroup3 setSegmentGroup4(List segmentGroup4) {
        this.segmentGroup4 = segmentGroup4;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy