com.factual.driver
Class CrosswalkResponse

java.lang.Object
  extended by com.factual.driver.Response
      extended by com.factual.driver.CrosswalkResponse

public class CrosswalkResponse
extends Response

Represents the response from running a Crosswalk lookup against Factual.

Author:
aaron

Field Summary
 
Fields inherited from class com.factual.driver.Response
UNDEFINED
 
Constructor Summary
CrosswalkResponse(String json)
          Constructor, parses from a JSON response String.
 
Method Summary
 Crosswalk first()
           
 List<Crosswalk> getCrosswalks()
          Returns the ordered collection of Crosswalks represented by this response.
 String getJson()
          Subclasses of Response must provide access to the original JSON representation of Factual's response.
 int size()
           
 
Methods inherited from class com.factual.driver.Response
getIncludedRowCount, getStatus, getTotalRowCount, getVersion, isEmpty, toString, withMeta
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CrosswalkResponse

public CrosswalkResponse(String json)
Constructor, parses from a JSON response String.

Parameters:
json - the JSON response String returned by Factual.
Method Detail

getJson

public String getJson()
Description copied from class: Response
Subclasses of Response must provide access to the original JSON representation of Factual's response.

Specified by:
getJson in class Response
Returns:
the original JSON representation of Factual's response.

getCrosswalks

public List<Crosswalk> getCrosswalks()
Returns the ordered collection of Crosswalks represented by this response.

Returns:
the ordered collection of Crosswalks represented by this response.

first

public Crosswalk first()
Returns:
the first Crosswalk hit or null if no data was returned.

size

public int size()
Returns:
the size of the result set


Copyright © 2012. All Rights Reserved.