Skip to content

Commit

Permalink
feat(Compare and Comply): Add Mention model
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatino10 committed Jul 23, 2019
1 parent be85232 commit b3675fd
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright 2018 IBM Corp. All Rights Reserved.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package com.ibm.watson.compare_comply.v1.model;

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

/**
* A mention of a party.
*/
public class Mention extends GenericModel {

private String text;
private Location location;

/**
* Gets the text.
*
* The name of the party.
*
* @return the text
*/
public String getText() {
return text;
}

/**
* Gets the location.
*
* The numeric location of the identified element in the document, represented with two integers labeled `begin` and
* `end`.
*
* @return the location
*/
public Location getLocation() {
return location;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@ public interface Importance {
}

private String party;
private String importance;
private String role;
private String importance;
private List<Address> addresses;
private List<Contact> contacts;
private List<Mention> mentions;

/**
* Gets the party.
*
* A string identifying the party.
* The normalized form of the party's name.
*
* @return the party
*/
Expand All @@ -49,31 +50,31 @@ public String getParty() {
}

/**
* Gets the importance.
* Gets the role.
*
* A string that identifies the importance of the party.
* A string identifying the party's role.
*
* @return the importance
* @return the role
*/
public String getImportance() {
return importance;
public String getRole() {
return role;
}

/**
* Gets the role.
* Gets the importance.
*
* A string identifying the party's role.
* A string that identifies the importance of the party.
*
* @return the role
* @return the importance
*/
public String getRole() {
return role;
public String getImportance() {
return importance;
}

/**
* Gets the addresses.
*
* List of the party's address or addresses.
* A list of the party's address or addresses.
*
* @return the addresses
*/
Expand All @@ -84,11 +85,22 @@ public List<Address> getAddresses() {
/**
* Gets the contacts.
*
* List of the names and roles of contacts identified in the input document.
* A list of the names and roles of contacts identified in the input document.
*
* @return the contacts
*/
public List<Contact> getContacts() {
return contacts;
}

/**
* Gets the mentions.
*
* A list of the party's mentions in the input document.
*
* @return the mentions
*/
public List<Mention> getMentions() {
return mentions;
}
}

0 comments on commit b3675fd

Please sign in to comment.