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.