KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ivata > groupware > business > search > index > SearchIndexDO


1 /*
2  * Copyright (c) 2001 - 2005 ivata limited.
3  * All rights reserved.
4  * -----------------------------------------------------------------------------
5  * ivata groupware may be redistributed under the GNU General Public
6  * License as published by the Free Software Foundation;
7  * version 2 of the License.
8  *
9  * These programs are free software; you can redistribute them and/or
10  * modify them under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; version 2 of the License.
12  *
13  * These programs are distributed in the hope that they will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  * See the GNU General Public License in the file LICENSE.txt for more
18  * details.
19  *
20  * If you would like a copy of the GNU General Public License write to
21  *
22  * Free Software Foundation, Inc.
23  * 59 Temple Place - Suite 330
24  * Boston, MA 02111-1307, USA.
25  *
26  *
27  * To arrange commercial support and licensing, contact ivata at
28  * http://www.ivata.com/contact.jsp
29  * -----------------------------------------------------------------------------
30  * $Log: SearchIndexDO.java,v $
31  * Revision 1.3 2005/04/10 20:09:47 colinmacleod
32  * Added new themes.
33  * Changed id type to String.
34  * Changed i tag to em and b tag to strong.
35  * Improved PicoContainerFactory with NanoContainer scripts.
36  *
37  * Revision 1.2 2005/04/09 17:19:55 colinmacleod
38  * Changed copyright text to GPL v2 explicitly.
39  *
40  * Revision 1.1.1.1 2005/03/10 17:52:38 colinmacleod
41  * Restructured ivata op around Hibernate/PicoContainer.
42  * Renamed ivata groupware.
43  *
44  * Revision 1.1 2004/08/01 11:40:29 colinmacleod
45  * Moved search classes to separate subproject.
46  *
47  * -----------------------------------------------------------------------------
48  */

49 package com.ivata.groupware.business.search.index;
50
51
52 import com.ivata.groupware.business.search.item.content.SearchItemContentDO;
53 import com.ivata.groupware.container.persistence.BaseDO;
54
55
56 /**
57  * <p>
58  * Each word within an item has an index associated with it. This data object
59  * stores that index.
60  * </p>
61  *
62  * @since 2004-07-31
63  * @author Colin MacLeod
64  * <a HREF='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
65  * @version $Revision: 1.3 $
66  *
67  * @hibernate.class
68  * table="search_index"
69  * @hibernate.cache
70  * usage="read-write"
71  */

72 public class SearchIndexDO extends BaseDO {
73     /**
74      * <p>
75      * This is the content in the item which this index matches.
76      * </p>
77      */

78     private SearchItemContentDO content;
79     /**
80      * <p>
81      * Indicates how well the query applies to this result.
82      * </p>
83      */

84     private float weight;
85     /**
86      * <p>
87      * Word within the object which is indexed.
88      * </p>
89      */

90     private String JavaDoc word;
91     /**
92      * <p>
93      * This is the content in the item which this index matches.
94      * </p>
95      *
96      * @return Returns the item.
97      * @hibernate.many-to-one
98      */

99     public final SearchItemContentDO getContent() {
100         return content;
101     }
102
103     /**
104      * <p>
105      * Indicates how well the query applies to this result.
106      * </p>
107      *
108      * @return Returns the weight.
109      * @hibernate.property
110      */

111     public final float getWeight() {
112         return weight;
113     }
114
115     /**
116      * <p>
117      * Word within the object which is indexed.
118      * </p>
119      *
120      * @return Returns the word.
121      * @hibernate.property
122      */

123     public final String JavaDoc getWord() {
124         return word;
125     }
126     /**
127      * <p>
128      * This is the content in the item which this index matches.
129      * </p>
130      *
131      * @param content Content of the item which this index matches.
132      */

133     public final void setContent(final SearchItemContentDO content) {
134         this.content = content;
135     }
136
137     /**
138      * <p>
139      * Indicates how often the word occurs within this object.
140      * </p>
141      *
142      * @param weight The weight to set.
143      */

144     public final void setWeight(final float weight) {
145         this.weight = weight;
146     }
147     /**
148      * <p>
149      * Word within the object which is indexed.
150      * </p>
151      *
152      * @param word The word to set.
153      */

154     public final void setWord(final String JavaDoc word) {
155         this.word = word;
156     }
157 }
158
Popular Tags