org.milyn.edi.unedifact.d06b.BUSCRD.SegmentGroup14 Maven / Gradle / Ivy
/**
* This class was generated by Smooks EJC (http://www.smooks.org).
*/
package org.milyn.edi.unedifact.d06b.BUSCRD;
import java.io.Serializable;
import org.milyn.smooks.edi.EDIWritable;
import org.milyn.edi.unedifact.d06b.common.Relationship;
import java.util.List;
import org.milyn.edi.unedifact.d06b.common.Attribute;
import java.io.Writer;
import org.milyn.edisax.model.internal.Delimiters;
import java.io.IOException;
public class SegmentGroup14 implements Serializable, EDIWritable {
private static final long serialVersionUID = 1L;
private Relationship relationship;
private List attribute;
public void write(Writer writer, Delimiters delimiters) throws IOException {
Writer nodeWriter = writer;
if(relationship != null) {
nodeWriter.write("REL");
nodeWriter.write(delimiters.getField());
relationship.write(nodeWriter, delimiters);
}
if(attribute != null && !attribute.isEmpty()) {
for(Attribute attributeInst : attribute) {
nodeWriter.write("ATT");
nodeWriter.write(delimiters.getField());
attributeInst.write(nodeWriter, delimiters);
}
}
}
public Relationship getRelationship() {
return relationship;
}
public SegmentGroup14 setRelationship(Relationship relationship) {
this.relationship = relationship; return this;
}
public List getAttribute() {
return attribute;
}
public SegmentGroup14 setAttribute(List attribute) {
this.attribute = attribute; return this;
}
}