public class SodaWorkflow extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
API_BASE_PATH |
protected static String |
GEO_BASE_PATH |
protected URI |
geocodingUri |
protected HttpLowLevel |
httpLowLevel |
protected org.codehaus.jackson.map.ObjectMapper |
mapper |
protected static long |
TICKET_CHECK |
protected static String |
VIEWS_BASE_PATH |
protected URI |
viewUri |
Constructor and Description |
---|
SodaWorkflow(HttpLowLevel httpLowLevel)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DatasetInfo |
createWorkingCopy(String datasetId)
Creates a working copy for the specified dataset ID.
|
GeocodingResults |
findPendingGeocodingResults(String datasetId)
Checks to see if the current dataset has any pending Geocoding results.
|
HttpLowLevel |
getHttpLowLevel()
Gets the underlying connection.
|
void |
makePrivate(String datasetId)
Makes a dataset private, so it can only be viewed by users that it has been shared
with, or people who are admins on the site.
|
void |
makePublic(String datasetId)
Makes a dataset public.
|
static SodaWorkflow |
newWorkflow(String url,
String userName,
String password,
String token)
Create a new SodaWorkflow object, using the supplied credentials for authentication.
|
DatasetInfo |
publish(String datasetId)
Publishes a dataset.
|
void |
waitForPendingGeocoding(String datasetId)
Waits for pending geocodes to be finished.
|
protected static final String API_BASE_PATH
protected static final String GEO_BASE_PATH
protected static final long TICKET_CHECK
protected static final String VIEWS_BASE_PATH
protected final URI geocodingUri
protected final HttpLowLevel httpLowLevel
protected final org.codehaus.jackson.map.ObjectMapper mapper
protected final URI viewUri
public SodaWorkflow(HttpLowLevel httpLowLevel)
httpLowLevel
- the HttpLowLevel this uses to contact the serverpublic static final SodaWorkflow newWorkflow(String url, String userName, String password, String token)
url
- the base URL for the SODA2 domain to access.userName
- user name to log in aspassword
- password to log in withtoken
- the App Token to use for authorization and usage tracking. If this is null
, no value will be sent.public HttpLowLevel getHttpLowLevel()
public DatasetInfo publish(String datasetId) throws SodaError, InterruptedException
datasetId
- id of the dataset to publish.SodaError
InterruptedException
LongRunningQueryException
public DatasetInfo createWorkingCopy(String datasetId) throws SodaError, InterruptedException
datasetId
- the id of the dataset.SodaError
InterruptedException
public void makePublic(String datasetId) throws SodaError, InterruptedException
datasetId
- id of the dataset to make public.SodaError
InterruptedException
public void makePrivate(String datasetId) throws SodaError, InterruptedException
datasetId
- id of the datasetSodaError
InterruptedException
public void waitForPendingGeocoding(String datasetId) throws InterruptedException, SodaError
datasetId
- id of the dataset to check for outstanding geocodes.InterruptedException
SodaError
public GeocodingResults findPendingGeocodingResults(String datasetId) throws SodaError, InterruptedException
datasetId
- id of the datasetSodaError
InterruptedException
Copyright © 2013. All Rights Reserved.