Skip to content

Commit ba46325

Browse files
feat(disco-v2): class changes
BREAKING CHANGE: TableBodyCells properties changed to string lists. Location property changed from Map to TableElementLocation.
1 parent 89f2209 commit ba46325

File tree

3 files changed

+32
-33
lines changed

3 files changed

+32
-33
lines changed

discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableBodyCells.java

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019, 2023.
2+
* (C) Copyright IBM Corp. 2024.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -38,22 +38,22 @@ public class TableBodyCells extends GenericModel {
3838
protected Long columnIndexEnd;
3939

4040
@SerializedName("row_header_ids")
41-
protected List<TableRowHeaderIds> rowHeaderIds;
41+
protected List<String> rowHeaderIds;
4242

4343
@SerializedName("row_header_texts")
44-
protected List<TableRowHeaderTexts> rowHeaderTexts;
44+
protected List<String> rowHeaderTexts;
4545

4646
@SerializedName("row_header_texts_normalized")
47-
protected List<TableRowHeaderTextsNormalized> rowHeaderTextsNormalized;
47+
protected List<String> rowHeaderTextsNormalized;
4848

4949
@SerializedName("column_header_ids")
50-
protected List<TableColumnHeaderIds> columnHeaderIds;
50+
protected List<String> columnHeaderIds;
5151

5252
@SerializedName("column_header_texts")
53-
protected List<TableColumnHeaderTexts> columnHeaderTexts;
53+
protected List<String> columnHeaderTexts;
5454

5555
@SerializedName("column_header_texts_normalized")
56-
protected List<TableColumnHeaderTextsNormalized> columnHeaderTextsNormalized;
56+
protected List<String> columnHeaderTextsNormalized;
5757

5858
protected List<DocumentAttribute> attributes;
5959

@@ -140,66 +140,68 @@ public Long getColumnIndexEnd() {
140140
/**
141141
* Gets the rowHeaderIds.
142142
*
143-
* <p>A list of table row header ids.
143+
* <p>A list of ID values that represent the table row headers that are associated with this body
144+
* cell.
144145
*
145146
* @return the rowHeaderIds
146147
*/
147-
public List<TableRowHeaderIds> getRowHeaderIds() {
148+
public List<String> getRowHeaderIds() {
148149
return rowHeaderIds;
149150
}
150151

151152
/**
152153
* Gets the rowHeaderTexts.
153154
*
154-
* <p>A list of table row header texts.
155+
* <p>A list of row header values that are associated with this body cell.
155156
*
156157
* @return the rowHeaderTexts
157158
*/
158-
public List<TableRowHeaderTexts> getRowHeaderTexts() {
159+
public List<String> getRowHeaderTexts() {
159160
return rowHeaderTexts;
160161
}
161162

162163
/**
163164
* Gets the rowHeaderTextsNormalized.
164165
*
165-
* <p>A list of table row header texts normalized.
166+
* <p>A list of normalized row header values that are associated with this body cell.
166167
*
167168
* @return the rowHeaderTextsNormalized
168169
*/
169-
public List<TableRowHeaderTextsNormalized> getRowHeaderTextsNormalized() {
170+
public List<String> getRowHeaderTextsNormalized() {
170171
return rowHeaderTextsNormalized;
171172
}
172173

173174
/**
174175
* Gets the columnHeaderIds.
175176
*
176-
* <p>A list of table column header ids.
177+
* <p>A list of ID values that represent the column headers that are associated with this body
178+
* cell.
177179
*
178180
* @return the columnHeaderIds
179181
*/
180-
public List<TableColumnHeaderIds> getColumnHeaderIds() {
182+
public List<String> getColumnHeaderIds() {
181183
return columnHeaderIds;
182184
}
183185

184186
/**
185187
* Gets the columnHeaderTexts.
186188
*
187-
* <p>A list of table column header texts.
189+
* <p>A list of column header values that are associated with this body cell.
188190
*
189191
* @return the columnHeaderTexts
190192
*/
191-
public List<TableColumnHeaderTexts> getColumnHeaderTexts() {
193+
public List<String> getColumnHeaderTexts() {
192194
return columnHeaderTexts;
193195
}
194196

195197
/**
196198
* Gets the columnHeaderTextsNormalized.
197199
*
198-
* <p>A list of table column header texts normalized.
200+
* <p>A list of normalized column header values that are associated with this body cell.
199201
*
200202
* @return the columnHeaderTextsNormalized
201203
*/
202-
public List<TableColumnHeaderTextsNormalized> getColumnHeaderTextsNormalized() {
204+
public List<String> getColumnHeaderTextsNormalized() {
203205
return columnHeaderTextsNormalized;
204206
}
205207

discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableColumnHeaders.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2018, 2023.
2+
* (C) Copyright IBM Corp. 2024.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -14,7 +14,6 @@
1414

1515
import com.google.gson.annotations.SerializedName;
1616
import com.ibm.cloud.sdk.core.service.model.GenericModel;
17-
import java.util.Map;
1817

1918
/**
2019
* Column-level cells, each applicable as a header to other cells in the same column as itself, of
@@ -25,7 +24,7 @@ public class TableColumnHeaders extends GenericModel {
2524
@SerializedName("cell_id")
2625
protected String cellId;
2726

28-
protected Map<String, Object> location;
27+
protected TableElementLocation location;
2928
protected String text;
3029

3130
@SerializedName("text_normalized")
@@ -59,12 +58,12 @@ public String getCellId() {
5958
/**
6059
* Gets the location.
6160
*
62-
* <p>The location of the column header cell in the current table as defined by its `begin` and
63-
* `end` offsets, respectfully, in the input document.
61+
* <p>The numeric location of the identified element in the document, represented with two
62+
* integers labeled `begin` and `end`.
6463
*
6564
* @return the location
6665
*/
67-
public Map<String, Object> getLocation() {
66+
public TableElementLocation getLocation() {
6867
return location;
6968
}
7069

@@ -82,8 +81,7 @@ public String getText() {
8281
/**
8382
* Gets the textNormalized.
8483
*
85-
* <p>If you provide customization input, the normalized version of the cell text according to the
86-
* customization; otherwise, the same value as `text`.
84+
* <p>Normalized column header text.
8785
*
8886
* @return the textNormalized
8987
*/

discovery/src/main/java/com/ibm/watson/discovery/v2/model/TableHeaders.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2018, 2023.
2+
* (C) Copyright IBM Corp. 2024.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -14,15 +14,14 @@
1414

1515
import com.google.gson.annotations.SerializedName;
1616
import com.ibm.cloud.sdk.core.service.model.GenericModel;
17-
import java.util.Map;
1817

1918
/** The contents of the current table's header. */
2019
public class TableHeaders extends GenericModel {
2120

2221
@SerializedName("cell_id")
2322
protected String cellId;
2423

25-
protected Map<String, Object> location;
24+
protected TableElementLocation location;
2625
protected String text;
2726

2827
@SerializedName("row_index_begin")
@@ -53,12 +52,12 @@ public String getCellId() {
5352
/**
5453
* Gets the location.
5554
*
56-
* <p>The location of the table header cell in the current table as defined by its `begin` and
57-
* `end` offsets, respectfully, in the input document.
55+
* <p>The numeric location of the identified element in the document, represented with two
56+
* integers labeled `begin` and `end`.
5857
*
5958
* @return the location
6059
*/
61-
public Map<String, Object> getLocation() {
60+
public TableElementLocation getLocation() {
6261
return location;
6362
}
6463

0 commit comments

Comments
 (0)