Skip to content

Commit 43797f7

Browse files
WS-1717: add dbpediaTypes and includeDBpediaTypes; fix dbpediaType (singular) back to string
1 parent d4767e7 commit 43797f7

File tree

5 files changed

+20
-4
lines changed

5 files changed

+20
-4
lines changed

api/src/test/mock-data/response/eng-url-entities.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"mention": "Washington",
2121
"normalized": "Washington",
2222
"type": "LOCATION",
23-
"dbpediaType": [
23+
"dbpediaType": "test1",
24+
"dbpediaTypes": [
2425
"test1"
2526
]
2627
}

api/src/test/mock-data/response/eng-url-entities_linked.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"entityId": "Q1088831",
1818
"indocChainId": 2,
1919
"mention": "Washington",
20-
"dbpediaType": [
20+
"dbpediaTypes": [
2121
"test1",
2222
"foo",
2323
"bar"

json/src/test/data/EntitiesResponse.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"salience": 1.0,
1616
"confidence": 1.0,
1717
"linkingConfidence": 1.0,
18-
"dbpediaType": [
18+
"dbpediaType": "test1",
19+
"dbpediaTypes": [
1920
"test1",
2021
"test2"
2122
]

model/src/main/java/com/basistech/rosette/apimodel/EntitiesOptions.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,17 @@ public class EntitiesOptions extends Options {
5858
private final String modelType;
5959

6060
/**
61+
* @deprecated use includeDBpediaTypes instead.
6162
* @return the includeDBpediaType flag.
6263
*/
6364
private final Boolean includeDBpediaType;
6465

66+
/**
67+
* @since 1.14.0 (19.08)
68+
* @return the includeDBpediaType flag.
69+
*/
70+
private final Boolean includeDBpediaTypes;
71+
6572
/**
6673
* @return the includePermID flag.
6774
*/

model/src/main/java/com/basistech/rosette/apimodel/Entity.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,16 @@ public class Entity {
8383
private final Label sentiment;
8484

8585
/**
86+
* @deprecated use dbpediaTypes instead.
8687
* @return the DBpediaType
8788
*/
88-
private final List<String> dbpediaType;
89+
private final String dbpediaType;
90+
91+
/**
92+
* @since 1.14.0 (19.08)
93+
* @return the DBpediaTypes
94+
*/
95+
private final List<String> dbpediaTypes;
8996

9097
/**
9198
* @return the PermID

0 commit comments

Comments
 (0)