com.clarkparsia.stardog.api.search
Class SearchResults

java.lang.Object
  extended by com.clarkparsia.stardog.api.search.SearchResults
All Implemented Interfaces:
SupportsIteration<SearchResult,QueryEvaluationException>

public final class SearchResults
extends Object
implements SupportsIteration<SearchResult,QueryEvaluationException>

A wrapper around the search results that may additionally have suggestions for an alternative search string.

Since:
0.6.5
Version:
0.7.4
Author:
Evren Sirin, Hector Perez-Urbina

Constructor Summary
SearchResults(String searchString, Iteration<SearchResult,QueryEvaluationException> results, List<String> suggestions, int offset)
           
 
Method Summary
 int getOffset()
          Returns the offset for this slice of results.
 String getSearchString()
          Returns the search string that was used to create this result.
 Iteration<SearchResult,QueryEvaluationException> iteration()
          Returns the suggestions for the original search string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResults

public SearchResults(String searchString,
                     Iteration<SearchResult,QueryEvaluationException> results,
                     List<String> suggestions,
                     int offset)
Method Detail

getOffset

public int getOffset()
Returns the offset for this slice of results.


getSearchString

public String getSearchString()
Returns the search string that was used to create this result.


iteration

public Iteration<SearchResult,QueryEvaluationException> iteration()
Returns the suggestions for the original search string. The return value may be empty but will never be null.

Specified by:
iteration in interface SupportsIteration<SearchResult,QueryEvaluationException>


Copyright © 2010-2013 Clark & Parsia. All Rights Reserved.