1/*2 * Copyright 2000-2001,2004 The Apache Software Foundation.3 * 4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.om.registry.base;
1819importorg.apache.jetspeed.om.registry.*;
2021/***22 * Bean like implementation of the Metainfo interface suitable for23 * Castor serialization.24 *25 * @see org.apache.jetspeed.om.registry.MetaInfo26 * @author <a href="mailto:raphael@apache.org">Raphaël Luta</a>27 * @version $Id: BaseMetaInfo.java,v 1.4 2004/02/23 03:08:26 jford Exp $28 */29publicclassBaseMetaInfo implements MetaInfo, java.io.Serializable
30 {
31private String title;
3233private String description;
3435private String image;
3637publicBaseMetaInfo()
38 {}
3940publicBaseMetaInfo(String title, String description, String image)
41 {
42this.title = title;
43this.description = description;
44this.image = image;
45 }
4647/***48 * Implements the equals operation so that 2 elements are equal if49 * all their member values are equal.50 */51publicboolean equals(Object object)
52 {
53if (object==null)
54 {
55return false;
56 }
5758BaseMetaInfo obj = (BaseMetaInfo)object;
5960if (title!=null)
61 {
62if (!title.equals(obj.getTitle()))
63 {
64return false;
65 }
66 }
67else68 {
69if (obj.getTitle()!=null)
70 {
71return false;
72 }
73 }
7475if (description!=null)
76 {
77if(!description.equals(obj.getDescription()))
78 {
79return false;
80 }
81 }
82else83 {
84if (obj.getDescription()!=null)
85 {
86return false;
87 }
88 }
8990if (image!=null)
91 {
92if(!image.equals(obj.getImage()))
93 {
94return false;
95 }
96 }
97else98 {
99if (obj.getImage()!=null)
100 {
101return false;
102 }
103 }
104105returntrue;
106 }
107108/*** @return the title for this entry */109public String getTitle()
110 {
111returnthis.title;
112 }
113114/*** Sets the title for this entry115 * @param title the new title for this entry116 */117publicvoid setTitle( String title )
118 {
119this.title = title;
120 }
121122/*** @return the description for this entry */123public String getDescription()
124 {
125returnthis.description;
126 }
127128/*** Sets the description for this entry129 * @param description the new description for this entry130 */131publicvoid setDescription( String description )
132 {
133this.description = description;
134 }
135136/*** @return the image link for this entry */137public String getImage()
138 {
139returnthis.image;
140 }
141142/*** Sets the image URL attached to this entry143 * @param image the image URL to link to this entry144 */145publicvoid setImage( String image )
146 {
147this.image = image;
148 }
149150 }