com.factual.driver
Class SchemaResponse

java.lang.Object
  extended by com.factual.driver.Response
      extended by com.factual.driver.SchemaResponse
All Implemented Interfaces:
Tabular

public class SchemaResponse
extends Response
implements Tabular

Represents the response from running a schema request against Factual.

Author:
aaron

Field Summary
 
Fields inherited from class com.factual.driver.Response
UNDEFINED
 
Constructor Summary
SchemaResponse(String json)
          Constructor, parses from a JSON response String.
 
Method Summary
 ColumnSchema getColumnSchema(String columnName)
           
 Map<String,ColumnSchema> getColumnSchemas()
           
 List<Map<String,Object>> getData()
           
 String getDescription()
           
 String getJson()
          Subclasses of Response must provide access to the original JSON representation of Factual's response.
 String getTitle()
           
 boolean isGeoEnabled()
           
 boolean isSearchEnabled()
           
 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

SchemaResponse

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

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

getTitle

public String getTitle()

getDescription

public String getDescription()

isSearchEnabled

public boolean isSearchEnabled()

isGeoEnabled

public boolean isGeoEnabled()

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 full JSON response from Factual

size

public int size()
Returns:
the size of the schema (that is, the number of columns in the table)

getColumnSchemas

public Map<String,ColumnSchema> getColumnSchemas()

getColumnSchema

public ColumnSchema getColumnSchema(String columnName)

getData

public List<Map<String,Object>> getData()
Specified by:
getData in interface Tabular


Copyright © 2012. All Rights Reserved.