Skip to content

Commit b3675fd

Browse files
committed
feat(Compare and Comply): Add Mention model
1 parent be85232 commit b3675fd

File tree

2 files changed

+73
-14
lines changed

2 files changed

+73
-14
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright 2018 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+
package com.ibm.watson.compare_comply.v1.model;
14+
15+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
16+
17+
/**
18+
* A mention of a party.
19+
*/
20+
public class Mention extends GenericModel {
21+
22+
private String text;
23+
private Location location;
24+
25+
/**
26+
* Gets the text.
27+
*
28+
* The name of the party.
29+
*
30+
* @return the text
31+
*/
32+
public String getText() {
33+
return text;
34+
}
35+
36+
/**
37+
* Gets the location.
38+
*
39+
* The numeric location of the identified element in the document, represented with two integers labeled `begin` and
40+
* `end`.
41+
*
42+
* @return the location
43+
*/
44+
public Location getLocation() {
45+
return location;
46+
}
47+
}

compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/model/Parties.java

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ public interface Importance {
3232
}
3333

3434
private String party;
35-
private String importance;
3635
private String role;
36+
private String importance;
3737
private List<Address> addresses;
3838
private List<Contact> contacts;
39+
private List<Mention> mentions;
3940

4041
/**
4142
* Gets the party.
4243
*
43-
* A string identifying the party.
44+
* The normalized form of the party's name.
4445
*
4546
* @return the party
4647
*/
@@ -49,31 +50,31 @@ public String getParty() {
4950
}
5051

5152
/**
52-
* Gets the importance.
53+
* Gets the role.
5354
*
54-
* A string that identifies the importance of the party.
55+
* A string identifying the party's role.
5556
*
56-
* @return the importance
57+
* @return the role
5758
*/
58-
public String getImportance() {
59-
return importance;
59+
public String getRole() {
60+
return role;
6061
}
6162

6263
/**
63-
* Gets the role.
64+
* Gets the importance.
6465
*
65-
* A string identifying the party's role.
66+
* A string that identifies the importance of the party.
6667
*
67-
* @return the role
68+
* @return the importance
6869
*/
69-
public String getRole() {
70-
return role;
70+
public String getImportance() {
71+
return importance;
7172
}
7273

7374
/**
7475
* Gets the addresses.
7576
*
76-
* List of the party's address or addresses.
77+
* A list of the party's address or addresses.
7778
*
7879
* @return the addresses
7980
*/
@@ -84,11 +85,22 @@ public List<Address> getAddresses() {
8485
/**
8586
* Gets the contacts.
8687
*
87-
* List of the names and roles of contacts identified in the input document.
88+
* A list of the names and roles of contacts identified in the input document.
8889
*
8990
* @return the contacts
9091
*/
9192
public List<Contact> getContacts() {
9293
return contacts;
9394
}
95+
96+
/**
97+
* Gets the mentions.
98+
*
99+
* A list of the party's mentions in the input document.
100+
*
101+
* @return the mentions
102+
*/
103+
public List<Mention> getMentions() {
104+
return mentions;
105+
}
94106
}

0 commit comments

Comments
 (0)