KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > tools > jbicommon > descriptor > UnknownExtension


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2005-2006 EBM WebSourcing, http://www.ebmwebsourcing.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id$
20  * -------------------------------------------------------------------------
21  */

22
23 package org.objectweb.petals.tools.jbicommon.descriptor;
24
25 import java.net.URI JavaDoc;
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 JavaDoc;
31
32 /**
33  *
34  * @author ofabre
35  *
36  */

37 public class UnknownExtension {
38
39     private URI JavaDoc extensionURI;
40
41     private Node JavaDoc node;
42
43     public UnknownExtension() { // NOPMD by gblondelle
44
super();
45     }
46
47     @Override JavaDoc
48     public boolean equals(final Object JavaDoc other) {
49         if (!(other instanceof UnknownExtension)) {
50             return false; // NOPMD by gblondelle
51
}
52         UnknownExtension castOther = (UnknownExtension) other;
53         return new EqualsBuilder().append(extensionURI, castOther.extensionURI)
54                 .append(node, castOther.node).isEquals();
55     }
56
57     public URI JavaDoc getExtensionURI() {
58         return extensionURI;
59     }
60
61     public Node JavaDoc getNode() {
62         return node;
63     }
64
65     @Override JavaDoc
66     public int hashCode() {
67         return new HashCodeBuilder().append(extensionURI).append(node)
68                 .toHashCode();
69     }
70
71     public void setExtensionURI(final URI JavaDoc extensionURI) {
72         this.extensionURI = extensionURI;
73     }
74
75     public void setNode(final Node JavaDoc document) {
76         this.node = document;
77     }
78
79     @Override JavaDoc
80     public String JavaDoc toString() {
81         return new ToStringBuilder(this).append("extensionURI", extensionURI)
82                 .append("document", node).toString();
83     }
84
85 }
86
Popular Tags