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

org.milyn.edi.unedifact.d02a.IFCSUM.SegmentGroup2 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.d02a.IFCSUM;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d02a.common.GovernmentalRequirements;    
import java.util.List;    
import org.milyn.edi.unedifact.d02a.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d02a.common.PlaceLocationIdentification;    
import org.milyn.edi.unedifact.d02a.common.SealNumber;    
import org.milyn.edi.unedifact.d02a.common.FreeText;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup2 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private GovernmentalRequirements governmentalRequirements;
    private List dateTimePeriod;
    private List placeLocationIdentification;
    private List sealNumber;
    private List freeText;
    private List segmentGroup3;

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

        if(governmentalRequirements != null) {
            nodeWriter.write("GOR");
            nodeWriter.write(delimiters.getField());
            governmentalRequirements.write(nodeWriter, delimiters);
        }
        if(dateTimePeriod != null && !dateTimePeriod.isEmpty()) {
            for(DateTimePeriod dateTimePeriodInst : dateTimePeriod) {
                nodeWriter.write("DTM");
                nodeWriter.write(delimiters.getField());
                dateTimePeriodInst.write(nodeWriter, delimiters);
            }
        }
        if(placeLocationIdentification != null && !placeLocationIdentification.isEmpty()) {
            for(PlaceLocationIdentification placeLocationIdentificationInst : placeLocationIdentification) {
                nodeWriter.write("LOC");
                nodeWriter.write(delimiters.getField());
                placeLocationIdentificationInst.write(nodeWriter, delimiters);
            }
        }
        if(sealNumber != null && !sealNumber.isEmpty()) {
            for(SealNumber sealNumberInst : sealNumber) {
                nodeWriter.write("SEL");
                nodeWriter.write(delimiters.getField());
                sealNumberInst.write(nodeWriter, delimiters);
            }
        }
        if(freeText != null && !freeText.isEmpty()) {
            for(FreeText freeTextInst : freeText) {
                nodeWriter.write("FTX");
                nodeWriter.write(delimiters.getField());
                freeTextInst.write(nodeWriter, delimiters);
            }
        }
        if(segmentGroup3 != null && !segmentGroup3.isEmpty()) {
            for(SegmentGroup3 segmentGroup3Inst : segmentGroup3) {
                segmentGroup3Inst.write(nodeWriter, delimiters);
            }
        }
    }

    public GovernmentalRequirements getGovernmentalRequirements() {
        return governmentalRequirements;
    }

    public SegmentGroup2 setGovernmentalRequirements(GovernmentalRequirements governmentalRequirements) {
        this.governmentalRequirements = governmentalRequirements;  return this;
    }

    public List getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public List getPlaceLocationIdentification() {
        return placeLocationIdentification;
    }

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

    public List getSealNumber() {
        return sealNumber;
    }

    public SegmentGroup2 setSealNumber(List sealNumber) {
        this.sealNumber = sealNumber;  return this;
    }

    public List getFreeText() {
        return freeText;
    }

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

    public List getSegmentGroup3() {
        return segmentGroup3;
    }

    public SegmentGroup2 setSegmentGroup3(List segmentGroup3) {
        this.segmentGroup3 = segmentGroup3;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy