License.java

00001 
00027 package org.objectweb.jonas_rar.deployment.xml;
00028 
00029 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
00030 import org.objectweb.jonas_lib.deployment.xml.JLinkedList;
00031 
00038 public class License extends AbsElement  {
00039 
00043     private JLinkedList descriptionList = null;
00044 
00048     private String licenseRequired = null;
00049 
00050 
00054     public License() {
00055         super();
00056         descriptionList = new  JLinkedList("description");
00057     }
00058 
00063     public JLinkedList getDescriptionList() {
00064         return descriptionList;
00065     }
00066 
00071     public void setDescriptionList(JLinkedList descriptionList) {
00072         this.descriptionList = descriptionList;
00073     }
00074 
00079     public void addDescription(String description) {
00080         descriptionList.add(description);
00081     }
00082 
00087     public String getLicenseRequired() {
00088         return licenseRequired;
00089     }
00090 
00095     public void setLicenseRequired(String licenseRequired) {
00096         this.licenseRequired = licenseRequired;
00097     }
00098 
00104     public String toXML(int indent) {
00105         StringBuffer sb = new StringBuffer();
00106         sb.append(indent(indent));
00107         sb.append("<license>\n");
00108 
00109         indent += 2;
00110 
00111         // description
00112         sb.append(descriptionList.toXML(indent));
00113         // license-required
00114         sb.append(xmlElement(licenseRequired, "license-required", indent));
00115         indent -= 2;
00116         sb.append(indent(indent));
00117         sb.append("</license>\n");
00118 
00119         return sb.toString();
00120     }
00121 }

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