org.milyn.edi.unedifact.d96a.common.DataSetIdentification Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d96a.common;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d96a.common.field.DataSetIdentificationC782;
import org.milyn.edi.unedifact.d96a.common.field.PartyIdentificationDetailsC082;
import org.milyn.edi.unedifact.d96a.common.field.SequenceInformationC286;
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 DataSetIdentification implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private DataSetIdentificationC782 dataSetIdentification;
private PartyIdentificationDetailsC082 partyIdentificationDetails;
private String statusCoded;
private SequenceInformationC286 sequenceInformation;
private String revisionNumber;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = new StringWriter();
List nodeTokens = new ArrayList();
if(dataSetIdentification != null) {
dataSetIdentification.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(partyIdentificationDetails != null) {
partyIdentificationDetails.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(statusCoded != null) {
nodeWriter.write(delimiters.escape(statusCoded.toString()));
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(sequenceInformation != null) {
sequenceInformation.write(nodeWriter, delimiters);
nodeTokens.add(nodeWriter.toString());
((StringWriter)nodeWriter).getBuffer().setLength(0);
}
nodeWriter.write(delimiters.getField());
if(revisionNumber != null) {
nodeWriter.write(delimiters.escape(revisionNumber.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 DataSetIdentificationC782 getDataSetIdentification() {
return dataSetIdentification;
}
public DataSetIdentification setDataSetIdentification(DataSetIdentificationC782 dataSetIdentification) {
this.dataSetIdentification = dataSetIdentification; return this;
}
public PartyIdentificationDetailsC082 getPartyIdentificationDetails() {
return partyIdentificationDetails;
}
public DataSetIdentification setPartyIdentificationDetails(PartyIdentificationDetailsC082 partyIdentificationDetails) {
this.partyIdentificationDetails = partyIdentificationDetails; return this;
}
public String getStatusCoded() {
return statusCoded;
}
public DataSetIdentification setStatusCoded(String statusCoded) {
this.statusCoded = statusCoded; return this;
}
public SequenceInformationC286 getSequenceInformation() {
return sequenceInformation;
}
public DataSetIdentification setSequenceInformation(SequenceInformationC286 sequenceInformation) {
this.sequenceInformation = sequenceInformation; return this;
}
public String getRevisionNumber() {
return revisionNumber;
}
public DataSetIdentification setRevisionNumber(String revisionNumber) {
this.revisionNumber = revisionNumber; return this;
}
}