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
;
15 * This is class is used by botverse.
17 * @author Berlin Brown
20 public class BotListFeedItems
extends BotListBeanBase
21 implements Serializable
{
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
;
37 private String fullName
;
39 private String hostnameDisplay
;
40 private String hostnameDisplayUrl
;
42 private String searchScore
;
47 public Long
getViews() {
51 * @param views the views to set
53 public void setViews(Long views
) {
61 public String
getMainUrl() {
65 * @param mainUrl the mainUrl to set
67 public void setMainUrl(String mainUrl
) {
68 this.mainUrl
= mainUrl
;
71 * @return the urlDescription
73 public String
getUrlDescription() {
74 return urlDescription
;
77 * @param urlDescription the urlDescription to set
79 public void setUrlDescription(String urlDescription
) {
80 this.urlDescription
= urlDescription
;
83 * @return the urlTitle
85 public String
getUrlTitle() {
89 * @param urlTitle the urlTitle to set
91 public void setUrlTitle(String urlTitle
) {
92 this.urlTitle
= urlTitle
;
97 public Long
getRating() {
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() {
113 * @param fullName the fullName to set
115 public void setFullName(String fullName
) {
116 this.fullName
= fullName
;
121 public Long
getUserId() {
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() {
137 * @param searchScore the searchScore to set
139 public void setSearchScore(String searchScore
) {
140 this.searchScore
= searchScore
;
142 public String
getHostname() {
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
156 public String
getHostnameDisplay() {
157 this.hostnameDisplay
= "";
158 String urlHostname
= this.getHostname();
159 if ((urlHostname
!= null) && (urlHostname
.length() > 0)) {
160 this.hostnameDisplay
= urlHostname
;
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
;
173 this.hostnameDisplayUrl
= TextUtils
.getHTTPHostname(this.getMainUrl());
175 return this.hostnameDisplayUrl
;
177 public String
getUrlSource() {
180 public void setUrlSource(String urlSource
) {
181 this.urlSource
= urlSource
;
183 public Long
getProcessCount() {
186 public void setProcessCount(Long processCount
) {
187 this.processCount
= processCount
;