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

org.milyn.edi.unedifact.d05a.MEDPRE.SegmentGroup11 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.d05a.MEDPRE;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d05a.common.TermsOfDeliveryOrTransport;    
import org.milyn.edi.unedifact.d05a.common.TransportInformation;    
import java.util.List;    
import org.milyn.edi.unedifact.d05a.common.FreeText;    
import org.milyn.edi.unedifact.d05a.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d05a.common.Address;    
import org.milyn.edi.unedifact.d05a.common.CommunicationContact;    
import org.milyn.edi.unedifact.d05a.common.PartyIdentification;    
import org.milyn.edi.unedifact.d05a.common.Priority;    
import org.milyn.edi.unedifact.d05a.common.Package;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup11 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private TermsOfDeliveryOrTransport termsOfDeliveryOrTransport;
    private TransportInformation transportInformation;
    private List freeText;
    private List dateTimePeriod;
    private Address address;
    private List communicationContact;
    private List partyIdentification;
    private Priority priority;
    private Package _package;

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

        if(termsOfDeliveryOrTransport != null) {
            nodeWriter.write("TOD");
            nodeWriter.write(delimiters.getField());
            termsOfDeliveryOrTransport.write(nodeWriter, delimiters);
        }
        if(transportInformation != null) {
            nodeWriter.write("TDT");
            nodeWriter.write(delimiters.getField());
            transportInformation.write(nodeWriter, delimiters);
        }
        if(freeText != null && !freeText.isEmpty()) {
            for(FreeText freeTextInst : freeText) {
                nodeWriter.write("FTX");
                nodeWriter.write(delimiters.getField());
                freeTextInst.write(nodeWriter, delimiters);
            }
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(address != null) {
            nodeWriter.write("ADR");
            nodeWriter.write(delimiters.getField());
            address.write(nodeWriter, delimiters);
        }
        if(communicationContact != null && !communicationContact.isEmpty()) {
            for(CommunicationContact communicationContactInst : communicationContact) {
                nodeWriter.write("COM");
                nodeWriter.write(delimiters.getField());
                communicationContactInst.write(nodeWriter, delimiters);
            }
        }
        if(partyIdentification != null && !partyIdentification.isEmpty()) {
            for(PartyIdentification partyIdentificationInst : partyIdentification) {
                nodeWriter.write("PNA");
                nodeWriter.write(delimiters.getField());
                partyIdentificationInst.write(nodeWriter, delimiters);
            }
        }
        if(priority != null) {
            nodeWriter.write("PTY");
            nodeWriter.write(delimiters.getField());
            priority.write(nodeWriter, delimiters);
        }
        if(_package != null) {
            nodeWriter.write("PAC");
            nodeWriter.write(delimiters.getField());
            _package.write(nodeWriter, delimiters);
        }
    }

    public TermsOfDeliveryOrTransport getTermsOfDeliveryOrTransport() {
        return termsOfDeliveryOrTransport;
    }

    public SegmentGroup11 setTermsOfDeliveryOrTransport(TermsOfDeliveryOrTransport termsOfDeliveryOrTransport) {
        this.termsOfDeliveryOrTransport = termsOfDeliveryOrTransport;  return this;
    }

    public TransportInformation getTransportInformation() {
        return transportInformation;
    }

    public SegmentGroup11 setTransportInformation(TransportInformation transportInformation) {
        this.transportInformation = transportInformation;  return this;
    }

    public List getFreeText() {
        return freeText;
    }

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

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public Address getAddress() {
        return address;
    }

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

    public List getCommunicationContact() {
        return communicationContact;
    }

    public SegmentGroup11 setCommunicationContact(List communicationContact) {
        this.communicationContact = communicationContact;  return this;
    }

    public List getPartyIdentification() {
        return partyIdentification;
    }

    public SegmentGroup11 setPartyIdentification(List partyIdentification) {
        this.partyIdentification = partyIdentification;  return this;
    }

    public Priority getPriority() {
        return priority;
    }

    public SegmentGroup11 setPriority(Priority priority) {
        this.priority = priority;  return this;
    }

    public Package get_package() {
        return _package;
    }

    public SegmentGroup11 set_package(Package _package) {
        this._package = _package;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy