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

org.milyn.edi.unedifact.d06b.CREADV.SegmentGroup6 Maven / Gradle / Ivy

/**
 * This class was generated by Smooks EJC (http://www.smooks.org).
 */
package org.milyn.edi.unedifact.d06b.CREADV;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d06b.common.ProcessingInformation;    
import org.milyn.edi.unedifact.d06b.common.MonetaryAmount;    
import java.util.List;    
import org.milyn.edi.unedifact.d06b.common.PlaceLocationIdentification;    
import org.milyn.edi.unedifact.d06b.common.NameAndAddress;    
import org.milyn.edi.unedifact.d06b.common.RequirementsAndConditions;    
import org.milyn.edi.unedifact.d06b.common.FreeText;    
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 ProcessingInformation processingInformation;
    private MonetaryAmount monetaryAmount;
    private List placeLocationIdentification;
    private NameAndAddress nameAndAddress;
    private RequirementsAndConditions requirementsAndConditions;
    private List freeText;

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

        if(processingInformation != null) {
            nodeWriter.write("GEI");
            nodeWriter.write(delimiters.getField());
            processingInformation.write(nodeWriter, delimiters);
        }
        if(monetaryAmount != null) {
            nodeWriter.write("MOA");
            nodeWriter.write(delimiters.getField());
            monetaryAmount.write(nodeWriter, delimiters);
        }
        if(placeLocationIdentification != null && !placeLocationIdentification.isEmpty()) {
            for(PlaceLocationIdentification placeLocationIdentificationInst : placeLocationIdentification) {
                nodeWriter.write("LOC");
                nodeWriter.write(delimiters.getField());
                placeLocationIdentificationInst.write(nodeWriter, delimiters);
            }
        }
        if(nameAndAddress != null) {
            nodeWriter.write("NAD");
            nodeWriter.write(delimiters.getField());
            nameAndAddress.write(nodeWriter, delimiters);
        }
        if(requirementsAndConditions != null) {
            nodeWriter.write("RCS");
            nodeWriter.write(delimiters.getField());
            requirementsAndConditions.write(nodeWriter, delimiters);
        }
        if(freeText != null && !freeText.isEmpty()) {
            for(FreeText freeTextInst : freeText) {
                nodeWriter.write("FTX");
                nodeWriter.write(delimiters.getField());
                freeTextInst.write(nodeWriter, delimiters);
            }
        }
    }

    public ProcessingInformation getProcessingInformation() {
        return processingInformation;
    }

    public SegmentGroup6 setProcessingInformation(ProcessingInformation processingInformation) {
        this.processingInformation = processingInformation;  return this;
    }

    public MonetaryAmount getMonetaryAmount() {
        return monetaryAmount;
    }

    public SegmentGroup6 setMonetaryAmount(MonetaryAmount monetaryAmount) {
        this.monetaryAmount = monetaryAmount;  return this;
    }

    public List getPlaceLocationIdentification() {
        return placeLocationIdentification;
    }

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

    public NameAndAddress getNameAndAddress() {
        return nameAndAddress;
    }

    public SegmentGroup6 setNameAndAddress(NameAndAddress nameAndAddress) {
        this.nameAndAddress = nameAndAddress;  return this;
    }

    public RequirementsAndConditions getRequirementsAndConditions() {
        return requirementsAndConditions;
    }

    public SegmentGroup6 setRequirementsAndConditions(RequirementsAndConditions requirementsAndConditions) {
        this.requirementsAndConditions = requirementsAndConditions;  return this;
    }

    public List getFreeText() {
        return freeText;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy