public class Discovery extends WatsonService implements EnvironmentManager, ConfigurationManager, CollectionManager, DocumentManager, QueryManager
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSIONCREATED, DESCRIPTION, DISK_USAGE, ENVIRONMENTS, ID, INDEX_CAPACITY, MEMORY_USAGE, NAME, PERCENT_USED, READ_ONLY, SIZE, STATUS, TOTAL, TOTAL_BYTES, UPDATED, USED, USED_BYTESBOLD, CONFIGURATION, CONFIGURATIONS, CONVERSIONS, CREATED, DESCRIPTION, DESTINATION_FIELD, ENRICHMENT, ENRICHMENTS, EXCLUDE_CONTENT, EXCLUDE_TAG_ATTRIBUTES, EXCLUDE_TAGS_COMPLETELY, EXCLUDE_TAGS_KEEP_CONTENT, FIELD, FONT_NAME, FONT_SETTINGS, FONT_STYLES, HEADING, HTML, ID, ITALIC, JSON, KEEP_CONTENT, KEEP_TAG_ATTRIBUTES, LEVEL, MAX_SIZE, MIN_SIZE, NAME, NAMES, NORMALIZATIONS, OPERATION, OPTIONS, OVERWRITE, PDF, SOURCE_FIELD, STATUS, TYPE, UPDATED, WORD, XPATHSAVAILABLE, COLLECTIONS, CONFIGURATION_ID, CREATED, DESCRIPTION, DOCUMENT_COUNTS, FAILED, FIELD, FIELDS, ID, LANGUAGE, NAME, PROCESSING, STATUS, TYPE, UPDATEDCONFIGURATION_ID, CREATED, FILE, ID, METADATA, STATUS, STATUS_DESCRIPTION, UPDATEDAGGREGATION, AGGREGATION_ID, AGGREGATIONS, COUNT, COUNT_PARAM, FIELD, FILTER, ID, INTERNAL_ID, INTERVAL, KEY, LOGIC, MATCHING_RESULTS, OFFSET, QUERY, RESULTS, RETURN, SCORE, TYPE, VALUE| Constructor and Description |
|---|
Discovery(java.lang.String versionDate)
Instantiates a new Discovery service.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toStringpublic Discovery(java.lang.String versionDate)
versionDate - the version datepublic static java.lang.String cleanFieldName(java.lang.String fieldName)
fieldName - the field name to escapepublic static java.lang.String escapeControlChracters(java.lang.String value)
value - the value that potentially contains control characterspublic boolean ping()
throws java.lang.RuntimeException
java.lang.RuntimeException - if the service is unreachablepublic ServiceCall<GetEnvironmentsResponse> getEnvironments(GetEnvironmentsRequest getRequest)
EnvironmentManagergetEnvironments in interface EnvironmentManagergetRequest - options for getting the environmentsGetEnvironmentsResponse containing result of the GetEnvironmentsRequestpublic ServiceCall<GetEnvironmentResponse> getEnvironment(GetEnvironmentRequest getRequest)
EnvironmentManagergetEnvironment in interface EnvironmentManagergetRequest - options for getting the environmentGetEnvironmentResponse containing the result of the GetEnvironmentRequestpublic ServiceCall<CreateEnvironmentResponse> createEnvironment(CreateEnvironmentRequest createRequest)
EnvironmentManagercreateEnvironment in interface EnvironmentManagercreateRequest - options for creating the environmentCreateEnvironmentResponse containing the result of the CreateEnvironmentRequestpublic ServiceCall<DeleteEnvironmentResponse> deleteEnvironment(DeleteEnvironmentRequest deleteRequest)
EnvironmentManagerdeleteEnvironment in interface EnvironmentManagerdeleteRequest - options for deleting the environmentDeleteEnvironmentResponse containing the result of the DeleteEnvironmentRequestpublic ServiceCall<UpdateEnvironmentResponse> updateEnvironment(UpdateEnvironmentRequest updateRequest)
EnvironmentManagerupdateEnvironment in interface EnvironmentManagerupdateRequest - options for deleting the environmentUpdateEnvironmentResponse containing the result of the UpdateEnvironmentRequestpublic ServiceCall<GetConfigurationsResponse> getConfigurations(GetConfigurationsRequest getRequest)
ConfigurationManagergetConfigurations in interface ConfigurationManagergetRequest - options for getting the configurationsGetConfigurationsResponse containing result of the GetConfigurationsRequestpublic ServiceCall<GetConfigurationResponse> getConfiguration(GetConfigurationRequest getRequest)
ConfigurationManagergetConfiguration in interface ConfigurationManagergetRequest - options for getting the configurationGetConfigurationResponse containing result of the GetConfigurationRequestpublic ServiceCall<CreateConfigurationResponse> createConfiguration(CreateConfigurationRequest createRequest)
ConfigurationManagercreateConfiguration in interface ConfigurationManagercreateRequest - options for creating the configurationCreateConfigurationResponse containing the result of the CreateConfigurationRequestpublic ServiceCall<DeleteConfigurationResponse> deleteConfiguration(DeleteConfigurationRequest deleteRequest)
ConfigurationManagerdeleteConfiguration in interface ConfigurationManagerdeleteRequest - options for deleting the configurationDeleteConfigurationResponse containing the result of the DeleteConfigurationRequestpublic ServiceCall<UpdateConfigurationResponse> updateConfiguration(UpdateConfigurationRequest updateRequest)
ConfigurationManagerupdateConfiguration in interface ConfigurationManagerupdateRequest - options for updating the configurationUpdateConfigurationResponse containing the result of the UpdateConfigurationRequestpublic ServiceCall<GetCollectionsResponse> getCollections(GetCollectionsRequest getRequest)
CollectionManagerCollection. An optional parameter of name can be provided to filter by name.getCollections in interface CollectionManagergetRequest - options for getting the CollectionsGetCollectionsResponse containing the result of GetCollectionsRequestpublic ServiceCall<GetCollectionResponse> getCollection(GetCollectionRequest getRequest)
CollectionManagerCollection.getCollection in interface CollectionManagergetRequest - options for getting the CollectionGetCollectionResponse containing the result of GetCollectionRequestpublic ServiceCall<CreateCollectionResponse> createCollection(CreateCollectionRequest createRequest)
CollectionManagerCollection.createCollection in interface CollectionManagercreateRequest - options for creating a CollectionCreateCollectionResponse containing the result of CreateCollectionRequestpublic ServiceCall<DeleteCollectionResponse> deleteCollection(DeleteCollectionRequest deleteRequest)
CollectionManagerCollection.deleteCollection in interface CollectionManagerdeleteRequest - options for deleting a CollectionDeleteCollectionResponse containing the result of DeleteCollectionRequestpublic ServiceCall<GetCollectionFieldsResponse> getCollectionFields(GetCollectionFieldsRequest getRequest)
CollectionManagerFields from a Collection.getCollectionFields in interface CollectionManagergetRequest - options for getting a unique fields from a CollectionGetCollectionFieldsResponse containing the result of GetCollectionFieldsRequestpublic ServiceCall<GetDocumentResponse> getDocument(GetDocumentRequest getRequest)
DocumentManagerDocument.getDocument in interface DocumentManagergetRequest - options for getting a DocumentGetDocumentResponse containing the details of GetDocumentRequestpublic ServiceCall<CreateDocumentResponse> createDocument(CreateDocumentRequest createRequest)
DocumentManagercreateDocument in interface DocumentManagercreateRequest - options for creating a DocumentCreateDocumentResponse containing the details of CreateDocumentRequestpublic ServiceCall<DeleteDocumentResponse> deleteDocument(DeleteDocumentRequest deleteRequest)
DocumentManagerDocument.deleteDocument in interface DocumentManagerdeleteRequest - options for deleting a DocumentDeleteDocumentResponse containing the details of DeleteDocumentRequestpublic ServiceCall<UpdateDocumentResponse> updateDocument(UpdateDocumentRequest updateRequest)
DocumentManagerupdateDocument in interface DocumentManagerupdateRequest - options for updating a DocumentUpdateDocumentResponse containing the details of UpdateDocumentRequestpublic ServiceCall<QueryResponse> query(QueryRequest queryRequest)
QueryManagerquery in interface QueryManagerqueryRequest - options for the queryQueryResponse containing the details from the QueryRequest