Search in sources :

Example 11 with CreateCollectionOptions

use of com.ibm.watson.discovery.v2.model.CreateCollectionOptions in project java-sdk by watson-developer-cloud.

the class VisualRecognitionIT method createTestCollection.

private String createTestCollection() {
    String testCollectionName = "java-sdk-test-collection";
    String testCollectionDescription = "Collection for integration testing of the Visual Recognition v4 service in " + "the Java SDK";
    CreateCollectionOptions createCollectionOptions = new CreateCollectionOptions.Builder().name(testCollectionName).description(testCollectionDescription).build();
    Collection newCollection = service.createCollection(createCollectionOptions).execute().getResult();
    String testCollectionId = newCollection.getCollectionId();
    return testCollectionId;
}
Also used : CreateCollectionOptions(com.ibm.watson.visual_recognition.v4.model.CreateCollectionOptions) Collection(com.ibm.watson.visual_recognition.v4.model.Collection)

Aggregations

Test (org.junit.Test)5 WatsonServiceTest (com.ibm.watson.developer_cloud.WatsonServiceTest)4 Collection (com.ibm.watson.developer_cloud.discovery.v1.model.Collection)4 CreateCollectionOptions (com.ibm.watson.developer_cloud.discovery.v1.model.CreateCollectionOptions)4 Configuration (com.ibm.watson.developer_cloud.discovery.v1.model.Configuration)3 Collection (com.ibm.watson.visual_recognition.v4.model.Collection)3 CreateCollectionOptions (com.ibm.watson.visual_recognition.v4.model.CreateCollectionOptions)3 MockResponse (okhttp3.mockwebserver.MockResponse)3 RecordedRequest (okhttp3.mockwebserver.RecordedRequest)3 Test (org.testng.annotations.Test)3 Collection (com.ibm.watson.discovery.v1.model.Collection)2 CreateCollectionOptions (com.ibm.watson.discovery.v1.model.CreateCollectionOptions)2 ByteArrayInputStream (java.io.ByteArrayInputStream)2 InputStream (java.io.InputStream)2 JsonObject (com.google.gson.JsonObject)1 RequestBuilder (com.ibm.cloud.sdk.core.http.RequestBuilder)1 Authenticator (com.ibm.cloud.sdk.core.security.Authenticator)1 IamAuthenticator (com.ibm.cloud.sdk.core.security.IamAuthenticator)1 WatsonServiceTest (com.ibm.watson.common.WatsonServiceTest)1 AddDocumentOptions (com.ibm.watson.developer_cloud.discovery.v1.model.AddDocumentOptions)1