1 16 package org.apache.axis2.om.impl.llom.factory; 17 18 import org.apache.axis2.om.*; 19 import org.apache.axis2.om.impl.llom.OMAttributeImpl; 20 import org.apache.axis2.om.impl.llom.OMElementImpl; 21 import org.apache.axis2.om.impl.llom.OMNamespaceImpl; 22 import org.apache.axis2.om.impl.llom.OMTextImpl; 23 24 import javax.activation.DataHandler ; 25 import javax.xml.namespace.QName ; 26 27 30 public class OMLinkedListImplFactory implements OMFactory { 31 34 public static final int MAX_TO_POOL = 100; 35 36 43 public OMElement createOMElement(String localName, OMNamespace ns) { 44 OMElementImpl element = new OMElementImpl(localName, ns); 45 return element; 46 } 47 48 57 public OMElement createOMElement(String localName, OMNamespace ns, 58 OMContainer parent, 59 OMXMLParserWrapper builder) { 60 OMElementImpl element = new OMElementImpl(localName, ns, parent, 61 builder); 62 return element; 63 } 64 65 73 public OMElement createOMElement(String localName, String namespaceURI, 74 String namespacePrefix) { 75 return this.createOMElement(localName, 76 this.createOMNamespace(namespaceURI, 77 namespacePrefix)); 78 } 79 80 88 public OMElement createOMElement(QName qname, OMContainer parent) 89 throws OMException { 90 return new OMElementImpl(qname, parent); 91 } 92 93 100 public OMNamespace createOMNamespace(String uri, String prefix) { 101 return new OMNamespaceImpl(uri, prefix); 102 } 103 104 111 public OMText createText(OMElement parent, String text) { 112 OMTextImpl textNode = new OMTextImpl(parent, text); 113 return textNode; 114 } 115 116 122 public OMText createText(String s) { 123 OMTextImpl textNode = new OMTextImpl(s); 124 ; 125 return textNode; 126 } 127 128 public OMText createText(String s, String mimeType, boolean optimize) { 129 return new OMTextImpl(s, mimeType, optimize); 130 } 131 132 public OMText createText(DataHandler dataHandler, boolean optimize) { 133 return new OMTextImpl(dataHandler, optimize); 134 } 135 136 public OMText createText(OMElement parent, String s, String mimeType, boolean optimize) { 137 return new OMTextImpl(parent, s, mimeType, optimize); 138 } 139 140 public OMAttribute createOMAttribute(String localName, OMNamespace ns, String value) { 141 return new OMAttributeImpl(localName, ns, value); 142 } 143 144 145 } 146 | Popular Tags |