Package | Description |
---|---|
com.socrata.api |
Provides objects that implement all the major Socrata operations (verbs).
|
com.socrata.exceptions |
Defines the errors that can happen when using the Socrata APIs defined in com.socrata.api.
|
com.socrata.model.requests |
The model objects (nouns) used for defining SODA requests.These objects are mainly used internally
by the API to provide "retry" logic in the case of 202 retries..
|
Modifier and Type | Method and Description |
---|---|
AssetResponse |
SodaDdl.addAsset(File file)
Adds an asset to the Socrata Service.
|
Column |
SodaDdl.addColumn(String datasetId,
Column column)
Adds a column to the dataset, and returns a definition of the dataset.
|
<T> Meta |
Soda2Producer.addObject(String resourceId,
T object)
Add an object using SODA2, the object will be added to the dataset with the specified resource ID.
|
<T> T |
Soda2Producer.addObject(String resourceId,
T object,
Class<T> retType)
Add an object using SODA2, the object will be added to the dataset with the specified resource ID.
|
Column |
SodaDdl.alterColumn(String datasetId,
Column column)
Alters a column to the dataset, and returns a definition of the dataset.
|
DatasetInfo |
SodaImporter.append(String datasetId,
File file,
int skip,
String[] translation)
This appends the contents of a file to a dataset on Socrata.
|
DatasetInfo |
SodaDdl.createDataset(DatasetInfo dataset)
Creates an empty dataset, based on the dataset passed in.
|
DatasetInfo |
SodaImporter.createViewFromCsv(String name,
String description,
File file)
Creates a dataset from a CSV, using all the default column types.
|
DatasetInfo |
SodaImporter.createViewFromCsv(String name,
String description,
File file,
String rowIdentifierColumnName)
Creates a dataset from a CSV, using all the default column types.
|
DatasetInfo |
SodaWorkflow.createWorkingCopy(String datasetId)
Creates a working copy for the specified dataset ID.
|
void |
Soda2Producer.delete(String resourceId,
String id)
Deletes a row from a dataset.
|
void |
SodaDdl.deleteDataset(String id)
Deletes a dataset
|
com.sun.jersey.api.client.ClientResponse |
HttpLowLevel.deleteRaw(URI uri)
Raw version of the API for issuing a delete, doing common error processing and returning the ClientResponse.
|
<T> com.sun.jersey.api.client.ClientResponse |
Soda2Base.doAdd(String resourceId,
T object)
Adds a single row to a dataset.
|
<T> com.sun.jersey.api.client.ClientResponse |
Soda2Base.doAddObjects(String resourceId,
Collection<T> objects)
Adds a collection of rows to a dataset.
|
com.sun.jersey.api.client.ClientResponse |
Soda2Base.doAddStream(String resourceId,
javax.ws.rs.core.MediaType mediaType,
InputStream stream)
Adds a collection of rows to a dataset, but does so by simply streaming a datastream to the SODA2 server.
|
com.sun.jersey.api.client.ClientResponse |
Soda2Base.doDelete(String resourceId,
String uniqueId)
Deletes a single row from a dataset.
|
<T> com.sun.jersey.api.client.ClientResponse |
Soda2Base.doReplaceObjects(String resourceId,
Collection<T> objects) |
com.sun.jersey.api.client.ClientResponse |
Soda2Base.doReplaceStream(String resourceId,
javax.ws.rs.core.MediaType mediaType,
InputStream stream) |
com.sun.jersey.api.client.ClientResponse |
Soda2Base.doTruncate(String resourceId)
Truncates a dataset by removing all the rows in it.
|
com.sun.jersey.api.client.ClientResponse |
Soda2Base.doUpdate(String resourceId,
Object uniqueId,
Object object)
Update an object.
|
GeocodingResults |
SodaWorkflow.findPendingGeocodingResults(String datasetId)
Checks to see if the current dataset has any pending Geocoding results.
|
com.sun.jersey.api.client.ClientResponse |
HttpLowLevel.follow202(URI uri,
javax.ws.rs.core.MediaType mediaType,
long retryTime,
SodaRequest request2Rerun)
Follows a 202 response that comes back for long running queries.
|
InputStream |
SodaDdl.getAsset(String id)
Get an asset given the ID.
|
<T> T |
HttpLowLevel.getAsyncResults(URI uri,
long waitTime,
long numRetries,
Class<T> cls,
SodaRequest request2Rerun)
Method to check the async callbacks for new responses.
|
<T> T |
HttpLowLevel.getAsyncResults(URI uri,
javax.ws.rs.core.MediaType mediaType,
long waitTime,
long numRetries,
com.sun.jersey.api.client.GenericType<T> cls,
SodaRequest request2Rerun)
Method to check the async callbacks for new responses.
|
com.sun.jersey.api.client.ClientResponse |
HttpLowLevel.getAsyncResults(URI uri,
javax.ws.rs.core.MediaType mediaType,
long waitTime,
long numRetries,
SodaRequest request2Rerun)
Method to check the async callbacks for new responses.
|
com.sun.jersey.api.client.ClientResponse |
Soda2Base.getById(String resourceId,
javax.ws.rs.core.MediaType mediaType,
String uniqueId)
Load a single object based on it's unique ID.
|
<T> T |
Soda2Consumer.getById(String resourceId,
String id,
Class<T> cls)
Retrieves an object on a resource based on it's ID.
|
NonDataFileDataset |
SodaImporter.importNonDataFile(String name,
String description,
File file)
Imports a file that is NOT going to be used to create a datset, but is instead available for
downloading directly.
|
DatasetInfo |
SodaImporter.importScanResults(Blueprint blueprint,
String[] translation,
File file,
ScanResults scanResults)
Imports the results of scanning a file.
|
DatasetInfo |
SodaImporter.importScanResults(String name,
String description,
File file,
ScanResults scanResults)
Imports the results of scanning a file.
|
DatasetInfo |
SodaImporter.importScanResults(String name,
String description,
File file,
ScanResults scanResults,
String rowIdentifierColumnName)
Imports the results of scanning a file.
|
DatasetInfo |
SodaDdl.loadDatasetInfo(String id)
Loads a dataset or view based on it's ID
|
void |
SodaWorkflow.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 |
SodaWorkflow.makePublic(String datasetId)
Makes a dataset public.
|
com.sun.jersey.api.client.ClientResponse |
HttpLowLevel.postFileRaw(URI uri,
javax.ws.rs.core.MediaType mediaType,
File file) |
com.sun.jersey.api.client.ClientResponse |
HttpLowLevel.postFileRaw(URI uri,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MediaType acceptType,
File file) |
com.sun.jersey.api.client.ClientResponse |
HttpLowLevel.postRaw(URI uri,
javax.ws.rs.core.MediaType mediaType,
Object object)
Issues a raw POST to a URI.
|
DatasetInfo |
SodaWorkflow.publish(String datasetId)
Publishes a dataset.
|
com.sun.jersey.api.client.ClientResponse |
HttpLowLevel.putFileRaw(URI uri,
javax.ws.rs.core.MediaType mediaType,
File file) |
com.sun.jersey.api.client.ClientResponse |
HttpLowLevel.putFileRaw(URI uri,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MediaType acceptType,
File file) |
<T> com.sun.jersey.api.client.ClientResponse |
HttpLowLevel.putRaw(URI uri,
javax.ws.rs.core.MediaType mediaType,
Object object)
Issues a raw PUT to a URI.
|
com.sun.jersey.api.client.ClientResponse |
Soda2Base.query(String resourceId,
javax.ws.rs.core.MediaType mediaType,
SoqlQuery query)
Runs a query against a SODA2 resource.
|
com.sun.jersey.api.client.ClientResponse |
Soda2Base.query(String resourceId,
javax.ws.rs.core.MediaType mediaType,
String query)
Runs a query against a SODA2 resource.
|
<T> List<T> |
Soda2Consumer.query(String resourceId,
SoqlQuery query,
com.sun.jersey.api.client.GenericType<List<T>> genericType) |
<T> List<T> |
Soda2Consumer.query(String resourceId,
String query,
com.sun.jersey.api.client.GenericType<List<T>> genericType) |
com.sun.jersey.api.client.ClientResponse |
HttpLowLevel.queryRaw(URI uri,
javax.ws.rs.core.MediaType acceptType)
Issues a raw GET to a URI.
|
void |
SodaDdl.removeColumn(String datasetId,
int columnId)
Removes a column to the dataset, and returns a definition of the dataset.
|
DatasetInfo |
SodaImporter.replace(String datasetId,
File file,
int skip,
String[] translation)
This replaces the contents of a file to a dataset on Socrata.
|
UpsertResult |
Soda2Producer.replace(String resourceId,
List objects)
Replaces a dataset with a list of objects.
|
UpsertResult |
Soda2Producer.replaceCsv(String resourceId,
File csvFile)
Replaces a dataset with the rows defined in the provided CSV.
|
UpsertResult |
Soda2Producer.replaceStream(String resourceId,
javax.ws.rs.core.MediaType mediaType,
InputStream stream)
Replaces a dataset with a the objects serialized in an input stream.
|
ScanResults |
SodaImporter.scan(File file)
Scans a file, then sends it up to the Socrata service to be analyzed and have things
like column types guessed.
|
SearchResults |
SodaDdl.searchViews(SearchClause... searchClauses)
Searches for matching datasets based on certain criteria.
|
protected DatasetInfo |
SodaImporter.sendScanResults(String basePostBody,
String fileId,
String[] translation,
File file) |
void |
Soda2Producer.truncate(String resourceId)
Truncates a dataset by deleting all rows in the dataset.
|
<T> Meta |
Soda2Producer.update(String resourceId,
Object id,
T object)
Updates an object in a dataset.
|
DatasetInfo |
SodaDdl.updateDatasetInfo(DatasetInfo datasetInfo)
Updates a view.
|
protected DatasetInfo |
SodaImporter.updateFromScanResults(String datasetId,
String method,
int skip,
String fileId,
String[] translation,
File file) |
UpsertResult |
Soda2Producer.upsert(String resourceId,
List objects)
"Upserts" a list of objects.
|
UpsertResult |
Soda2Producer.upsertCsv(String resourceId,
File csvFile)
"Upserts" a list of objects.
|
UpsertResult |
Soda2Producer.upsertStream(String resourceId,
javax.ws.rs.core.MediaType mediaType,
InputStream stream)
"Upserts" a list of objects.
|
void |
SodaWorkflow.waitForPendingGeocoding(String datasetId)
Waits for pending geocodes to be finished.
|
Modifier and Type | Class and Description |
---|---|
class |
DoesNotExistException
An exception thrown if the resource does not exist.
|
class |
InvalidLocationError
Thrown if an invalid location is returned from the server with a 202.
|
class |
MalformedQueryError
Thrown if a query is built incorrectly.
|
class |
MustBeLoggedInException
This exception gets thrown if a user needs to have an authenticated session.
|
class |
QueryTimeoutException
Thrown if a query is too expensive, and has taken too long to run.
|
class |
QueryTooComplexException
Thrown if a query is too complicated to run.
|
Modifier and Type | Method and Description |
---|---|
abstract com.sun.jersey.api.client.ClientResponse |
SodaRequest.issueRequest() |
Copyright © 2013. All Rights Reserved.