1
22
23 package com.liferay.portal.xml;
24
25 import com.liferay.portal.kernel.xml.Attribute;
26 import com.liferay.portal.kernel.xml.Namespace;
27 import com.liferay.portal.kernel.xml.QName;
28
29
35 public class AttributeImpl extends NodeImpl implements Attribute {
36
37 public AttributeImpl(org.dom4j.Attribute attribute) {
38 super(attribute);
39
40 _attribute = attribute;
41 }
42
43 public Object getData() {
44 return _attribute.getData();
45 }
46
47 public boolean equals(Object obj) {
48 org.dom4j.Attribute attribute =
49 ((AttributeImpl)obj).getWrappedAttribute();
50
51 return _attribute.equals(attribute);
52 }
53
54 public Namespace getNamespace() {
55 org.dom4j.Namespace namespace = _attribute.getNamespace();
56
57 if (namespace == null) {
58 return null;
59 }
60 else {
61 return new NamespaceImpl(namespace);
62 }
63 }
64
65 public String getNamespacePrefix() {
66 return _attribute.getNamespacePrefix();
67 }
68
69 public String getNamespaceURI() {
70 return _attribute.getNamespaceURI();
71 }
72
73 public QName getQName() {
74 org.dom4j.QName qName = _attribute.getQName();
75
76 if (qName == null) {
77 return null;
78 }
79 else {
80 return new QNameImpl(qName);
81 }
82 }
83
84 public String getQualifiedName() {
85 return _attribute.getQualifiedName();
86 }
87
88 public String getValue() {
89 return _attribute.getValue();
90 }
91
92 public org.dom4j.Attribute getWrappedAttribute() {
93 return _attribute;
94 }
95
96 public int hashCode() {
97 return _attribute.hashCode();
98 }
99
100 public void setData(Object data) {
101 _attribute.setData(data);
102 }
103
104 public void setNamespace(Namespace namespace) {
105 NamespaceImpl namespaceImpl = (NamespaceImpl)namespace;
106
107 _attribute.setNamespace(namespaceImpl.getWrappedNamespace());
108 }
109
110 public void setValue(String value) {
111 _attribute.setValue(value);
112 }
113
114 private org.dom4j.Attribute _attribute;
115
116 }