adding all of botlist, initial add
[botlist.git] / openbotlist / src / org / spirit / bean / impl / BotListFeedItems.java
blobe2a16965b6f240e64d271554c02fdbe1690b9cde
1 /**
2 * Berlin Brown
3 * Nov 9, 2006
4 */
6 package org.spirit.bean.impl;
8 import java.io.Serializable;
10 import org.spirit.bean.impl.base.BotListBeanBase;
11 import org.spirit.servlet.bean.BotListConcatValue;
12 import org.spirit.util.text.TextUtils;
14 /**
15 * This is class is used by botverse.
17 * @author Berlin Brown
20 public class BotListFeedItems extends BotListBeanBase
21 implements Serializable {
22 /**
25 private static final long serialVersionUID = -2504255702163561930L;
26 public static final int MAX_LEN_HOSTNAME = 40;
28 private String mainUrl;
30 private String urlDescription;
31 private String urlTitle;
32 private String urlSource;
33 private Long processCount;
34 private String hostname;
35 private Long views;
36 private Long rating;
37 private String fullName;
38 private Long userId;
39 private String hostnameDisplay;
40 private String hostnameDisplayUrl;
42 private String searchScore;
44 /**
45 * @return the views
47 public Long getViews() {
48 return views;
50 /**
51 * @param views the views to set
53 public void setViews(Long views) {
54 this.views = views;
58 /**
59 * @return the mainUrl
61 public String getMainUrl() {
62 return mainUrl;
64 /**
65 * @param mainUrl the mainUrl to set
67 public void setMainUrl(String mainUrl) {
68 this.mainUrl = mainUrl;
70 /**
71 * @return the urlDescription
73 public String getUrlDescription() {
74 return urlDescription;
76 /**
77 * @param urlDescription the urlDescription to set
79 public void setUrlDescription(String urlDescription) {
80 this.urlDescription = urlDescription;
82 /**
83 * @return the urlTitle
85 public String getUrlTitle() {
86 return urlTitle;
88 /**
89 * @param urlTitle the urlTitle to set
91 public void setUrlTitle(String urlTitle) {
92 this.urlTitle = urlTitle;
94 /**
95 * @return the rating
97 public Long getRating() {
98 return rating;
101 * @param rating the rating to set
103 public void setRating(Long rating) {
104 this.rating = rating;
107 * @return the fullName
109 public String getFullName() {
110 return fullName;
113 * @param fullName the fullName to set
115 public void setFullName(String fullName) {
116 this.fullName = fullName;
119 * @return the userId
121 public Long getUserId() {
122 return userId;
125 * @param userId the userId to set
127 public void setUserId(Long userId) {
128 this.userId = userId;
131 * @return the searchScore
133 public String getSearchScore() {
134 return searchScore;
137 * @param searchScore the searchScore to set
139 public void setSearchScore(String searchScore) {
140 this.searchScore = searchScore;
142 public String getHostname() {
143 return hostname;
145 public void setHostname(String hostname) {
146 this.hostname = hostname;
149 * Print the hostname, use the hostname field or create the hostname display
150 * from the main URL field.
152 * @see org.spirit.test.java.bean.EntityLinkTest
154 * @return
156 public String getHostnameDisplay() {
157 this.hostnameDisplay = "";
158 String urlHostname = this.getHostname();
159 if ((urlHostname != null) && (urlHostname.length() > 0)) {
160 this.hostnameDisplay = urlHostname;
161 } else {
162 this.hostnameDisplay = TextUtils.getHTTPHostname(this.getMainUrl());
164 this.hostnameDisplay = BotListConcatValue.getMaxWord(this.hostnameDisplay, new Integer(MAX_LEN_HOSTNAME));
165 return this.hostnameDisplay;
167 public String getHostnameDisplayUrl() {
168 this.hostnameDisplayUrl = "";
169 String urlHostname = this.getHostname();
170 if ((urlHostname != null) && (urlHostname.length() > 0)) {
171 this.hostnameDisplayUrl = urlHostname;
172 } else {
173 this.hostnameDisplayUrl = TextUtils.getHTTPHostname(this.getMainUrl());
175 return this.hostnameDisplayUrl;
177 public String getUrlSource() {
178 return urlSource;
180 public void setUrlSource(String urlSource) {
181 this.urlSource = urlSource;
183 public Long getProcessCount() {
184 return processCount;
186 public void setProcessCount(Long processCount) {
187 this.processCount = processCount;