Interface Block.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Block.Builder,Block>, SdkBuilder<Block.Builder,Block>, SdkPojo
Enclosing class:
Block

public static interface Block.Builder extends SdkPojo, CopyableBuilder<Block.Builder,Block>
  • Method Details

    • id

      Unique identifier for the block.

      Parameters:
      id - Unique identifier for the block.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • blockType

      Block.Builder blockType(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

      Parameters:
      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

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • blockType

      Block.Builder blockType(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

      Parameters:
      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

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • text

      Block.Builder text(String text)

      The word or line of text extracted from the block.

      Parameters:
      text - The word or line of text extracted from the block.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • page

      Block.Builder page(Integer page)

      Page number where the block appears.

      Parameters:
      page - Page number where the block appears.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • geometry

      Block.Builder geometry(Geometry geometry)

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

      Parameters:
      geometry - Co-ordinates of the rectangle or polygon that contains the text.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • geometry

      default Block.Builder geometry(Consumer<Geometry.Builder> geometry)

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

      This is a convenience method that creates an instance of the Geometry.Builder avoiding the need to create one manually via Geometry.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to geometry(Geometry).

      Parameters:
      geometry - a consumer that will call methods on Geometry.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • relationships

      Block.Builder relationships(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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • relationships

      Block.Builder relationships(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.

      Parameters:
      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.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • relationships

      Block.Builder relationships(Consumer<RelationshipsListItem.Builder>... 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.

      This is a convenience method that creates an instance of the RelationshipsListItem.Builder avoiding the need to create one manually via RelationshipsListItem.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to relationships(List<RelationshipsListItem>).

      Parameters:
      relationships - a consumer that will call methods on RelationshipsListItem.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: