|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.factual.driver.Factual
public class Factual
Represents the public Factual API. Supports running queries against Factual and inspecting the response. Supports the same levels of authentication supported by Factual's API.
| Constructor Summary | |
|---|---|
Factual(String key,
String secret)
Constructor. |
|
| Method Summary | |
|---|---|
List<Crosswalk> |
crosswalks(String table,
CrosswalkQuery query)
Convenience method to return Crosswalks for the specific query. |
CrosswalkResponse |
fetch(String tableName,
CrosswalkQuery query)
Query's Factual for the Crosswalk data matching the specified query. |
ReadResponse |
fetch(String tableName,
Query query)
Runs a read query against the specified Factual table. |
ReadResponse |
fetch(String tableName,
ResolveQuery query)
Asks Factual to resolve the entity for the attributes specified by query, within the table called tableName. |
Map<String,Object> |
resolve(ResolveQuery query)
Asks Factual to resolve the Places entity for the attributes specified by query. |
ReadResponse |
resolves(ResolveQuery query)
Asks Factual to resolve the Places entity for the attributes specified by query. |
SchemaResponse |
schema(String tableName)
|
void |
setFactHome(String urlBase)
Change the base URL at which to contact Factual's API. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Factual(String key,
String secret)
key - your oauth key.secret - your oauth secret.| Method Detail |
|---|
public void setFactHome(String urlBase)
Example value: http://staging.api.v3.factual.com/t/
urlBase - the base URL at which to contact Factual's API.
public ReadResponse fetch(String tableName,
Query query)
tableName - the name of the table you wish to query (e.g., "places")query - the read query to run against table.
public List<Crosswalk> crosswalks(String table,
CrosswalkQuery query)
public CrosswalkResponse fetch(String tableName,
CrosswalkQuery query)
tableName - the name of the table to crosswalk.query - the Crosswalk query.
public ReadResponse resolves(ResolveQuery query)
Returns the read response from a Factual Resolve request, which includes all records that are potential matches.
query - the Resolve query to run against Factual's Places table.
public Map<String,Object> resolve(ResolveQuery query)
query - a Resolve query with partial attributes for an entity.
public ReadResponse fetch(String tableName,
ResolveQuery query)
Returns the read response from a Factual Resolve request, which includes all records that are potential matches.
Each result record will include a confidence score ("similarity"), and a flag indicating whether Factual decided the entity is the correct resolved match with a high degree of accuracy ("resolved").
There will be 0 or 1 entities returned with "resolved"=true. If there was a full match, it is guaranteed to be the first record in the response.
tableName - the name of the table to resolve within.query - a Resolve query with partial attributes for an entity.
public SchemaResponse schema(String tableName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||