Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 IBM Corp. All Rights Reserved.
* (C) Copyright IBM Corp. 2019.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -12,6 +12,8 @@
*/
package com.ibm.watson.compare_comply.v1.model;

import java.util.List;

import com.ibm.cloud.sdk.core.service.model.GenericModel;

/**
Expand All @@ -20,7 +22,7 @@
public class KeyValuePair extends GenericModel {

private Key key;
private Value value;
private List<Value> value;

/**
* Gets the key.
Expand All @@ -36,11 +38,11 @@ public Key getKey() {
/**
* Gets the value.
*
* A value in a key-value pair.
* A list of values in a key-value pair.
*
* @return the value
*/
public Value getValue() {
public List<Value> getValue() {
return value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -636,10 +636,11 @@ public void testClassifyElements() throws FileNotFoundException, InterruptedExce
assertEquals(BEGIN, response.getTables().get(0).getKeyValuePairs().get(0).getKey().getLocation().getBegin());
assertEquals(END, response.getTables().get(0).getKeyValuePairs().get(0).getKey().getLocation().getEnd());
assertEquals(TEXT, response.getTables().get(0).getKeyValuePairs().get(0).getKey().getText());
assertEquals(CELL_ID, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getCellId());
assertEquals(BEGIN, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getLocation().getBegin());
assertEquals(END, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getLocation().getEnd());
assertEquals(TEXT, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getText());
assertEquals(CELL_ID, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getCellId());
assertEquals(BEGIN, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getLocation()
.getBegin());
assertEquals(END, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getLocation().getEnd());
assertEquals(TEXT, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getText());
assertEquals(TEXT, response.getTables().get(0).getTitle().getText());
assertEquals(BEGIN, response.getTables().get(0).getTitle().getLocation().getBegin());
assertEquals(END, response.getTables().get(0).getTitle().getLocation().getEnd());
Expand Down Expand Up @@ -795,10 +796,11 @@ public void testExtractTables() throws FileNotFoundException, InterruptedExcepti
assertEquals(BEGIN, response.getTables().get(0).getKeyValuePairs().get(0).getKey().getLocation().getBegin());
assertEquals(END, response.getTables().get(0).getKeyValuePairs().get(0).getKey().getLocation().getEnd());
assertEquals(TEXT, response.getTables().get(0).getKeyValuePairs().get(0).getKey().getText());
assertEquals(CELL_ID, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getCellId());
assertEquals(BEGIN, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getLocation().getBegin());
assertEquals(END, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getLocation().getEnd());
assertEquals(TEXT, response.getTables().get(0).getKeyValuePairs().get(0).getValue().getText());
assertEquals(CELL_ID, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getCellId());
assertEquals(BEGIN, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getLocation()
.getBegin());
assertEquals(END, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getLocation().getEnd());
assertEquals(TEXT, response.getTables().get(0).getKeyValuePairs().get(0).getValue().get(0).getText());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,16 @@
},
"text": "text"
},
"value": {
"cell_id": "cell_id",
"location": {
"begin": 0,
"end": 1
},
"text": "text"
}
"value": [
{
"cell_id": "cell_id",
"location": {
"begin": 0,
"end": 1
},
"text": "text"
}
]
}
],
"title": {
Expand Down
18 changes: 10 additions & 8 deletions compare-comply/src/test/resources/compare_comply/table-return.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,16 @@
},
"text": "text"
},
"value": {
"cell_id": "cell_id",
"location": {
"begin": 0,
"end": 1
},
"text": "text"
}
"value": [
{
"cell_id": "cell_id",
"location": {
"begin": 0,
"end": 1
},
"text": "text"
}
]
}
]
}
Expand Down