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

org.milyn.edi.unedifact.d98a.CONDRA.SegmentGroup9 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.d98a.CONDRA;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import org.milyn.edi.unedifact.d98a.common.SequenceDetails;    
import org.milyn.edi.unedifact.d98a.common.StructureIdentification;    
import org.milyn.edi.unedifact.d98a.common.Reference;    
import java.util.List;    
import org.milyn.edi.unedifact.d98a.common.GeneralIndicator;    
import org.milyn.edi.unedifact.d98a.common.DateTimePeriod;    
import org.milyn.edi.unedifact.d98a.common.ItemDescription;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    

public class SegmentGroup9 implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private SequenceDetails sequenceDetails;
    private StructureIdentification structureIdentification;
    private Reference reference;
    private List generalIndicator;
    private DateTimePeriod dateTimePeriod;
    private ItemDescription itemDescription;

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

        if(sequenceDetails != null) {
            nodeWriter.write("SEQ");
            nodeWriter.write(delimiters.getField());
            sequenceDetails.write(nodeWriter, delimiters);
        }
        if(structureIdentification != null) {
            nodeWriter.write("BII");
            nodeWriter.write(delimiters.getField());
            structureIdentification.write(nodeWriter, delimiters);
        }
        if(reference != null) {
            nodeWriter.write("RFF");
            nodeWriter.write(delimiters.getField());
            reference.write(nodeWriter, delimiters);
        }
        if(generalIndicator != null && !generalIndicator.isEmpty()) {
            for(GeneralIndicator generalIndicatorInst : generalIndicator) {
                nodeWriter.write("GIS");
                nodeWriter.write(delimiters.getField());
                generalIndicatorInst.write(nodeWriter, delimiters);
            }
        }
        if(dateTimePeriod != null) {
            nodeWriter.write("DTM");
            nodeWriter.write(delimiters.getField());
            dateTimePeriod.write(nodeWriter, delimiters);
        }
        if(itemDescription != null) {
            nodeWriter.write("IMD");
            nodeWriter.write(delimiters.getField());
            itemDescription.write(nodeWriter, delimiters);
        }
    }

    public SequenceDetails getSequenceDetails() {
        return sequenceDetails;
    }

    public SegmentGroup9 setSequenceDetails(SequenceDetails sequenceDetails) {
        this.sequenceDetails = sequenceDetails;  return this;
    }

    public StructureIdentification getStructureIdentification() {
        return structureIdentification;
    }

    public SegmentGroup9 setStructureIdentification(StructureIdentification structureIdentification) {
        this.structureIdentification = structureIdentification;  return this;
    }

    public Reference getReference() {
        return reference;
    }

    public SegmentGroup9 setReference(Reference reference) {
        this.reference = reference;  return this;
    }

    public List getGeneralIndicator() {
        return generalIndicator;
    }

    public SegmentGroup9 setGeneralIndicator(List generalIndicator) {
        this.generalIndicator = generalIndicator;  return this;
    }

    public DateTimePeriod getDateTimePeriod() {
        return dateTimePeriod;
    }

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

    public ItemDescription getItemDescription() {
        return itemDescription;
    }

    public SegmentGroup9 setItemDescription(ItemDescription itemDescription) {
        this.itemDescription = itemDescription;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy