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