no.sesat.search.result
Interface ResultItem

All Superinterfaces:
Serializable
All Known Subinterfaces:
FacetedSearchResult<T>, NavigationItem, ResultList<T>
All Known Implementing Classes:
BasicNavigationItem, BasicResultItem, BasicResultList, BlogSearchResultItem, FacetedSearchResultImpl, FastSearchResult, OvertureSearchResult, PlatefoodSearchResult

public interface ResultItem
extends Serializable

Version:
$Id: ResultItem.java 7225 2009-04-09 00:32:20Z ssmiweve $

Method Summary
 ResultItem addField(String name, String value)
          Adds the field to the returned instance which is otherwise equal to this.
 ResultItem addObjectField(String field, Serializable value)
          Adds the field to the returned instance which is otherwise equal to this.
 ResultItem addToMultivaluedField(String field, String value)
          Adds (to the multivalued) field to the returned instance which is otherwise equal to this.
 String getField(String field)
           
 Collection<String> getFieldNames()
          An unmodifiable list of the field names.
 Collection<String> getMultivaluedField(String field)
          An unmodifiable copy of the multivalued field collection.
 Serializable getObjectField(String field)
           
 String getTitle()
          The title this result item represents.
 String getUrl()
          The URL this result item represents.
 ResultItem setTitle(String title)
          Sets the title to the returned instance which is otherwise equal to this.
 ResultItem setUrl(String url)
          Sets the URL to the returned instance which is otherwise equal to this.
 

Method Detail

getUrl

String getUrl()
The URL this result item represents.

Returns:

setUrl

ResultItem setUrl(String url)
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.

Parameters:
url -
Returns:

getTitle

String getTitle()
The title this result item represents.

Returns:

setTitle

ResultItem setTitle(String title)
Sets the title 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.

Parameters:
title -
Returns:

getField

String getField(String field)
Parameters:
field -
Returns:

addField

ResultItem addField(String name,
                    String value)
Adds the field 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. Use addObjectField to add a non-html string into the result.

Parameters:
name -
value - html formatted string. html to display must be escaped.
Returns:

getObjectField

Serializable getObjectField(String field)
Parameters:
field -
Returns:

addObjectField

ResultItem addObjectField(String field,
                          Serializable value)
Adds the field 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.

Parameters:
field -
value -
Returns:

getMultivaluedField

Collection<String> getMultivaluedField(String field)
An unmodifiable copy of the multivalued field collection.

Parameters:
field -
Returns:

addToMultivaluedField

ResultItem addToMultivaluedField(String field,
                                 String value)
Adds (to the multivalued) field 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.

Parameters:
field -
value -
Returns:

getFieldNames

Collection<String> getFieldNames()
An unmodifiable list of the field names.

Returns:


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