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

org.milyn.edi.unedifact.d11b.common.PSDPhysicalSampleDescription 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.d11b.common;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d11b.common.field.C526FrequencyDetails;    
import org.milyn.edi.unedifact.d11b.common.field.C5141SampleLocationDetails;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    
import java.io.StringWriter;    
import java.util.List;    
import java.util.ArrayList;    
import org.milyn.edisax.util.EDIUtils;    
import org.milyn.edisax.model.internal.DelimiterType;    

public class PSDPhysicalSampleDescription implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private String e4407SampleProcessStepCode;
    private String e7039SampleSelectionMethodCode;
    private C526FrequencyDetails c526FrequencyDetails;
    private String e7045SampleStateCode;
    private String e7047SampleDirectionCode;
    private C5141SampleLocationDetails c5141SampleLocationDetails;
    private C5141SampleLocationDetails c5142SampleLocationDetails;
    private C5141SampleLocationDetails c5143SampleLocationDetails;

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

        List nodeTokens = new ArrayList();

        if(e4407SampleProcessStepCode != null) {
            nodeWriter.write(delimiters.escape(e4407SampleProcessStepCode.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e7039SampleSelectionMethodCode != null) {
            nodeWriter.write(delimiters.escape(e7039SampleSelectionMethodCode.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c526FrequencyDetails != null) {
            c526FrequencyDetails.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e7045SampleStateCode != null) {
            nodeWriter.write(delimiters.escape(e7045SampleStateCode.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e7047SampleDirectionCode != null) {
            nodeWriter.write(delimiters.escape(e7047SampleDirectionCode.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c5141SampleLocationDetails != null) {
            c5141SampleLocationDetails.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c5142SampleLocationDetails != null) {
            c5142SampleLocationDetails.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c5143SampleLocationDetails != null) {
            c5143SampleLocationDetails.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeTokens.add(nodeWriter.toString());
        writer.write(EDIUtils.concatAndTruncate(nodeTokens, DelimiterType.FIELD, delimiters));
        writer.write(delimiters.getSegmentDelimiter());
        writer.flush();
    }

    public String getE4407SampleProcessStepCode() {
        return e4407SampleProcessStepCode;
    }

    public PSDPhysicalSampleDescription setE4407SampleProcessStepCode(String e4407SampleProcessStepCode) {
        this.e4407SampleProcessStepCode = e4407SampleProcessStepCode;  return this;
    }

    public String getE7039SampleSelectionMethodCode() {
        return e7039SampleSelectionMethodCode;
    }

    public PSDPhysicalSampleDescription setE7039SampleSelectionMethodCode(String e7039SampleSelectionMethodCode) {
        this.e7039SampleSelectionMethodCode = e7039SampleSelectionMethodCode;  return this;
    }

    public C526FrequencyDetails getC526FrequencyDetails() {
        return c526FrequencyDetails;
    }

    public PSDPhysicalSampleDescription setC526FrequencyDetails(C526FrequencyDetails c526FrequencyDetails) {
        this.c526FrequencyDetails = c526FrequencyDetails;  return this;
    }

    public String getE7045SampleStateCode() {
        return e7045SampleStateCode;
    }

    public PSDPhysicalSampleDescription setE7045SampleStateCode(String e7045SampleStateCode) {
        this.e7045SampleStateCode = e7045SampleStateCode;  return this;
    }

    public String getE7047SampleDirectionCode() {
        return e7047SampleDirectionCode;
    }

    public PSDPhysicalSampleDescription setE7047SampleDirectionCode(String e7047SampleDirectionCode) {
        this.e7047SampleDirectionCode = e7047SampleDirectionCode;  return this;
    }

    public C5141SampleLocationDetails getC5141SampleLocationDetails() {
        return c5141SampleLocationDetails;
    }

    public PSDPhysicalSampleDescription setC5141SampleLocationDetails(C5141SampleLocationDetails c5141SampleLocationDetails) {
        this.c5141SampleLocationDetails = c5141SampleLocationDetails;  return this;
    }

    public C5141SampleLocationDetails getC5142SampleLocationDetails() {
        return c5142SampleLocationDetails;
    }

    public PSDPhysicalSampleDescription setC5142SampleLocationDetails(C5141SampleLocationDetails c5142SampleLocationDetails) {
        this.c5142SampleLocationDetails = c5142SampleLocationDetails;  return this;
    }

    public C5141SampleLocationDetails getC5143SampleLocationDetails() {
        return c5143SampleLocationDetails;
    }

    public PSDPhysicalSampleDescription setC5143SampleLocationDetails(C5141SampleLocationDetails c5143SampleLocationDetails) {
        this.c5143SampleLocationDetails = c5143SampleLocationDetails;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy