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

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

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d05a.common.Relationship;    
import java.util.List;    
import org.milyn.edi.unedifact.d05a.common.PartyIdentification;    
import org.milyn.edi.unedifact.d05a.common.PersonDemographicInformation;    
import org.milyn.edi.unedifact.d05a.common.Address;    
import org.milyn.edi.unedifact.d05a.common.CommunicationContact;    
import org.milyn.edi.unedifact.d05a.common.Language;    
import org.milyn.edi.unedifact.d05a.common.CharacteristicValue;    
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 Relationship relationship;
    private List partyIdentification;
    private PersonDemographicInformation personDemographicInformation;
    private Address address;
    private List communicationContact;
    private Language language;
    private CharacteristicValue characteristicValue;

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

        if(relationship != null) {
            nodeWriter.write("REL");
            nodeWriter.write(delimiters.getField());
            relationship.write(nodeWriter, delimiters);
        }
        if(partyIdentification != null && !partyIdentification.isEmpty()) {
            for(PartyIdentification partyIdentificationInst : partyIdentification) {
                nodeWriter.write("PNA");
                nodeWriter.write(delimiters.getField());
                partyIdentificationInst.write(nodeWriter, delimiters);
            }
        }
        if(personDemographicInformation != null) {
            nodeWriter.write("PDI");
            nodeWriter.write(delimiters.getField());
            personDemographicInformation.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(language != null) {
            nodeWriter.write("LAN");
            nodeWriter.write(delimiters.getField());
            language.write(nodeWriter, delimiters);
        }
        if(characteristicValue != null) {
            nodeWriter.write("CAV");
            nodeWriter.write(delimiters.getField());
            characteristicValue.write(nodeWriter, delimiters);
        }
    }

    public Relationship getRelationship() {
        return relationship;
    }

    public SegmentGroup6 setRelationship(Relationship relationship) {
        this.relationship = relationship;  return this;
    }

    public List getPartyIdentification() {
        return partyIdentification;
    }

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

    public PersonDemographicInformation getPersonDemographicInformation() {
        return personDemographicInformation;
    }

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

    public Address getAddress() {
        return address;
    }

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

    public List getCommunicationContact() {
        return communicationContact;
    }

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

    public Language getLanguage() {
        return language;
    }

    public SegmentGroup6 setLanguage(Language language) {
        this.language = language;  return this;
    }

    public CharacteristicValue getCharacteristicValue() {
        return characteristicValue;
    }

    public SegmentGroup6 setCharacteristicValue(CharacteristicValue characteristicValue) {
        this.characteristicValue = characteristicValue;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy