public class Discovery extends WatsonService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VERSION_DATE_2016_12_01
The Constant VERSION_DATE_2016_12_01.
|
static java.lang.String |
VERSION_DATE_2017_06_25
The Constant VERSION_DATE_2017_06_25.
|
static java.lang.String |
VERSION_DATE_2017_07_19
The Constant VERSION_DATE_2017_07_19.
|
static java.lang.String |
VERSION_DATE_2017_08_01
The Constant VERSION_DATE_2017_08_01.
|
static java.lang.String |
VERSION_DATE_2017_09_01
The Constant VERSION_DATE_2017_09_01.
|
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION
Constructor and Description |
---|
Discovery(java.lang.String versionDate)
Instantiates a new `Discovery`.
|
Discovery(java.lang.String versionDate,
java.lang.String username,
java.lang.String password)
Instantiates a new `Discovery` with username and password.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<DocumentAccepted> |
addDocument(AddDocumentOptions addDocumentOptions)
Add a document.
|
ServiceCall<TrainingQuery> |
addTrainingData(AddTrainingDataOptions addTrainingDataOptions)
Adds a query to the training data for this collection.
|
ServiceCall<Collection> |
createCollection(CreateCollectionOptions createCollectionOptions)
Create a collection.
|
ServiceCall<Configuration> |
createConfiguration(CreateConfigurationOptions createConfigurationOptions)
Add configuration.
|
ServiceCall<Environment> |
createEnvironment(CreateEnvironmentOptions createEnvironmentOptions)
Add an environment.
|
ServiceCall<TrainingExample> |
createTrainingExample(CreateTrainingExampleOptions createTrainingExampleOptions)
Adds a new example to this training data query.
|
ServiceCall<java.lang.Void> |
deleteAllTrainingData(DeleteAllTrainingDataOptions deleteAllTrainingDataOptions)
Clears all training data for this collection.
|
ServiceCall<java.lang.Void> |
deleteCollection(DeleteCollectionOptions deleteCollectionOptions)
Delete a collection.
|
ServiceCall<java.lang.Void> |
deleteConfiguration(DeleteConfigurationOptions deleteConfigurationOptions)
Delete a configuration.
|
ServiceCall<java.lang.Void> |
deleteDocument(DeleteDocumentOptions deleteDocumentOptions)
Delete a document.
|
ServiceCall<java.lang.Void> |
deleteEnvironment(DeleteEnvironmentOptions deleteEnvironmentOptions)
Delete environment.
|
ServiceCall<java.lang.Void> |
deleteTrainingData(DeleteTrainingDataOptions deleteTrainingDataOptions)
Removes the training data and all associated examples from the training data set.
|
ServiceCall<java.lang.Void> |
deleteTrainingExample(DeleteTrainingExampleOptions deleteTrainingExampleOptions)
Removes the example with the given ID for the training data query.
|
ServiceCall<Collection> |
getCollection(GetCollectionOptions getCollectionOptions)
Get collection details.
|
ServiceCall<Configuration> |
getConfiguration(GetConfigurationOptions getConfigurationOptions)
Get configuration details.
|
ServiceCall<DocumentStatus> |
getDocumentStatus(GetDocumentStatusOptions getDocumentStatusOptions)
Get document details.
|
ServiceCall<Environment> |
getEnvironment(GetEnvironmentOptions getEnvironmentOptions)
Get environment info.
|
ServiceCall<TrainingQuery> |
getTrainingData(GetTrainingDataOptions getTrainingDataOptions)
Shows details for a specific training data query, including the query string and all examples.
|
ServiceCall<TrainingExample> |
getTrainingExample(GetTrainingExampleOptions getTrainingExampleOptions)
Gets the details for this training example.
|
ServiceCall<ListCollectionFieldsResponse> |
listCollectionFields(ListCollectionFieldsOptions listCollectionFieldsOptions)
List unique fields.
|
ServiceCall<ListCollectionsResponse> |
listCollections(ListCollectionsOptions listCollectionsOptions)
List collections.
|
ServiceCall<ListConfigurationsResponse> |
listConfigurations(ListConfigurationsOptions listConfigurationsOptions)
List configurations.
|
ServiceCall<ListEnvironmentsResponse> |
listEnvironments(ListEnvironmentsOptions listEnvironmentsOptions)
List environments.
|
ServiceCall<TrainingDataSet> |
listTrainingData(ListTrainingDataOptions listTrainingDataOptions)
Lists the training data for this collection.
|
ServiceCall<QueryResponse> |
query(QueryOptions queryOptions)
Query documents.
|
ServiceCall<QueryNoticesResponse> |
queryNotices(QueryNoticesOptions queryNoticesOptions)
Query system notices.
|
ServiceCall<TestDocument> |
testConfigurationInEnvironment(TestConfigurationInEnvironmentOptions testConfigurationInEnvironmentOptions)
Test configuration.
|
ServiceCall<Collection> |
updateCollection(UpdateCollectionOptions updateCollectionOptions)
Update a collection.
|
ServiceCall<Configuration> |
updateConfiguration(UpdateConfigurationOptions updateConfigurationOptions)
Update a configuration.
|
ServiceCall<DocumentAccepted> |
updateDocument(UpdateDocumentOptions updateDocumentOptions)
Update a document.
|
ServiceCall<Environment> |
updateEnvironment(UpdateEnvironmentOptions updateEnvironmentOptions)
Update an environment.
|
ServiceCall<TrainingExample> |
updateTrainingExample(UpdateTrainingExampleOptions updateTrainingExampleOptions)
Changes the label or cross reference query for this training example.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toString
public static final java.lang.String VERSION_DATE_2017_09_01
public static final java.lang.String VERSION_DATE_2017_08_01
public static final java.lang.String VERSION_DATE_2017_07_19
public static final java.lang.String VERSION_DATE_2017_06_25
public static final java.lang.String VERSION_DATE_2016_12_01
public Discovery(java.lang.String versionDate)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.public Discovery(java.lang.String versionDate, java.lang.String username, java.lang.String password)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.username
- the usernamepassword
- the passwordpublic ServiceCall<Collection> createCollection(CreateCollectionOptions createCollectionOptions)
createCollectionOptions
- the CreateCollectionOptions
containing the options for the callCollection
with the responsepublic ServiceCall<java.lang.Void> deleteCollection(DeleteCollectionOptions deleteCollectionOptions)
deleteCollectionOptions
- the DeleteCollectionOptions
containing the options for the callpublic ServiceCall<Collection> getCollection(GetCollectionOptions getCollectionOptions)
getCollectionOptions
- the GetCollectionOptions
containing the options for the callCollection
with the responsepublic ServiceCall<ListCollectionFieldsResponse> listCollectionFields(ListCollectionFieldsOptions listCollectionFieldsOptions)
listCollectionFieldsOptions
- the ListCollectionFieldsOptions
containing the options for the callListCollectionFieldsResponse
with the responsepublic ServiceCall<ListCollectionsResponse> listCollections(ListCollectionsOptions listCollectionsOptions)
listCollectionsOptions
- the ListCollectionsOptions
containing the options for the callListCollectionsResponse
with the responsepublic ServiceCall<Collection> updateCollection(UpdateCollectionOptions updateCollectionOptions)
updateCollectionOptions
- the UpdateCollectionOptions
containing the options for the callCollection
with the responsepublic ServiceCall<Configuration> createConfiguration(CreateConfigurationOptions createConfigurationOptions)
createConfigurationOptions
- the CreateConfigurationOptions
containing the options for the callConfiguration
with the responsepublic ServiceCall<java.lang.Void> deleteConfiguration(DeleteConfigurationOptions deleteConfigurationOptions)
deleteConfigurationOptions
- the DeleteConfigurationOptions
containing the options for the callpublic ServiceCall<Configuration> getConfiguration(GetConfigurationOptions getConfigurationOptions)
getConfigurationOptions
- the GetConfigurationOptions
containing the options for the callConfiguration
with the responsepublic ServiceCall<ListConfigurationsResponse> listConfigurations(ListConfigurationsOptions listConfigurationsOptions)
listConfigurationsOptions
- the ListConfigurationsOptions
containing the options for the callListConfigurationsResponse
with the responsepublic ServiceCall<Configuration> updateConfiguration(UpdateConfigurationOptions updateConfigurationOptions)
updateConfigurationOptions
- the UpdateConfigurationOptions
containing the options for the callConfiguration
with the responsepublic ServiceCall<DocumentAccepted> addDocument(AddDocumentOptions addDocumentOptions)
addDocumentOptions
- the AddDocumentOptions
containing the options for the callDocumentAccepted
with the responsepublic ServiceCall<java.lang.Void> deleteDocument(DeleteDocumentOptions deleteDocumentOptions)
deleteDocumentOptions
- the DeleteDocumentOptions
containing the options for the callpublic ServiceCall<DocumentStatus> getDocumentStatus(GetDocumentStatusOptions getDocumentStatusOptions)
getDocumentStatusOptions
- the GetDocumentStatusOptions
containing the options for the callDocumentStatus
with the responsepublic ServiceCall<DocumentAccepted> updateDocument(UpdateDocumentOptions updateDocumentOptions)
updateDocumentOptions
- the UpdateDocumentOptions
containing the options for the callDocumentAccepted
with the responsepublic ServiceCall<Environment> createEnvironment(CreateEnvironmentOptions createEnvironmentOptions)
createEnvironmentOptions
- the CreateEnvironmentOptions
containing the options for the callEnvironment
with the responsepublic ServiceCall<java.lang.Void> deleteEnvironment(DeleteEnvironmentOptions deleteEnvironmentOptions)
deleteEnvironmentOptions
- the DeleteEnvironmentOptions
containing the options for the callpublic ServiceCall<Environment> getEnvironment(GetEnvironmentOptions getEnvironmentOptions)
getEnvironmentOptions
- the GetEnvironmentOptions
containing the options for the callEnvironment
with the responsepublic ServiceCall<ListEnvironmentsResponse> listEnvironments(ListEnvironmentsOptions listEnvironmentsOptions)
listEnvironmentsOptions
- the ListEnvironmentsOptions
containing the options for the callListEnvironmentsResponse
with the responsepublic ServiceCall<Environment> updateEnvironment(UpdateEnvironmentOptions updateEnvironmentOptions)
updateEnvironmentOptions
- the UpdateEnvironmentOptions
containing the options for the callEnvironment
with the responsepublic ServiceCall<QueryResponse> query(QueryOptions queryOptions)
queryOptions
- the QueryOptions
containing the options for the callQueryResponse
with the responsepublic ServiceCall<QueryNoticesResponse> queryNotices(QueryNoticesOptions queryNoticesOptions)
queryNoticesOptions
- the QueryNoticesOptions
containing the options for the callQueryNoticesResponse
with the responsepublic ServiceCall<TestDocument> testConfigurationInEnvironment(TestConfigurationInEnvironmentOptions testConfigurationInEnvironmentOptions)
testConfigurationInEnvironmentOptions
- the TestConfigurationInEnvironmentOptions
containing the
options for the callTestDocument
with the responsepublic ServiceCall<TrainingQuery> addTrainingData(AddTrainingDataOptions addTrainingDataOptions)
addTrainingDataOptions
- the AddTrainingDataOptions
containing the options for the callTrainingQuery
with the responsepublic ServiceCall<TrainingExample> createTrainingExample(CreateTrainingExampleOptions createTrainingExampleOptions)
createTrainingExampleOptions
- the CreateTrainingExampleOptions
containing the options for the callTrainingExample
with the responsepublic ServiceCall<java.lang.Void> deleteAllTrainingData(DeleteAllTrainingDataOptions deleteAllTrainingDataOptions)
deleteAllTrainingDataOptions
- the DeleteAllTrainingDataOptions
containing the options for the callpublic ServiceCall<java.lang.Void> deleteTrainingData(DeleteTrainingDataOptions deleteTrainingDataOptions)
deleteTrainingDataOptions
- the DeleteTrainingDataOptions
containing the options for the callpublic ServiceCall<java.lang.Void> deleteTrainingExample(DeleteTrainingExampleOptions deleteTrainingExampleOptions)
deleteTrainingExampleOptions
- the DeleteTrainingExampleOptions
containing the options for the callpublic ServiceCall<TrainingQuery> getTrainingData(GetTrainingDataOptions getTrainingDataOptions)
getTrainingDataOptions
- the GetTrainingDataOptions
containing the options for the callTrainingQuery
with the responsepublic ServiceCall<TrainingExample> getTrainingExample(GetTrainingExampleOptions getTrainingExampleOptions)
getTrainingExampleOptions
- the GetTrainingExampleOptions
containing the options for the callTrainingExample
with the responsepublic ServiceCall<TrainingDataSet> listTrainingData(ListTrainingDataOptions listTrainingDataOptions)
listTrainingDataOptions
- the ListTrainingDataOptions
containing the options for the callTrainingDataSet
with the responsepublic ServiceCall<TrainingExample> updateTrainingExample(UpdateTrainingExampleOptions updateTrainingExampleOptions)
updateTrainingExampleOptions
- the UpdateTrainingExampleOptions
containing the options for the callTrainingExample
with the response