Package org.apache.fop.accessibility
Class StructureTree2SAXEventAdapter
- java.lang.Object
-
- org.apache.fop.accessibility.StructureTree2SAXEventAdapter
-
- All Implemented Interfaces:
StructureTreeEventHandler
public final class StructureTree2SAXEventAdapter extends java.lang.Object implements StructureTreeEventHandler
Converts structure tree events to SAX events.
-
-
Field Summary
Fields Modifier and Type Field Description private org.xml.sax.ContentHandler
contentHandler
-
Constructor Summary
Constructors Modifier Constructor Description private
StructureTree2SAXEventAdapter(org.xml.sax.ContentHandler currentContentHandler)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endNode(java.lang.String name)
Ends a structure tree node.void
endPageSequence()
Ends a page sequence structure tree node.static StructureTreeEventHandler
newInstance(org.xml.sax.ContentHandler contentHandler)
Factory method that creates a new instance.StructureTreeElement
startImageNode(java.lang.String name, org.xml.sax.Attributes attributes, StructureTreeElement parent)
Starts an image node.StructureTreeElement
startNode(java.lang.String name, org.xml.sax.Attributes attributes, StructureTreeElement parent)
Starts a structure tree node.void
startPageSequence(java.util.Locale locale, java.lang.String role)
Starts a page sequence structure tree node.StructureTreeElement
startReferencedNode(java.lang.String name, org.xml.sax.Attributes attributes, StructureTreeElement parent)
Starts a node that can be referenced by other nodes.
-
-
-
Method Detail
-
newInstance
public static StructureTreeEventHandler newInstance(org.xml.sax.ContentHandler contentHandler)
Factory method that creates a new instance.- Parameters:
contentHandler
- The handler that receives SAX events- Returns:
- -
-
startPageSequence
public void startPageSequence(java.util.Locale locale, java.lang.String role)
Starts a page sequence structure tree node.- Specified by:
startPageSequence
in 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:
endPageSequence
in interfaceStructureTreeEventHandler
-
startNode
public StructureTreeElement startNode(java.lang.String name, org.xml.sax.Attributes attributes, StructureTreeElement parent)
Starts a structure tree node.- Specified by:
startNode
in 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
public void endNode(java.lang.String name)
Ends a structure tree node.- Specified by:
endNode
in interfaceStructureTreeEventHandler
- Parameters:
name
- the name of the structure tree node
-
startImageNode
public StructureTreeElement startImageNode(java.lang.String name, org.xml.sax.Attributes attributes, StructureTreeElement parent)
Starts an image node.- Specified by:
startImageNode
in 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(java.lang.String name, org.xml.sax.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:
startReferencedNode
in 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
-
-