io.clarify.api
Class BundleSearchResults

java.lang.Object
  extended by io.clarify.api.ClarifyModel
      extended by io.clarify.api.ClarifyPaginatedModel
          extended by io.clarify.api.BundleSearchResults

public class BundleSearchResults
extends ClarifyPaginatedModel

Represents a Search Bundles Clarify API response type, allowing the caller to obtain the matches, terms, and scores from the results, the list of search result items, and paginate through the results.


Field Summary
 
Fields inherited from class io.clarify.api.ClarifyModel
client, response
 
Constructor Summary
BundleSearchResults(ClarifyClient client, ClarifyResponse response)
           
 
Method Summary
 us.monoid.json.JSONArray getItemResults()
          Returns the item_results array from the search results that provides term results, scores, and matches
 BundleSearchResults nextPage()
          Attempt to request the next page using the next link from the current page
 
Methods inherited from class io.clarify.api.ClarifyPaginatedModel
getLinkItems, getLinks, hasNextPage, nextLink
 
Methods inherited from class io.clarify.api.ClarifyModel
getClarifyClient, getClarifyResponse, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BundleSearchResults

public BundleSearchResults(ClarifyClient client,
                           ClarifyResponse response)
Method Detail

getItemResults

public us.monoid.json.JSONArray getItemResults()
Returns the item_results array from the search results that provides term results, scores, and matches

Returns:
a us.monoid.json.JSONArray containing all items under the item_results field in the response

nextPage

public BundleSearchResults nextPage()
                             throws us.monoid.json.JSONException,
                                    IOException
Attempt to request the next page using the next link from the current page

Returns:
a BundleSearchResults representing the next page, or null if there are no other pages
Throws:
us.monoid.json.JSONException - if the href for the next link could not be obtained for some reason
IOException - if a network failure occurred while fetching the next page


Copyright © 2015 Clarify Inc. All Rights Reserved.