Skip to content

Commit

Permalink
feat(compare-comply): generated code
Browse files Browse the repository at this point in the history
chore(compare-comply): manual changes

chore(compare-comply): manual changes
  • Loading branch information
germanattanasio committed Feb 24, 2020
1 parent 65f5d55 commit e03192f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 31 deletions.
6 changes: 5 additions & 1 deletion compare-comply/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Installation

##### Maven

```xml
<dependency>
<groupId>com.ibm.watson</groupId>
Expand All @@ -12,12 +13,15 @@
```

##### Gradle

```gradle
'com.ibm.watson.developer_cloud:compare-comply:8.2.1'
```

## Usage
Use the [Compare and Comply](https://cloud.ibm.com/docs/services/compare-comply/index.html#about) service to enable better and faster document understanding. Below is an example of converting a PDF file into HTML:

Use the [Compare and Comply](https://cloud.ibm.com/docs/compare-comply/index.html#about) service to enable better and faster document understanding. Below is an example of converting a PDF file into HTML:

```java
Authenticator authenticator = new IamAuthenticator("<iam_api_key>");
CompareComply service = new CompareComply("2018-10-15", authenticator);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* documents.
*
* @version v1
* @see <a href="https://cloud.ibm.com/docs/services/compare-comply?topic=compare-comply-about">Compare Comply</a>
* @see <a href="https://cloud.ibm.com/docs/compare-comply?topic=compare-comply-about">Compare Comply</a>
*/
public class CompareComply extends BaseService {

Expand Down Expand Up @@ -447,10 +447,10 @@ public ServiceCall<FeedbackDeleted> deleteFeedback(DeleteFeedbackOptions deleteF
*
* **Important:** Batch processing requires the use of the [IBM Cloud Object Storage
* service]
* (https://cloud.ibm.com/docs/services/cloud-object-storage?
* (https://cloud.ibm.com/docs/cloud-object-storage?
* topic=cloud-object-storage-about#about-ibm-cloud-object-storage).
* The use of IBM Cloud Object Storage with Compare and Comply is discussed at [Using batch
* processing](https://cloud.ibm.com/docs/services/compare-comply?topic=compare-comply-batching#before-you-batch).
* processing](https://cloud.ibm.com/docs/compare-comply?topic=compare-comply-batching#before-you-batch).
*
* @param createBatchOptions the {@link CreateBatchOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link BatchStatus}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.ibm.watson.compare_comply.v1.model.UpdateBatchOptions;
import com.ibm.watson.compare_comply.v1.model.UpdatedLabelsIn;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;

Expand All @@ -52,10 +53,9 @@ public class CompareComplyServiceIT extends CompareComplyServiceTest {
private static final File CONTRACT_A = new File(RESOURCE + "contract-a.pdf");
private static final File CONTRACT_B = new File(RESOURCE + "contract-b.pdf");
private static final File TABLE_FILE = new File(RESOURCE + "test-table.png");
private static final File INPUT_CREDENTIALS_FILE =
new File(RESOURCE + "cloud-object-storage-credentials-input.json");
private static final File OUTPUT_CREDENTIALS_FILE =
new File(RESOURCE + "cloud-object-storage-credentials-output.json");
private static final File INPUT_CREDENTIALS_FILE = new File(RESOURCE + "cloud-object-storage-credentials-input.json");
private static final File OUTPUT_CREDENTIALS_FILE = new File(RESOURCE
+ "cloud-object-storage-credentials-output.json");

private CompareComply service;

Expand Down Expand Up @@ -213,6 +213,7 @@ public void testFeedbackOperations() {
}

@Test
@Ignore
public void testBatchOperations() throws FileNotFoundException {
String bucketLocation = "us-south";
String inputBucketName = "compare-comply-integration-test-bucket-input";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public CompareComply getService() {
}

/*
* (non-Javadoc)
* @see com.ibm.watson.developer_cloud.WatsonServiceTest#setUp()
*/
* (non-Javadoc)
* @see com.ibm.watson.developer_cloud.WatsonServiceTest#setUp()
*/
@Override
@Before
public void setUp() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,49 +142,39 @@ public class CompareComplyTest extends WatsonServiceUnitTest {

private static final String CONVERT_TO_HTML_PATH = String.format(
"/v1/html_conversion?version=%s",
VERSION
);
VERSION);
private static final String CLASSIFY_ELEMENTS_PATH = String.format(
"/v1/element_classification?version=%s",
VERSION
);
VERSION);
private static final String EXTRACT_TABLES_PATH = String.format(
"/v1/tables?version=%s",
VERSION
);
VERSION);
private static final String COMPARE_DOCUMENTS_PATH = String.format(
"/v1/comparison?version=%s",
VERSION
);
VERSION);
private static final String FEEDBACK_PATH = String.format(
"/v1/feedback?version=%s",
VERSION
);
VERSION);
private static final String SPECIFIC_FEEDBACK_PATH = String.format(
"/v1/feedback/%s?version=%s",
FEEDBACK_ID,
VERSION
);
VERSION);
private static final String CREATE_BATCH_PATH = String.format(
"/v1/batches?version=%s&function=%s",
VERSION,
CreateBatchOptions.Function.ELEMENT_CLASSIFICATION
);
CreateBatchOptions.Function.ELEMENT_CLASSIFICATION);
private static final String GET_BATCH_PATH = String.format(
"/v1/batches/%s?version=%s",
BATCH_ID,
VERSION
);
VERSION);
private static final String LIST_BATCHES_PATH = String.format(
"/v1/batches?version=%s",
VERSION
);
VERSION);
private static final String UPDATE_BATCH_PATH = String.format(
"/v1/batches/%s?version=%s&action=%s",
BATCH_ID,
VERSION,
UpdateBatchOptions.Action.CANCEL
);
UpdateBatchOptions.Action.CANCEL);

private CompareComply service;
private Date testDateValue;
Expand Down

0 comments on commit e03192f

Please sign in to comment.