Class Block


  • public final class Block
    extends java.lang.Object
    • Method Detail

      • getObject

        public java.lang.String getObject()
        Returns:
        The type of object. In this case, it will always be "block".
      • getId

        public java.lang.String getId()
        Returns:
        A unique identifier for the block, deterministically generated as a hash of the block content.
      • getParentBlockId

        public java.util.Optional<java.lang.String> getParentBlockId()
        Returns:
        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.
      • getType

        public BlockType getType()
        Returns:
        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
      • getContent

        public java.lang.String getContent()
        Returns:
        The textual content of the block formatted based on the target format.
      • getDetails

        public BlockDetails getDetails()
        Returns:
        Additional details specific to the block type. The schema depends on the block type.
      • getMetadata

        public BlockMetadata getMetadata()
        Returns:
        Metadata about the block.
      • getPolygon

        public java.util.List<BlockPolygonItem> getPolygon()
        Returns:
        An array of points defining the polygon that bounds the block.
      • getBoundingBox

        public BoundingBox getBoundingBox()
        Returns:
        A simplified bounding box for the block.
      • getChildren

        public java.util.Optional<java.util.List<Block>> getChildren()
        Returns:
        An array of child blocks. For example, a table block may contain table cell blocks as children when cellBlocksEnabled is set to true.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • getAdditionalProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getAdditionalProperties()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object