01: /*
02: * Copyright 2001-2006 C:1 Financial Services GmbH
03: *
04: * This software is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License Version 2.1, as published by the Free Software Foundation.
07: *
08: * This software is distributed in the hope that it will be useful,
09: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11: * Lesser General Public License for more details.
12: *
13: * You should have received a copy of the GNU Lesser General Public
14: * License along with this library; if not, write to the Free Software
15: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
16: */
17:
18: package de.finix.contelligent.xml.elements;
19:
20: /**
21: * Represent a description of a specific type or package. There may be multiple
22: * descriptions per unti each having a different language.
23: */
24: public class DescriptionElement {
25: private String lang;
26:
27: private String title;
28:
29: private String help;
30:
31: private String value = ""; // contains the CDATA of the element
32:
33: public void setValue(String value) {
34: this .value = value;
35: }
36:
37: public String getValue() {
38: return value;
39: }
40:
41: public void setLang(String lang) {
42: this .lang = lang;
43: }
44:
45: public String getLang() {
46: return lang;
47: }
48:
49: public String getTitle() {
50: return title;
51: }
52:
53: public void setTitle(String title) {
54: this .title = title;
55: }
56:
57: public String getHelp() {
58: return help;
59: }
60:
61: public void setHelp(String help) {
62: this .help = help;
63: }
64:
65: public boolean equals(Object o) {
66: if (this == o)
67: return true;
68: if (o instanceof DescriptionElement) {
69: return lang.equals(((DescriptionElement) o).getLang());
70: }
71: return false;
72: }
73:
74: public int hashCode() {
75: return (lang == null ? 0 : lang.hashCode());
76: }
77:
78: }
|