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

org.milyn.edi.unedifact.d96a.SAFHAZ.SegmentGroup15 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.d96a.SAFHAZ;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d96a.common.Measurements;    
import java.util.List;    
import org.milyn.edi.unedifact.d96a.common.TestMethod;    
import org.milyn.edi.unedifact.d96a.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d96a.common.Reference;    
import org.milyn.edi.unedifact.d96a.common.FreeText;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup15 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private Measurements measurements;
    private List testMethod;
    private List dateTimePeriod;
    private List reference;
    private List freeText;

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

        if(measurements != null) {
            nodeWriter.write("MEA");
            nodeWriter.write(delimiters.getField());
            measurements.write(nodeWriter, delimiters);
        }
        if(testMethod != null && !testMethod.isEmpty()) {
            for(TestMethod testMethodInst : testMethod) {
                nodeWriter.write("TEM");
                nodeWriter.write(delimiters.getField());
                testMethodInst.write(nodeWriter, delimiters);
            }
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(reference != null && !reference.isEmpty()) {
            for(Reference referenceInst : reference) {
                nodeWriter.write("RFF");
                nodeWriter.write(delimiters.getField());
                referenceInst.write(nodeWriter, delimiters);
            }
        }
        if(freeText != null && !freeText.isEmpty()) {
            for(FreeText freeTextInst : freeText) {
                nodeWriter.write("FTX");
                nodeWriter.write(delimiters.getField());
                freeTextInst.write(nodeWriter, delimiters);
            }
        }
    }

    public Measurements getMeasurements() {
        return measurements;
    }

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

    public List getTestMethod() {
        return testMethod;
    }

    public SegmentGroup15 setTestMethod(List testMethod) {
        this.testMethod = testMethod;  return this;
    }

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

    public SegmentGroup15 setDateTimePeriod(List dateTimePeriod) {
        this.dateTimePeriod = dateTimePeriod;  return this;
    }

    public List getReference() {
        return reference;
    }

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

    public List getFreeText() {
        return freeText;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy