Skip to content

Commit be85232

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

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class DocStructure extends GenericModel {
2626
private List<SectionTitles> sectionTitles;
2727
@SerializedName("leading_sentences")
2828
private List<LeadingSentence> leadingSentences;
29+
private List<Paragraphs> paragraphs;
2930

3031
/**
3132
* Gets the sectionTitles.
@@ -49,4 +50,15 @@ public List<SectionTitles> getSectionTitles() {
4950
public List<LeadingSentence> getLeadingSentences() {
5051
return leadingSentences;
5152
}
53+
54+
/**
55+
* Gets the paragraphs.
56+
*
57+
* An array containing one object per paragraph, in parallel with the `section_titles` and `leading_sentences` arrays.
58+
*
59+
* @return the paragraphs
60+
*/
61+
public List<Paragraphs> getParagraphs() {
62+
return paragraphs;
63+
}
5264
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
* The locations of each paragraph in the input document.
19+
*/
20+
public class Paragraphs extends GenericModel {
21+
22+
private Location location;
23+
24+
/**
25+
* Gets the location.
26+
*
27+
* The numeric location of the identified element in the document, represented with two integers labeled `begin` and
28+
* `end`.
29+
*
30+
* @return the location
31+
*/
32+
public Location getLocation() {
33+
return location;
34+
}
35+
}

0 commit comments

Comments
 (0)