GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Adding Discovery service · botprophet/java-sdk@0e56ac9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • CHANGELOG.md
  • README.md
  • alchemy
    • README.md
    • pom.xml
  • all
    • pom.xml
  • conversation
    • README.md
    • pom.xml
  • core
    • pom.xml
    • src/test
      • java/com/ibm/watson/developer_cloud/util
        • WaitFor.java
      • resources
        • config.properties
        • vcap_services.json
  • dialog
    • pom.xml
  • discovery
    • README.md
    • build.gradle
    • pom.xml
    • src
      • main/java/com/ibm/watson/developer_cloud/discovery/v1
        • Discovery.java
        • model
          • collection
            • Collection.java
            • CollectionManager.java
            • CreateCollectionRequest.java
            • CreateCollectionResponse.java
            • DeleteCollectionRequest.java
            • DeleteCollectionResponse.java
            • DocumentCounts.java
            • GetCollectionRequest.java
            • GetCollectionResponse.java
            • GetCollectionsRequest.java
            • GetCollectionsResponse.java
            • field
              • Field.java
              • FieldAdapterFactory.java
              • GetCollectionFieldsRequest.java
              • GetCollectionFieldsResponse.java
          • common
            • CommonManager.java
            • EagerNumberAdapterFactory.java
            • Notice.java
            • Status.java
          • configuration
            • Configuration.java
            • ConfigurationManager.java
            • ContentSelector.java
            • Conversions.java
            • CreateConfigurationRequest.java
            • CreateConfigurationResponse.java
            • DeleteConfigurationRequest.java
            • DeleteConfigurationResponse.java
            • Enrichment.java
            • FontSetting.java
            • FontStyles.java
            • GetConfigurationRequest.java
            • GetConfigurationResponse.java
            • GetConfigurationsRequest.java
            • GetConfigurationsResponse.java
            • Heading.java
            • Html.java
            • NormalizationOperation.java
            • Pdf.java
            • UpdateConfigurationRequest.java
            • UpdateConfigurationResponse.java
            • Word.java
          • document
            • CreateDocumentRequest.java
            • CreateDocumentResponse.java
            • DeleteDocumentRequest.java
            • DeleteDocumentResponse.java
            • Document.java
            • DocumentManager.java
            • GetDocumentRequest.java
            • GetDocumentResponse.java
            • UpdateDocumentRequest.java
            • UpdateDocumentResponse.java
          • environment
            • CreateEnvironmentRequest.java
            • CreateEnvironmentResponse.java
            • DeleteEnvironmentRequest.java
            • DeleteEnvironmentResponse.java
            • DiskUsage.java
            • Environment.java
            • EnvironmentManager.java
            • GetEnvironmentRequest.java
            • GetEnvironmentResponse.java
            • GetEnvironmentsRequest.java
            • GetEnvironmentsResponse.java
            • IndexCapacity.java
            • MemoryUsage.java
            • UpdateEnvironmentRequest.java
            • UpdateEnvironmentResponse.java
          • query
            • Aggregation.java
            • AggregationAdapterFactory.java
            • AggregationType.java
            • Calculation.java
            • Histogram.java
            • NestableAggregation.java
            • NestableAggregationResult.java
            • Operator.java
            • QueryManager.java
            • QueryRequest.java
            • QueryResponse.java
            • Term.java
        • package-info.java
      • test
        • java/com/ibm/watson/developer_cloud/discovery/v1
          • DiscoveryServiceIT.java
        • resources/discovery
          • test-config.json
  • document-conversion
    • README.md
    • pom.xml
  • examples/java/com/ibm/watson/developer_cloud/discovery/v1
    • DiscoveryQueryExample.java
  • language-translation
    • README.md
    • pom.xml
  • language-translator
    • README.md
    • pom.xml
  • natural-language-classifier
    • README.md
    • pom.xml
  • personality-insights
    • README.md
    • pom.xml
  • pom.xml
  • retrieve-and-rank
    • README.md
    • pom.xml
  • settings.gradle
  • speech-to-text
    • README.md
    • pom.xml
  • text-to-speech
    • README.md
    • pom.xml
  • tone-analyzer
    • README.md
    • pom.xml
  • tradeoff-analytics
    • README.md
    • pom.xml
  • visual-recognition
    • README.md
    • pom.xml

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎CHANGELOG.md‎

Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Change Log
22
==========
33

4+
## Version 3.5.3
5+
6+
_2016-12-15_
7+
8+
* New: Added Discovery v1
9+
410
## Version 3.5.2
511

612
_2016-12-08_
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+8-7Lines changed: 8 additions & 7 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ APIs and SDKs that use cognitive computing to solve complex problems.
2121
* [Concept Insights](alchemy)
2222
* [Conversation](conversation)
2323
* [Dialog](dialog)
24+
* [Discovery](discovery)
2425
* [Document Conversion](document-conversion)
2526
* [Language Translation](language-translation)
2627
* [Language Translator](language-translator)
@@ -50,7 +51,7 @@ All the services:
5051
<dependency>
5152
<groupId>com.ibm.watson.developer_cloud</groupId>
5253
<artifactId>java-sdk</artifactId>
53-
<version>3.5.2</version>
54+
<version>3.5.3</version>
5455
</dependency>
5556
```
5657

@@ -59,25 +60,25 @@ Only Retrieve and Rank:
5960
<dependency>
6061
<groupId>com.ibm.watson.developer_cloud</groupId>
6162
<artifactId>retrieve-and-rank</artifactId>
62-
<version>3.5.2</version>
63+
<version>3.5.3</version>
6364
</dependency>
6465
```
6566

6667
##### Gradle
6768

6869
All the services:
6970
```gradle
70-
'com.ibm.watson.developer_cloud:java-sdk:3.5.2'
71+
'com.ibm.watson.developer_cloud:java-sdk:3.5.3'
7172
```
7273

7374
Only Retrieve and Rank:
7475
```gradle
75-
'com.ibm.watson.developer_cloud:retrieve-and-rank:3.5.2'
76+
'com.ibm.watson.developer_cloud:retrieve-and-rank:3.5.3'
7677
```
7778

7879
Only Visual Recognition:
7980
```gradle
80-
'com.ibm.watson.developer_cloud:visual-recognition:3.5.2'
81+
'com.ibm.watson.developer_cloud:visual-recognition:3.5.3'
8182
```
8283

8384
Snapshots of the development version are available in [Sonatype's snapshots repository][sonatype_snapshots].
@@ -254,7 +255,7 @@ Gradle:
254255

255256
```sh
256257
$ cd java-sdk
257-
$ gradle jar # build jar file (build/libs/watson-developer-cloud-3.5.2.jar)
258+
$ gradle jar # build jar file (build/libs/watson-developer-cloud-3.5.3.jar)
258259
$ gradle test # run tests
259260
```
260261

@@ -302,4 +303,4 @@ See [CONTRIBUTING.md](.github/CONTRIBUTING.md).
302303
[apache_maven]: http://maven.apache.org/
303304
[sonatype_snapshots]: https://oss.sonatype.org/content/repositories/snapshots/com/ibm/watson/developer_cloud/
304305

305-
[jar]: https://github.com/watson-developer-cloud/java-sdk/releases/download/java-sdk-2.5.2/java-sdk-3.5.2-jar-with-dependencies.jar
306+
[jar]: https://github.com/watson-developer-cloud/java-sdk/releases/download/java-sdk-3.5.3/java-sdk-3.5.3-jar-with-dependencies.jar
Collapse file

‎alchemy/README.md‎

Copy file name to clipboardExpand all lines: alchemy/README.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<dependency>
88
<groupId>com.ibm.watson.developer_cloud</groupId>
99
<artifactId>alchemy</artifactId>
10-
<version>3.5.2</version>
10+
<version>3.5.3</version>
1111
</dependency>
1212
```
1313

1414
##### Gradle
1515
```gradle
16-
'com.ibm.watson.developer_cloud:alchemy:3.5.2'
16+
'com.ibm.watson.developer_cloud:alchemy:3.5.3'
1717
```
1818

1919
## Alchemy Language
Collapse file

‎alchemy/pom.xml‎

Copy file name to clipboardExpand all lines: alchemy/pom.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>parent</artifactId>
55
<groupId>com.ibm.watson.developer_cloud</groupId>
6-
<version>3.5.3-SNAPSHOT</version>
6+
<version>3.5.4-SNAPSHOT</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<artifactId>alchemy</artifactId>
Collapse file

‎all/pom.xml‎

Copy file name to clipboardExpand all lines: all/pom.xml
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.ibm.watson.developer_cloud</groupId>
77
<artifactId>parent</artifactId>
8-
<version>3.5.3-SNAPSHOT</version>
8+
<version>3.5.4-SNAPSHOT</version>
99
</parent>
1010

1111
<artifactId>java-sdk</artifactId>
@@ -27,6 +27,11 @@
2727
<artifactId>dialog</artifactId>
2828
<version>${project.version}</version>
2929
</dependency>
30+
<dependency>
31+
<groupId>${project.groupId}</groupId>
32+
<artifactId>discovery</artifactId>
33+
<version>${project.version}</version>
34+
</dependency>
3035
<dependency>
3136
<groupId>${project.groupId}</groupId>
3237
<artifactId>document-conversion</artifactId>
Collapse file

‎conversation/README.md‎

Copy file name to clipboardExpand all lines: conversation/README.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<dependency>
88
<groupId>com.ibm.watson.developer_cloud</groupId>
99
<artifactId>conversation</artifactId>
10-
<version>3.5.2</version>
10+
<version>3.5.3</version>
1111
</dependency>
1212
```
1313

1414
##### Gradle
1515
```gradle
16-
'com.ibm.watson.developer_cloud:conversation:3.5.2'
16+
'com.ibm.watson.developer_cloud:conversation:3.5.3'
1717
```
1818

1919
## Usage
Collapse file

‎conversation/pom.xml‎

Copy file name to clipboardExpand all lines: conversation/pom.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>parent</artifactId>
55
<groupId>com.ibm.watson.developer_cloud</groupId>
6-
<version>3.5.3-SNAPSHOT</version>
6+
<version>3.5.4-SNAPSHOT</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99

Collapse file

‎core/pom.xml‎

Copy file name to clipboardExpand all lines: core/pom.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.ibm.watson.developer_cloud</groupId>
77
<artifactId>parent</artifactId>
8-
<version>3.5.3-SNAPSHOT</version>
8+
<version>3.5.4-SNAPSHOT</version>
99
</parent>
1010

1111
<artifactId>core</artifactId>
Collapse file

‎core/src/test/java/com/ibm/watson/developer_cloud/util/WaitFor.java‎

Copy file name to clipboard
+60Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* Copyright 2016 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
14+
package com.ibm.watson.developer_cloud.util;
15+
16+
import java.util.concurrent.TimeUnit;
17+
18+
/**
19+
* Wait for a certain condition to be true or for a timeout to expire.
20+
*
21+
*/
22+
23+
public class WaitFor {
24+
/**
25+
* Static method used to wait for a specific condition to be satisfied.
26+
*
27+
* @param condition
28+
* The condition to check
29+
* @param time
30+
* The maximum time to wait for the condition to become true
31+
* @param unit
32+
* The time unit of the {@code time} argument
33+
* @param sleepMs
34+
* The time to wait between checks
35+
*
36+
* @return true if the condition was true before the timeout, false if it wasn't.
37+
*/
38+
public static boolean waitFor(Condition condition, long time, TimeUnit unit, long sleepMs) {
39+
long waitMs = unit.toMillis(time);
40+
long startMs = System.currentTimeMillis();
41+
while (System.currentTimeMillis() - startMs < waitMs) {
42+
if (condition.isSatisfied()) {
43+
return true;
44+
}
45+
try {
46+
Thread.sleep(sleepMs);
47+
} catch (InterruptedException e) {
48+
throw new RuntimeException("WaitFor aborted", e);
49+
}
50+
}
51+
return false;
52+
}
53+
54+
public interface Condition {
55+
/**
56+
* @return true/false indicating whether or not the condition has been met.
57+
*/
58+
boolean isSatisfied();
59+
}
60+
}
Collapse file

‎core/src/test/resources/config.properties‎

Copy file name to clipboardExpand all lines: core/src/test/resources/config.properties
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ dialog.password=SERVICE_PASSWORD
1212
dialog.url=SERVICE_URL
1313
dialog.username=SERVICE_USERNAME
1414

15+
discovery.password=SERVICE_PASSWORD
16+
discovery.url=SERVICE_URL
17+
discovery.username=SERVICE_USERNAME
18+
1519
document_conversion.password=SERVICE_PASSWORD
1620
document_conversion.url=SERVICE_URL
1721
document_conversion.username=SERVICE_USERNAME

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.