1 27 package org.objectweb.jonas_ws.deployment.xml; 28 29 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 30 import org.objectweb.jonas_lib.deployment.xml.JLinkedList; 31 import org.objectweb.jonas_lib.deployment.xml.TopLevelElement; 32 33 38 39 public class JavaWsdlMapping extends AbsElement implements TopLevelElement { 40 41 44 private JLinkedList packageMappingList = null; 45 46 49 private JLinkedList javaXmlTypeMappingList = null; 50 51 54 public JavaWsdlMapping() { 55 super(); 56 packageMappingList = new JLinkedList("package-mapping"); 57 javaXmlTypeMappingList = new JLinkedList("java-xml-type-mapping"); 58 } 59 60 64 public JLinkedList getPackageMappingList() { 65 return packageMappingList; 66 } 67 68 72 public void setPackageMappingList(JLinkedList packageMappingList) { 73 this.packageMappingList = packageMappingList; 74 } 75 76 80 public void addPackageMapping(PackageMapping packageMapping) { 81 packageMappingList.add(packageMapping); 82 } 83 84 88 public JLinkedList getJavaXmlTypeMappingList() { 89 return javaXmlTypeMappingList; 90 } 91 92 96 public void setJavaXmlTypeMappingList(JLinkedList javaXmlTypeMappingList) { 97 this.javaXmlTypeMappingList = javaXmlTypeMappingList; 98 } 99 100 104 public void addJavaXmlTypeMapping(JavaXmlTypeMapping javaXmlTypeMapping) { 105 javaXmlTypeMappingList.add(javaXmlTypeMapping); 106 } 107 108 113 public String toXML(int indent) { 114 StringBuffer sb = new StringBuffer (); 115 sb.append(indent(indent)); 116 sb.append("<java-wsdl-mapping>\n"); 117 indent += 2; 118 119 sb.append(packageMappingList.toXML(indent)); 121 sb.append(javaXmlTypeMappingList.toXML(indent)); 123 124 indent -= 2; 125 sb.append(indent(indent)); 126 sb.append("</java-wsdl-mapping>\n"); 127 128 return sb.toString(); 129 } 130 } 131 | Popular Tags |