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

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

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.DateTimePeriod;    
import org.milyn.edi.unedifact.d96a.common.PlaceLocationIdentification;    
import org.milyn.edi.unedifact.d96a.common.Nationality;    
import org.milyn.edi.unedifact.d96a.common.PersonDemographicInformation;    
import java.util.List;    
import org.milyn.edi.unedifact.d96a.common.DocumentMessageDetails;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup6 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private PartyName partyName;
    private DateTimePeriod dateTimePeriod;
    private PlaceLocationIdentification placeLocationIdentification;
    private Nationality nationality;
    private PersonDemographicInformation personDemographicInformation;
    private List documentMessageDetails;

    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(dateTimePeriod != null) {
            nodeWriter.write("DTM");
            nodeWriter.write(delimiters.getField());
            dateTimePeriod.write(nodeWriter, delimiters);
        }
        if(placeLocationIdentification != null) {
            nodeWriter.write("LOC");
            nodeWriter.write(delimiters.getField());
            placeLocationIdentification.write(nodeWriter, delimiters);
        }
        if(nationality != null) {
            nodeWriter.write("NAT");
            nodeWriter.write(delimiters.getField());
            nationality.write(nodeWriter, delimiters);
        }
        if(personDemographicInformation != null) {
            nodeWriter.write("PDI");
            nodeWriter.write(delimiters.getField());
            personDemographicInformation.write(nodeWriter, delimiters);
        }
        if(documentMessageDetails != null && !documentMessageDetails.isEmpty()) {
            for(DocumentMessageDetails documentMessageDetailsInst : documentMessageDetails) {
                nodeWriter.write("DOC");
                nodeWriter.write(delimiters.getField());
                documentMessageDetailsInst.write(nodeWriter, delimiters);
            }
        }
    }

    public PartyName getPartyName() {
        return partyName;
    }

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

    public DateTimePeriod getDateTimePeriod() {
        return dateTimePeriod;
    }

    public SegmentGroup6 setDateTimePeriod(DateTimePeriod dateTimePeriod) {
        this.dateTimePeriod = dateTimePeriod;  return this;
    }

    public PlaceLocationIdentification getPlaceLocationIdentification() {
        return placeLocationIdentification;
    }

    public SegmentGroup6 setPlaceLocationIdentification(PlaceLocationIdentification placeLocationIdentification) {
        this.placeLocationIdentification = placeLocationIdentification;  return this;
    }

    public Nationality getNationality() {
        return nationality;
    }

    public SegmentGroup6 setNationality(Nationality nationality) {
        this.nationality = nationality;  return this;
    }

    public PersonDemographicInformation getPersonDemographicInformation() {
        return personDemographicInformation;
    }

    public SegmentGroup6 setPersonDemographicInformation(PersonDemographicInformation personDemographicInformation) {
        this.personDemographicInformation = personDemographicInformation;  return this;
    }

    public List getDocumentMessageDetails() {
        return documentMessageDetails;
    }

    public SegmentGroup6 setDocumentMessageDetails(List documentMessageDetails) {
        this.documentMessageDetails = documentMessageDetails;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy