1 27 package org.objectweb.jonas_ejb.deployment.xml; 28 29 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 30 import org.objectweb.jonas_lib.deployment.xml.JLinkedList; 31 36 37 public class Relationships extends AbsElement { 38 39 42 private String description = null; 43 44 47 private JLinkedList ejbRelationList = null; 48 49 50 53 public Relationships() { 54 super(); 55 ejbRelationList = new JLinkedList("ejb-relation"); 56 } 57 58 62 public String getDescription() { 63 return description; 64 } 65 66 70 public void setDescription(String description) { 71 this.description = description; 72 } 73 74 78 public JLinkedList getEjbRelationList() { 79 return ejbRelationList; 80 } 81 82 86 public void setEjbRelationList(JLinkedList ejbRelationList) { 87 this.ejbRelationList = ejbRelationList; 88 } 89 90 94 public void addEjbRelation(EjbRelation ejbRelation) { 95 ejbRelationList.add(ejbRelation); 96 } 97 98 103 public String toXML(int indent) { 104 StringBuffer sb = new StringBuffer (); 105 sb.append(indent(indent)); 106 sb.append("<relationships>\n"); 107 108 indent += 2; 109 110 sb.append(xmlElement(description, "description", indent)); 112 sb.append(ejbRelationList.toXML(indent)); 114 indent -= 2; 115 sb.append(indent(indent)); 116 sb.append("</relationships>\n"); 117 118 return sb.toString(); 119 } 120 } 121 | Popular Tags |