1 27 package org.objectweb.jonas_rar.deployment.xml; 28 29 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 30 import org.objectweb.jonas_lib.deployment.xml.JLinkedList; 31 32 37 38 public class License extends AbsElement { 39 40 43 private JLinkedList descriptionList = null; 44 45 48 private String licenseRequired = null; 49 50 51 54 public License() { 55 super(); 56 descriptionList = new JLinkedList("description"); 57 } 58 59 63 public JLinkedList getDescriptionList() { 64 return descriptionList; 65 } 66 67 71 public void setDescriptionList(JLinkedList descriptionList) { 72 this.descriptionList = descriptionList; 73 } 74 75 79 public void addDescription(String description) { 80 descriptionList.add(description); 81 } 82 83 87 public String getLicenseRequired() { 88 return licenseRequired; 89 } 90 91 95 public void setLicenseRequired(String licenseRequired) { 96 this.licenseRequired = licenseRequired; 97 } 98 99 104 public String toXML(int indent) { 105 StringBuffer sb = new StringBuffer (); 106 sb.append(indent(indent)); 107 sb.append("<license>\n"); 108 109 indent += 2; 110 111 sb.append(descriptionList.toXML(indent)); 113 sb.append(xmlElement(licenseRequired, "license-required", indent)); 115 indent -= 2; 116 sb.append(indent(indent)); 117 sb.append("</license>\n"); 118 119 return sb.toString(); 120 } 121 } 122 | Popular Tags |