@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Block extends Object implements Serializable, Cloneable, StructuredPojo
Information about each word or line of text in the input document.
For additional information, see Block in the Amazon Textract API reference.
Constructor and Description |
---|
Block() |
Modifier and Type | Method and Description |
---|---|
Block |
clone() |
boolean |
equals(Object obj) |
String |
getBlockType()
The block represents a line of text or one word of text.
|
Geometry |
getGeometry()
Co-ordinates of the rectangle or polygon that contains the text.
|
String |
getId()
Unique identifier for the block.
|
Integer |
getPage()
Page number where the block appears.
|
List<RelationshipsListItem> |
getRelationships()
A list of child blocks of the current block.
|
String |
getText()
The word or line of text extracted from the block.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setBlockType(String blockType)
The block represents a line of text or one word of text.
|
void |
setGeometry(Geometry geometry)
Co-ordinates of the rectangle or polygon that contains the text.
|
void |
setId(String id)
Unique identifier for the block.
|
void |
setPage(Integer page)
Page number where the block appears.
|
void |
setRelationships(Collection<RelationshipsListItem> relationships)
A list of child blocks of the current block.
|
void |
setText(String text)
The word or line of text extracted from the block.
|
String |
toString()
Returns a string representation of this object.
|
Block |
withBlockType(BlockType blockType)
The block represents a line of text or one word of text.
|
Block |
withBlockType(String blockType)
The block represents a line of text or one word of text.
|
Block |
withGeometry(Geometry geometry)
Co-ordinates of the rectangle or polygon that contains the text.
|
Block |
withId(String id)
Unique identifier for the block.
|
Block |
withPage(Integer page)
Page number where the block appears.
|
Block |
withRelationships(Collection<RelationshipsListItem> relationships)
A list of child blocks of the current block.
|
Block |
withRelationships(RelationshipsListItem... relationships)
A list of child blocks of the current block.
|
Block |
withText(String text)
The word or line of text extracted from the block.
|
public void setId(String id)
Unique identifier for the block.
id
- Unique identifier for the block.public String getId()
Unique identifier for the block.
public Block withId(String id)
Unique identifier for the block.
id
- Unique identifier for the block.public void setBlockType(String blockType)
The block represents a line of text or one word of text.
WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
LINE - A string of tab-delimited, contiguous words that are detected on a document page
blockType
- The block represents a line of text or one word of text.
WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
LINE - A string of tab-delimited, contiguous words that are detected on a document page
BlockType
public String getBlockType()
The block represents a line of text or one word of text.
WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
LINE - A string of tab-delimited, contiguous words that are detected on a document page
WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
LINE - A string of tab-delimited, contiguous words that are detected on a document page
BlockType
public Block withBlockType(String blockType)
The block represents a line of text or one word of text.
WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
LINE - A string of tab-delimited, contiguous words that are detected on a document page
blockType
- The block represents a line of text or one word of text.
WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
LINE - A string of tab-delimited, contiguous words that are detected on a document page
BlockType
public Block withBlockType(BlockType blockType)
The block represents a line of text or one word of text.
WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
LINE - A string of tab-delimited, contiguous words that are detected on a document page
blockType
- The block represents a line of text or one word of text.
WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.
LINE - A string of tab-delimited, contiguous words that are detected on a document page
BlockType
public void setText(String text)
The word or line of text extracted from the block.
text
- The word or line of text extracted from the block.public String getText()
The word or line of text extracted from the block.
public Block withText(String text)
The word or line of text extracted from the block.
text
- The word or line of text extracted from the block.public void setPage(Integer page)
Page number where the block appears.
page
- Page number where the block appears.public Integer getPage()
Page number where the block appears.
public Block withPage(Integer page)
Page number where the block appears.
page
- Page number where the block appears.public void setGeometry(Geometry geometry)
Co-ordinates of the rectangle or polygon that contains the text.
geometry
- Co-ordinates of the rectangle or polygon that contains the text.public Geometry getGeometry()
Co-ordinates of the rectangle or polygon that contains the text.
public Block withGeometry(Geometry geometry)
Co-ordinates of the rectangle or polygon that contains the text.
geometry
- Co-ordinates of the rectangle or polygon that contains the text.public List<RelationshipsListItem> getRelationships()
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.
public void setRelationships(Collection<RelationshipsListItem> relationships)
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.
relationships
- 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.public Block withRelationships(RelationshipsListItem... relationships)
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.
NOTE: This method appends the values to the existing list (if any). Use
setRelationships(java.util.Collection)
or withRelationships(java.util.Collection)
if you want
to override the existing values.
relationships
- 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.public Block withRelationships(Collection<RelationshipsListItem> relationships)
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.
relationships
- 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.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.