Interface Block.Builder

    • Method Detail

      • id

        Block.Builder id​(String 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, BlockType
      • 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:
        BlockType, BlockType
      • 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.
      • 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.