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

org.milyn.edi.unedifact.d07a.common.LOCPlaceLocationIdentification 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.d07a.common;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d07a.common.field.C517LocationIdentification;    
import org.milyn.edi.unedifact.d07a.common.field.C519RelatedLocationOneIdentification;    
import org.milyn.edi.unedifact.d07a.common.field.C553RelatedLocationTwoIdentification;    
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 LOCPlaceLocationIdentification implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private String e3227LocationFunctionCodeQualifier;
    private C517LocationIdentification c517LocationIdentification;
    private C519RelatedLocationOneIdentification c519RelatedLocationOneIdentification;
    private C553RelatedLocationTwoIdentification c553RelatedLocationTwoIdentification;
    private String e5479RelationCode;

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

        List nodeTokens = new ArrayList();

        if(e3227LocationFunctionCodeQualifier != null) {
            nodeWriter.write(delimiters.escape(e3227LocationFunctionCodeQualifier.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c517LocationIdentification != null) {
            c517LocationIdentification.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c519RelatedLocationOneIdentification != null) {
            c519RelatedLocationOneIdentification.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(c553RelatedLocationTwoIdentification != null) {
            c553RelatedLocationTwoIdentification.write(nodeWriter, delimiters);
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e5479RelationCode != null) {
            nodeWriter.write(delimiters.escape(e5479RelationCode.toString()));
            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 getE3227LocationFunctionCodeQualifier() {
        return e3227LocationFunctionCodeQualifier;
    }

    public LOCPlaceLocationIdentification setE3227LocationFunctionCodeQualifier(String e3227LocationFunctionCodeQualifier) {
        this.e3227LocationFunctionCodeQualifier = e3227LocationFunctionCodeQualifier;  return this;
    }

    public C517LocationIdentification getC517LocationIdentification() {
        return c517LocationIdentification;
    }

    public LOCPlaceLocationIdentification setC517LocationIdentification(C517LocationIdentification c517LocationIdentification) {
        this.c517LocationIdentification = c517LocationIdentification;  return this;
    }

    public C519RelatedLocationOneIdentification getC519RelatedLocationOneIdentification() {
        return c519RelatedLocationOneIdentification;
    }

    public LOCPlaceLocationIdentification setC519RelatedLocationOneIdentification(C519RelatedLocationOneIdentification c519RelatedLocationOneIdentification) {
        this.c519RelatedLocationOneIdentification = c519RelatedLocationOneIdentification;  return this;
    }

    public C553RelatedLocationTwoIdentification getC553RelatedLocationTwoIdentification() {
        return c553RelatedLocationTwoIdentification;
    }

    public LOCPlaceLocationIdentification setC553RelatedLocationTwoIdentification(C553RelatedLocationTwoIdentification c553RelatedLocationTwoIdentification) {
        this.c553RelatedLocationTwoIdentification = c553RelatedLocationTwoIdentification;  return this;
    }

    public String getE5479RelationCode() {
        return e5479RelationCode;
    }

    public LOCPlaceLocationIdentification setE5479RelationCode(String e5479RelationCode) {
        this.e5479RelationCode = e5479RelationCode;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy