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

org.milyn.edi.unedifact.d07a.common.TRUTechnicalRules 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.d07a.common;

import java.io.Serializable;    
import org.milyn.smooks.edi.EDIWritable;    
import java.io.Writer;    
import org.milyn.edisax.model.internal.Delimiters;    
import java.io.IOException;    
import java.io.StringWriter;    
import java.util.List;    
import java.util.ArrayList;    
import org.milyn.edisax.util.EDIUtils;    
import org.milyn.edisax.model.internal.DelimiterType;    

public class TRUTechnicalRules implements Serializable, EDIWritable {

    private static final long serialVersionUID = 1L;

    private String e7402ObjectIdentifier;
    private String e1056VersionIdentifier;
    private String e1058ReleaseIdentifier;
    private String e7175RulePartIdentifier;
    private String e3055CodeListResponsibleAgencyCode;

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

        List nodeTokens = new ArrayList();

        if(e7402ObjectIdentifier != null) {
            nodeWriter.write(delimiters.escape(e7402ObjectIdentifier.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e1056VersionIdentifier != null) {
            nodeWriter.write(delimiters.escape(e1056VersionIdentifier.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e1058ReleaseIdentifier != null) {
            nodeWriter.write(delimiters.escape(e1058ReleaseIdentifier.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e7175RulePartIdentifier != null) {
            nodeWriter.write(delimiters.escape(e7175RulePartIdentifier.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeWriter.write(delimiters.getField());
        if(e3055CodeListResponsibleAgencyCode != null) {
            nodeWriter.write(delimiters.escape(e3055CodeListResponsibleAgencyCode.toString()));
            nodeTokens.add(nodeWriter.toString());
            ((StringWriter)nodeWriter).getBuffer().setLength(0);
        }
        nodeTokens.add(nodeWriter.toString());
        writer.write(EDIUtils.concatAndTruncate(nodeTokens, DelimiterType.FIELD, delimiters));
        writer.write(delimiters.getSegmentDelimiter());
        writer.flush();
    }

    public String getE7402ObjectIdentifier() {
        return e7402ObjectIdentifier;
    }

    public TRUTechnicalRules setE7402ObjectIdentifier(String e7402ObjectIdentifier) {
        this.e7402ObjectIdentifier = e7402ObjectIdentifier;  return this;
    }

    public String getE1056VersionIdentifier() {
        return e1056VersionIdentifier;
    }

    public TRUTechnicalRules setE1056VersionIdentifier(String e1056VersionIdentifier) {
        this.e1056VersionIdentifier = e1056VersionIdentifier;  return this;
    }

    public String getE1058ReleaseIdentifier() {
        return e1058ReleaseIdentifier;
    }

    public TRUTechnicalRules setE1058ReleaseIdentifier(String e1058ReleaseIdentifier) {
        this.e1058ReleaseIdentifier = e1058ReleaseIdentifier;  return this;
    }

    public String getE7175RulePartIdentifier() {
        return e7175RulePartIdentifier;
    }

    public TRUTechnicalRules setE7175RulePartIdentifier(String e7175RulePartIdentifier) {
        this.e7175RulePartIdentifier = e7175RulePartIdentifier;  return this;
    }

    public String getE3055CodeListResponsibleAgencyCode() {
        return e3055CodeListResponsibleAgencyCode;
    }

    public TRUTechnicalRules setE3055CodeListResponsibleAgencyCode(String e3055CodeListResponsibleAgencyCode) {
        this.e3055CodeListResponsibleAgencyCode = e3055CodeListResponsibleAgencyCode;  return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy