org.apache.fop.accessibility

## Interface StructureTreeEventHandler

- All Known Implementing Classes:
    DummyStructureTreeEventHandler, PDFStructureTreeBuilder, StructureTree2SAXEventAdapter

      public interface StructureTreeEventHandler

  Receive notifications relating to the structure tree of an FO document. A structure tree is a reduced version of the document's FO tree, containing only the logical structure that is used by accessible output formats.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `endNode(String name)` Ends a structure tree node.
    `void` | `endPageSequence()` Ends a page sequence structure tree node.
    `StructureTreeElement` | `startImageNode(String name, Attributes attributes, StructureTreeElement parent)` Starts an image node.
    `StructureTreeElement` | `startNode(String name, Attributes attributes, StructureTreeElement parent)` Starts a structure tree node.
    `void` | `startPageSequence(Locale locale, String role)` Starts a page sequence structure tree node.
    `StructureTreeElement` | `startReferencedNode(String name, Attributes attributes, StructureTreeElement parent)` Starts a node that can be referenced by other nodes.

- - ### Method Detail

    - #### startPageSequence

          void startPageSequence(Locale locale,
                                 String role)

      Starts a page sequence structure tree node.
      Parameters:
        `locale` - The locale of the page sequence
        `role` - the value of the role property. May be null.

    - #### startNode

          StructureTreeElement startNode(String name,
                                         Attributes attributes,
                                         StructureTreeElement parent)

      Starts a structure tree node.
      Parameters:
        `name` - the name of the structure tree node
        `attributes` - the node properties
        `parent` - the parent of the node. May be null, in which case the parent node is the node corresponding to the previous call to this method
      Returns:
        the corresponding structure tree element

    - #### endNode

          void endNode(String name)

      Ends a structure tree node.
      Parameters:
        `name` - the name of the structure tree node

    - #### startImageNode

          StructureTreeElement startImageNode(String name,
                                              Attributes attributes,
                                              StructureTreeElement parent)

      Starts an image node.
      Parameters:
        `name` - the name of the structure tree node
        `attributes` - the node properties
        `parent` - the parent of the node. May be null, in which case the parent node is the node corresponding to the previous call to this method
      Returns:
        the corresponding structure tree element

    - #### startReferencedNode

          StructureTreeElement startReferencedNode(String name,
                                                   Attributes attributes,
                                                   StructureTreeElement parent)

      Starts a node that can be referenced by other nodes. This is usually a node that can have Marked Content References as children.
      Parameters:
        `name` - the name of the structure tree node
        `attributes` - the node properties
        `parent` - the parent of the node. May be null, in which case the parent node is the node corresponding to the previous call to this method
      Returns:
        the corresponding structure tree element

    - #### endPageSequence

          void endPageSequence()

      Ends a page sequence structure tree node.

Copyright © 2025 Apache Software Foundation. All rights reserved.