001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
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    }