Class Block.Builder

    • Method Detail

      • object

        public Block.IdStage object​(@NotNull
                                    java.lang.String object)

        The type of object. In this case, it will always be "block".

        The type of object. In this case, it will always be "block".

        Specified by:
        object in interface Block.ObjectStage
        Returns:
        Reference to this so that method calls can be chained together.
      • id

        public Block.TypeStage id​(@NotNull
                                  java.lang.String id)

        A unique identifier for the block, deterministically generated as a hash of the block content.

        A unique identifier for the block, deterministically generated as a hash of the block content.

        Specified by:
        id in interface Block.IdStage
        Returns:
        Reference to this so that method calls can be chained together.
      • type

        public Block.ContentStage type​(@NotNull
                                       BlockType type)

        The type of block:

        • "text" - Regular text content
        • "heading" - Section or document headings
        • "section_heading" - Subsection headings
        • "table" - Tabular data with rows and columns
        • "table_head" - Table header cells
        • "table_cell" - Table body cells
        • "figure" - Images, charts, diagrams, or logos

        The type of block:

        • "text" - Regular text content
        • "heading" - Section or document headings
        • "section_heading" - Subsection headings
        • "table" - Tabular data with rows and columns
        • "table_head" - Table header cells
        • "table_cell" - Table body cells
        • "figure" - Images, charts, diagrams, or logos
        Specified by:
        type in interface Block.TypeStage
        Returns:
        Reference to this so that method calls can be chained together.
      • content

        public Block.DetailsStage content​(@NotNull
                                          java.lang.String content)

        The textual content of the block formatted based on the target format.

        The textual content of the block formatted based on the target format.

        Specified by:
        content in interface Block.ContentStage
        Returns:
        Reference to this so that method calls can be chained together.
      • details

        public Block.MetadataStage details​(@NotNull
                                           BlockDetails details)

        Additional details specific to the block type. The schema depends on the block type.

        Additional details specific to the block type. The schema depends on the block type.

        Specified by:
        details in interface Block.DetailsStage
        Returns:
        Reference to this so that method calls can be chained together.
      • children

        public Block._FinalStage children​(java.util.List<Block> children)

        An array of child blocks. For example, a table block may contain table cell blocks as children when cellBlocksEnabled is set to true.

        Specified by:
        children in interface Block._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • children

        public Block._FinalStage children​(java.util.Optional<java.util.List<Block>> children)

        An array of child blocks. For example, a table block may contain table cell blocks as children when cellBlocksEnabled is set to true.

        Specified by:
        children in interface Block._FinalStage
      • parentBlockId

        public Block._FinalStage parentBlockId​(java.lang.String parentBlockId)

        The ID of the parent block. For example, for a table cell block, this would be the ID of the parent table block. Only set if this is a child block.

        Specified by:
        parentBlockId in interface Block._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • parentBlockId

        public Block._FinalStage parentBlockId​(java.util.Optional<java.lang.String> parentBlockId)

        The ID of the parent block. For example, for a table cell block, this would be the ID of the parent table block. Only set if this is a child block.

        Specified by:
        parentBlockId in interface Block._FinalStage