Relationships.java

00001 
00027 package org.objectweb.jonas_ejb.deployment.xml;
00028 
00029 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
00030 import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
00037 public class Relationships extends AbsElement  {
00038 
00042     private String description = null;
00043 
00047     private JLinkedList ejbRelationList = null;
00048 
00049 
00053     public Relationships() {
00054         super();
00055         ejbRelationList = new  JLinkedList("ejb-relation");
00056     }
00057 
00062     public String getDescription() {
00063         return description;
00064     }
00065 
00070     public void setDescription(String description) {
00071         this.description = description;
00072     }
00073 
00078     public JLinkedList getEjbRelationList() {
00079         return ejbRelationList;
00080     }
00081 
00086     public void setEjbRelationList(JLinkedList ejbRelationList) {
00087         this.ejbRelationList = ejbRelationList;
00088     }
00089 
00094     public void addEjbRelation(EjbRelation ejbRelation) {
00095         ejbRelationList.add(ejbRelation);
00096     }
00097 
00103     public String toXML(int indent) {
00104         StringBuffer sb = new StringBuffer();
00105         sb.append(indent(indent));
00106         sb.append("<relationships>\n");
00107 
00108         indent += 2;
00109 
00110         // description
00111         sb.append(xmlElement(description, "description", indent));
00112         // ejb-relation
00113         sb.append(ejbRelationList.toXML(indent));
00114         indent -= 2;
00115         sb.append(indent(indent));
00116         sb.append("</relationships>\n");
00117 
00118         return sb.toString();
00119     }
00120 }

Generated on Tue Feb 15 15:05:47 2005 for JOnAS by  doxygen 1.3.9.1