/* * Created on 16.8.2004 * */ package net.sf.tomp.xml.id; import org.xml.sax.Attributes; /** * @author tomp * */ public class Element { private String namespaceURI, localName, qName; private Attributes atts; /** * @return Returns the atts. */ public Attributes getAttributes() { return atts; } public Element(String localN) { this("", localN); } public Element(String nsURI, String localN) { this(nsURI, localN, localN); } public Element(String nsURI, String localN, String qN) { this(nsURI, localN, qN, null); } public Element(String nsURI, String localN, String qN, Attributes ats) { namespaceURI = nsURI; localName = localN; qName = qN; atts = ats; } public boolean equals(Object o) { if(o instanceof Element) { Element e = (Element)o; return namespaceURI.equals(e.namespaceURI) && localName.equals(e.localName); } return false; } public int hashCode() { return namespaceURI.hashCode() ^ localName.hashCode(); } /** * @return Returns the localName. */ public String getLocalName() { return localName; } /** * @return Returns the namespaceURI. */ public String getNamespaceURI() { return namespaceURI; } /** * @return Returns the qName. */ public String getQName() { return qName; } }