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

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d96a.common.PartyName;    
import org.milyn.edi.unedifact.d96a.common.Address;    
import java.util.List;    
import org.milyn.edi.unedifact.d96a.common.PlaceLocationIdentification;    
import org.milyn.edi.unedifact.d96a.common.DateTimePeriod;    
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 PartyName partyName;
    private Address address;
    private List placeLocationIdentification;
    private List dateTimePeriod;
    private FreeText freeText;
    private List segmentGroup16;

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

        if(partyName != null) {
            nodeWriter.write("PNA");
            nodeWriter.write(delimiters.getField());
            partyName.write(nodeWriter, delimiters);
        }
        if(address != null) {
            nodeWriter.write("ADR");
            nodeWriter.write(delimiters.getField());
            address.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 && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(freeText != null) {
            nodeWriter.write("FTX");
            nodeWriter.write(delimiters.getField());
            freeText.write(nodeWriter, delimiters);
        }
        if(segmentGroup16 != null && !segmentGroup16.isEmpty()) {
            for(SegmentGroup16 segmentGroup16Inst : segmentGroup16) {
                segmentGroup16Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public PartyName getPartyName() {
        return partyName;
    }

    public SegmentGroup15 setPartyName(PartyName partyName) {
        this.partyName = partyName;  return this;
    }

    public Address getAddress() {
        return address;
    }

    public SegmentGroup15 setAddress(Address address) {
        this.address = address;  return this;
    }

    public List getPlaceLocationIdentification() {
        return placeLocationIdentification;
    }

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

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public FreeText getFreeText() {
        return freeText;
    }

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

    public List getSegmentGroup16() {
        return segmentGroup16;
    }

    public SegmentGroup15 setSegmentGroup16(List segmentGroup16) {
        this.segmentGroup16 = segmentGroup16;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy