/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.comprehend.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Information about each word or line of text in the input document. *

*

* For additional information, see Block in * the Amazon Textract API reference. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Block implements Serializable, Cloneable, StructuredPojo { /** *

* Unique identifier for the block. *

*/ private String id; /** *

* The block represents a line of text or one word of text. *

* */ private String blockType; /** *

* The word or line of text extracted from the block. *

*/ private String text; /** *

* Page number where the block appears. *

*/ private Integer page; /** *

* Co-ordinates of the rectangle or polygon that contains the text. *

*/ private Geometry geometry; /** *

* A list of child blocks of the current block. For example, a LINE object has child blocks for each WORD block * that's part of the line of text. *

*/ private java.util.List relationships; /** *

* Unique identifier for the block. *

* * @param id * Unique identifier for the block. */ public void setId(String id) { this.id = id; } /** *

* Unique identifier for the block. *

* * @return Unique identifier for the block. */ public String getId() { return this.id; } /** *

* Unique identifier for the block. *

* * @param id * Unique identifier for the block. * @return Returns a reference to this object so that method calls can be chained together. */ public Block withId(String id) { setId(id); return this; } /** *

* The block represents a line of text or one word of text. *

* * * @param blockType * The block represents a line of text or one word of text.

*