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

org.milyn.edi.unedifact.d98a.CONDRO.SegmentGroup8 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.d98a.CONDRO;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d98a.common.PlaceLocationIdentification;    
import java.util.List;    
import org.milyn.edi.unedifact.d98a.common.Dimensions;    
import org.milyn.edi.unedifact.d98a.common.Quantity;    
import org.milyn.edi.unedifact.d98a.common.Measurements;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup8 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private PlaceLocationIdentification placeLocationIdentification;
    private List dimensions;
    private List quantity;
    private Measurements measurements;

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

        if(placeLocationIdentification != null) {
            nodeWriter.write("LOC");
            nodeWriter.write(delimiters.getField());
            placeLocationIdentification.write(nodeWriter, delimiters);
        }
        if(dimensions != null && !dimensions.isEmpty()) {
            for(Dimensions dimensionsInst : dimensions) {
                nodeWriter.write("DIM");
                nodeWriter.write(delimiters.getField());
                dimensionsInst.write(nodeWriter, delimiters);
            }
        }
        if(quantity != null && !quantity.isEmpty()) {
            for(Quantity quantityInst : quantity) {
                nodeWriter.write("QTY");
                nodeWriter.write(delimiters.getField());
                quantityInst.write(nodeWriter, delimiters);
            }
        }
        if(measurements != null) {
            nodeWriter.write("MEA");
            nodeWriter.write(delimiters.getField());
            measurements.write(nodeWriter, delimiters);
        }
    }

    public PlaceLocationIdentification getPlaceLocationIdentification() {
        return placeLocationIdentification;
    }

    public SegmentGroup8 setPlaceLocationIdentification(PlaceLocationIdentification placeLocationIdentification) {
        this.placeLocationIdentification = placeLocationIdentification;  return this;
    }

    public List getDimensions() {
        return dimensions;
    }

    public SegmentGroup8 setDimensions(List dimensions) {
        this.dimensions = dimensions;  return this;
    }

    public List getQuantity() {
        return quantity;
    }

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

    public Measurements getMeasurements() {
        return measurements;
    }

    public SegmentGroup8 setMeasurements(Measurements measurements) {
        this.measurements = measurements;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy