Package org.apache.fop.accessibility
Class StructureTree2SAXEventAdapter
java.lang.Object
org.apache.fop.accessibility.StructureTree2SAXEventAdapter
- All Implemented Interfaces:
StructureTreeEventHandler
public final class StructureTree2SAXEventAdapter
extends Object
implements StructureTreeEventHandler
Converts structure tree events to SAX events.
-
Method Summary
Modifier and TypeMethodDescriptionvoidEnds a structure tree node.voidEnds a page sequence structure tree node.static StructureTreeEventHandlernewInstance(ContentHandler contentHandler) Factory method that creates a new instance.startImageNode(String name, Attributes attributes, StructureTreeElement parent) Starts an image node.startNode(String name, Attributes attributes, StructureTreeElement parent) Starts a structure tree node.voidstartPageSequence(Locale locale, String role) Starts a page sequence structure tree node.startReferencedNode(String name, Attributes attributes, StructureTreeElement parent) Starts a node that can be referenced by other nodes.
-
Method Details
-
newInstance
Factory method that creates a new instance.- Parameters:
contentHandler- The handler that receives SAX events- Returns:
- -
-
startPageSequence
Starts a page sequence structure tree node.- Specified by:
startPageSequencein interfaceStructureTreeEventHandler- Parameters:
locale- The locale of the page sequencerole- the value of the role property. May be null.
-
endPageSequence
public void endPageSequence()Ends a page sequence structure tree node.- Specified by:
endPageSequencein interfaceStructureTreeEventHandler
-
startNode
public StructureTreeElement startNode(String name, Attributes attributes, StructureTreeElement parent) Starts a structure tree node.- Specified by:
startNodein interfaceStructureTreeEventHandler- Parameters:
name- the name of the structure tree nodeattributes- the node propertiesparent- 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
Ends a structure tree node.- Specified by:
endNodein interfaceStructureTreeEventHandler- Parameters:
name- the name of the structure tree node
-
startImageNode
public StructureTreeElement startImageNode(String name, Attributes attributes, StructureTreeElement parent) Starts an image node.- Specified by:
startImageNodein interfaceStructureTreeEventHandler- Parameters:
name- the name of the structure tree nodeattributes- the node propertiesparent- 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
public 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.- Specified by:
startReferencedNodein interfaceStructureTreeEventHandler- Parameters:
name- the name of the structure tree nodeattributes- the node propertiesparent- 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
-