1 16 package org.apache.axis2.om.impl.llom; 17 18 import org.apache.axis2.om.OMAttribute; 19 import org.apache.axis2.om.OMNamespace; 20 21 import javax.xml.namespace.QName ; 22 import java.util.regex.Matcher ; 23 import java.util.regex.Pattern ; 24 25 28 public class OMAttributeImpl implements OMAttribute { 29 32 private String localName; 33 34 37 private String value; 38 39 42 private OMNamespace namespace; 43 44 47 private static String QUOTE_ENTITY = """; 48 49 52 private static Matcher matcher = Pattern.compile("\"").matcher(null); 53 54 61 public OMAttributeImpl(String localName, OMNamespace ns, String value) { 62 setLocalName(localName); 63 setValue(value); 64 setOMNamespace(ns); 65 } 66 67 72 public QName getQName() { 73 String namespaceName = (namespace != null) 74 ? namespace.getName() 75 : null; 76 return new QName (namespaceName, localName); 77 } 78 79 81 86 public String getLocalName() { 87 return localName; 88 } 89 90 95 public void setLocalName(String localName) { 96 this.localName = localName; 97 } 98 99 104 public String getValue() { 105 return value; 106 } 107 108 113 public void setValue(String value) { 114 this.value = value; 115 } 116 117 122 public void setOMNamespace(OMNamespace omNamespace) { 123 this.namespace = omNamespace; 124 } 125 126 131 public OMNamespace getNamespace() { 132 return namespace; 133 } 134 } 135 | Popular Tags |