no.sesat.search.result
Class BlogSearchResultItem

java.lang.Object
  extended by no.sesat.search.result.BasicResultItem
      extended by no.sesat.search.result.BlogSearchResultItem
All Implemented Interfaces:
Serializable, ResultItem

public class BlogSearchResultItem
extends BasicResultItem

See Also:
Serialized Form

Constructor Summary
BlogSearchResultItem()
           
 
Method Summary
 String getAuthor()
           
 String getBlogTipsIcon()
           
 String getBlogTitle()
          Get the title of the blog
 String getBody()
           
 String getBodyOrComments()
          Get body or comment, depends on where the search matched.
 String getComments()
           
 String getContentTitle()
           
 String getDisplayDate()
           
 String getLinkTitle()
          Return first non-null value of contentTitle, blogTitle or url
 String getLinkTitleTrimmed()
          Trim linktitle
 String getMoreHits()
           
 String getParentUrl()
           
 String getUrl()
          The URL this result item represents.
 boolean hasAuthor()
          hasAuthor() checks if the blog entry has an authorinformation.
 boolean hasMoreHitsFromBlog()
          hasMoreHits() can be used to determine if we have severeal hits from blog
 boolean isFrontPage()
          Todo: Come up with a better way to find out wether the result is a blog frontpage or not.
 void setAuthor(String author)
           
 void setBlogTipsIcon(String blogTipsIcon)
           
 void setBlogTitle(String title)
          Set the title for the blog.
 void setBody(String body)
           
 void setComments(String comments)
           
 void setContentTitle(String contentTitle)
           
 void setDisplayDate(String displayDate)
           
 void setMoreHits(String moreHits)
           
 void setParentUrl(String parentUrl)
           
 BlogSearchResultItem setUrl(String url)
          Sets the URL to the returned instance which is otherwise equal to this.
 
Methods inherited from class no.sesat.search.result.BasicResultItem
addField, addObjectField, addToMultivaluedField, equals, getField, getField, getFieldNames, getFields, getInteger, getMultivaluedField, getObjectField, getTitle, hashCode, setTitle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlogSearchResultItem

public BlogSearchResultItem()
Method Detail

getContentTitle

public String getContentTitle()

setContentTitle

public void setContentTitle(String contentTitle)

getLinkTitle

public String getLinkTitle()
Return first non-null value of contentTitle, blogTitle or url

Returns:
linktitle

getLinkTitleTrimmed

public String getLinkTitleTrimmed()
Trim linktitle

Returns:
trimmed linktitle

getAuthor

public String getAuthor()

setAuthor

public void setAuthor(String author)

getBlogTipsIcon

public String getBlogTipsIcon()

setBlogTipsIcon

public void setBlogTipsIcon(String blogTipsIcon)

getDisplayDate

public String getDisplayDate()

setDisplayDate

public void setDisplayDate(String displayDate)

getUrl

public String getUrl()
Description copied from interface: ResultItem
The URL this result item represents.

Specified by:
getUrl in interface ResultItem
Overrides:
getUrl in class BasicResultItem
Returns:

setUrl

public BlogSearchResultItem setUrl(String url)
Description copied from interface: ResultItem
Sets the URL to the returned instance which is otherwise equal to this. There is no guarantee that this instance is altered. This allows implementations to be immutable if they choose to be.

Specified by:
setUrl in interface ResultItem
Overrides:
setUrl in class BasicResultItem
Returns:

getBody

public String getBody()

setBody

public void setBody(String body)

getComments

public String getComments()

setComments

public void setComments(String comments)

getMoreHits

public String getMoreHits()

setMoreHits

public void setMoreHits(String moreHits)

getParentUrl

public String getParentUrl()

setParentUrl

public void setParentUrl(String parentUrl)

getBlogTitle

public String getBlogTitle()
Get the title of the blog

Returns:
title of the blog

setBlogTitle

public void setBlogTitle(String title)
Set the title for the blog.

Parameters:
title - for blog

getBodyOrComments

public String getBodyOrComments()
Get body or comment, depends on where the search matched.

Returns:
body or comment

hasAuthor

public boolean hasAuthor()
hasAuthor() checks if the blog entry has an authorinformation.

Returns:
true if has author information.

hasMoreHitsFromBlog

public boolean hasMoreHitsFromBlog()
hasMoreHits() can be used to determine if we have severeal hits from blog

Returns:
true if has more hits

isFrontPage

public boolean isFrontPage()
Todo: Come up with a better way to find out wether the result is a blog frontpage or not. if blog or comments is not null and we got a parenturl that is not equal to url, then we have a frontpage ?

Returns:
if entry is blog frontpage.


Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.