001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.xml;
016    
017    import com.liferay.portal.kernel.xml.Namespace;
018    
019    /**
020     * @author Brian Wing Shun Chan
021     */
022    public class NamespaceImpl extends NodeImpl implements Namespace {
023    
024            public NamespaceImpl(org.dom4j.Namespace namespace) {
025                    super(namespace);
026    
027                    _namespace = namespace;
028            }
029    
030            public boolean equals(Object obj) {
031                    org.dom4j.Namespace namespace =
032                            ((NamespaceImpl)obj).getWrappedNamespace();
033    
034                    return _namespace.equals(namespace);
035            }
036    
037            public short getNodeType() {
038                    return _namespace.getNodeType();
039            }
040    
041            public String getPrefix() {
042                    return _namespace.getPrefix();
043            }
044    
045            public String getURI() {
046                    return _namespace.getURI();
047            }
048    
049            public org.dom4j.Namespace getWrappedNamespace() {
050                    return _namespace;
051            }
052    
053            public String getXPathNameStep() {
054                    return _namespace.getXPathNameStep();
055            }
056    
057            public int hashCode() {
058                    return _namespace.hashCode();
059            }
060    
061            public String toString() {
062                    return _namespace.toString();
063            }
064    
065            private org.dom4j.Namespace _namespace;
066    
067    }