public class SodaDdl extends SodaWorkflow
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ASSET_BASE_PATH |
protected static String |
COLUMNS_PATH |
protected static String |
SEARCH_BASE_PATH |
API_BASE_PATH, GEO_BASE_PATH, geocodingUri, httpLowLevel, mapper, TICKET_CHECK, VIEWS_BASE_PATH, viewUri| Constructor and Description |
|---|
SodaDdl(HttpLowLevel httpLowLevel)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
AssetResponse |
addAsset(File file)
Adds an asset to the Socrata Service.
|
Column |
addColumn(String datasetId,
Column column)
Adds a column to the dataset, and returns a definition of the dataset.
|
Column |
alterColumn(String datasetId,
Column column)
Alters a column to the dataset, and returns a definition of the dataset.
|
DatasetInfo |
createDataset(DatasetInfo dataset)
Creates an empty dataset, based on the dataset passed in.
|
void |
deleteDataset(String id)
Deletes a dataset
|
InputStream |
getAsset(String id)
Get an asset given the ID.
|
DatasetInfo |
loadDatasetInfo(String id)
Loads a dataset or view based on it's ID
|
static SodaDdl |
newDdl(String url,
String userName,
String password,
String token)
Create a new SodaDdl object, using the supplied credentials for authentication.
|
void |
removeColumn(String datasetId,
int columnId)
Removes a column to the dataset, and returns a definition of the dataset.
|
SearchResults |
searchViews(SearchClause... searchClauses)
Searches for matching datasets based on certain criteria.
|
DatasetInfo |
updateDatasetInfo(DatasetInfo datasetInfo)
Updates a view.
|
createWorkingCopy, findPendingGeocodingResults, getHttpLowLevel, makePrivate, makePublic, newWorkflow, publish, waitForPendingGeocodingprotected static final String COLUMNS_PATH
protected static final String ASSET_BASE_PATH
protected static final String SEARCH_BASE_PATH
public SodaDdl(HttpLowLevel httpLowLevel)
httpLowLevel - the HttpLowLevel this uses to contact the serverpublic static final SodaDdl newDdl(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 SearchResults searchViews(SearchClause... searchClauses) throws SodaError, InterruptedException
searchClauses - the clauses to searchSodaErrorInterruptedExceptionpublic DatasetInfo createDataset(DatasetInfo dataset) throws SodaError, InterruptedException
dataset - dataset to create the new dataset on. The ID should NOT be set.SodaErrorInterruptedExceptionpublic DatasetInfo loadDatasetInfo(String id) throws SodaError, InterruptedException
id - the ID to load the view through.LongRunningQueryExceptionSodaErrorInterruptedExceptionpublic DatasetInfo updateDatasetInfo(DatasetInfo datasetInfo) throws SodaError, InterruptedException
datasetInfo - the dataset to update to. The ID MUST be set. If this is a Dataset object, the
dataset should be a working copy.SodaErrorInterruptedExceptionpublic void deleteDataset(String id) throws SodaError, InterruptedException
id - the ID of the dataset to deleteSodaErrorInterruptedExceptionpublic Column addColumn(String datasetId, Column column) throws SodaError, InterruptedException
datasetId - id of the dataset to add the column tocolumn - column definitionSodaErrorInterruptedExceptionpublic void removeColumn(String datasetId, int columnId) throws LongRunningQueryException, SodaError
datasetId - id of the dataset to add the column tocolumnId - if of the column to deleteSodaErrorInterruptedExceptionLongRunningQueryExceptionpublic Column alterColumn(String datasetId, Column column) throws SodaError, InterruptedException
datasetId - id of the dataset to change the column tocolumn - column definitionSodaErrorInterruptedExceptionpublic AssetResponse addAsset(File file) throws SodaError, InterruptedException
file - file to uploadSodaErrorInterruptedExceptionpublic InputStream getAsset(String id) throws SodaError, InterruptedException
id - id of the asset to loadSodaErrorInterruptedExceptionCopyright © 2013. All Rights Reserved.