pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.core.site.search
Class SearchSiteResult

java.lang.Object
  extended by org.torweg.pulse.component.core.site.search.SearchSiteResult
All Implemented Interfaces:
JDOMable, Result

public class SearchSiteResult
extends java.lang.Object
implements Result

captures the results of a search request.

Version:
$Revision: 1537 $
Author:
Daniel Dietz, Thomas Weber

Constructor Summary
SearchSiteResult(ServiceRequest req)
          creates a new SearchSiteResult.
 
Method Summary
 void addSitemapNode(SitemapNode n)
          adds a new SitemapNode to the Result.
 org.jdom.Element deserializeToJDOM()
          returns a Result for SearchSite.
 java.lang.Integer getOffset()
           
 java.lang.String getParsedQuery()
           
 java.lang.String getQuery()
           
protected  ServiceRequest getRequest()
          gives access to the request.
protected  java.util.List<SitemapNode> getSitemapNodes()
          gives access to the SitemapNodes.
 java.lang.Integer getTotalResults()
           
 boolean hasMorePages()
          returns whether the SiteSearchResult at the current offset has more pages.
protected  void initSitemapNode(SitemapNode n)
          initialises the required fields of the given SitemapNode.
 void setMaxQuickNavigationLinks(int i)
          sets the maximum number of quick navigation links when paging.
 void setMaxResultsPerPage(int maxResults)
          sets the maximum number of results to be displayed on a single page.
 void setOffset(java.lang.Integer o)
           
 void setParsedQuery(java.lang.String pq)
           
 void setQuery(java.lang.String q)
           
 void setSitemapNodes(java.util.List<SitemapNode> list)
          sets the SitemapNodes for the result.
 void setTotalResults(java.lang.Integer t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchSiteResult

public SearchSiteResult(ServiceRequest req)
creates a new SearchSiteResult.

Parameters:
req - the current request
Method Detail

getRequest

protected final ServiceRequest getRequest()
gives access to the request.

Returns:
the request

getSitemapNodes

protected final java.util.List<SitemapNode> getSitemapNodes()
gives access to the SitemapNodes.

Returns:
the SitemapNodes

addSitemapNode

public final void addSitemapNode(SitemapNode n)
adds a new SitemapNode to the Result.

Parameters:
n - the node to be added

setSitemapNodes

public final void setSitemapNodes(java.util.List<SitemapNode> list)
sets the SitemapNodes for the result.

Parameters:
list - the list of nodes

getOffset

public final java.lang.Integer getOffset()
Returns:
the offset

setOffset

public final void setOffset(java.lang.Integer o)
Parameters:
o - the offset to set

setMaxResultsPerPage

public final void setMaxResultsPerPage(int maxResults)
sets the maximum number of results to be displayed on a single page.

Parameters:
maxResults - the maximum number of results per page

setMaxQuickNavigationLinks

public final void setMaxQuickNavigationLinks(int i)
sets the maximum number of quick navigation links when paging.

Parameters:
i - the maximum number of quick navigation links

getParsedQuery

public final java.lang.String getParsedQuery()
Returns:
the parsedQuery

setParsedQuery

public final void setParsedQuery(java.lang.String pq)
Parameters:
pq - the parsedQuery to set

getQuery

public final java.lang.String getQuery()
Returns:
the query

setQuery

public final void setQuery(java.lang.String q)
Parameters:
q - the query to set

getTotalResults

public final java.lang.Integer getTotalResults()
Returns:
the totalResults

setTotalResults

public final void setTotalResults(java.lang.Integer t)
Parameters:
t - the totalResults to set

hasMorePages

public final boolean hasMorePages()
returns whether the SiteSearchResult at the current offset has more pages.

Returns:
true, if the result at the current offset has more than one page. Otherwise false.

initSitemapNode

protected void initSitemapNode(SitemapNode n)
initialises the required fields of the given SitemapNode.

Parameters:
n - the node to be initialised

deserializeToJDOM

public org.jdom.Element deserializeToJDOM()
returns a Result for SearchSite.

Specified by:
deserializeToJDOM in interface JDOMable
Returns:
result a Result for the SearchSite
See Also:
JDOMable.deserializeToJDOM()