1 22 23 package org.objectweb.petals.tools.jbicommon.descriptor; 24 25 import java.net.URI ; 26 27 import org.apache.commons.lang.builder.EqualsBuilder; 28 import org.apache.commons.lang.builder.HashCodeBuilder; 29 import org.apache.commons.lang.builder.ToStringBuilder; 30 import org.w3c.dom.Node ; 31 32 37 public class UnknownExtension { 38 39 private URI extensionURI; 40 41 private Node node; 42 43 public UnknownExtension() { super(); 45 } 46 47 @Override 48 public boolean equals(final Object other) { 49 if (!(other instanceof UnknownExtension)) { 50 return false; } 52 UnknownExtension castOther = (UnknownExtension) other; 53 return new EqualsBuilder().append(extensionURI, castOther.extensionURI) 54 .append(node, castOther.node).isEquals(); 55 } 56 57 public URI getExtensionURI() { 58 return extensionURI; 59 } 60 61 public Node getNode() { 62 return node; 63 } 64 65 @Override 66 public int hashCode() { 67 return new HashCodeBuilder().append(extensionURI).append(node) 68 .toHashCode(); 69 } 70 71 public void setExtensionURI(final URI extensionURI) { 72 this.extensionURI = extensionURI; 73 } 74 75 public void setNode(final Node document) { 76 this.node = document; 77 } 78 79 @Override 80 public String toString() { 81 return new ToStringBuilder(this).append("extensionURI", extensionURI) 82 .append("document", node).toString(); 83 } 84 85 } 86 | Popular Tags |