Class IFStructureTreeBuilder
java.lang.Object
org.apache.fop.render.intermediate.IFStructureTreeBuilder
- All Implemented Interfaces:
StructureTreeEventHandler
Saves structure tree events as SAX events in order to replay them when it's
time to stream the structure tree to the output.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class(package private) static classA SAX handler that records events to replay them later. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StructureTreeEventHandlerprivate intprivate final List<IFStructureTreeBuilder.SAXEventRecorder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate AttributesImpladdIDAttribute(Attributes attributes, String id) private AttributesImpladdParentAttribute(AttributesImpl attributes, StructureTreeElement parent) voidEnds a structure tree node.voidEnds a page sequence structure tree node.private Stringprivate voidvoidreplayEventsForPageSequence(ContentHandler handler, int pageSequenceIndex) Replay SAX events for a page sequence.voidstartImageNode(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.
-
Field Details
-
delegate
-
pageSequenceEventRecorders
-
retrievedMarkersEventRecorder
-
idCounter
private int idCounter
-
-
Constructor Details
-
IFStructureTreeBuilder
IFStructureTreeBuilder()
-
-
Method Details
-
replayEventsForPageSequence
public void replayEventsForPageSequence(ContentHandler handler, int pageSequenceIndex) throws SAXException Replay SAX events for a page sequence.- Parameters:
handler- The handler that receives SAX eventspageSequenceIndex- The index of the page sequence- Throws:
SAXException
-
replayEventsForRetrievedMarkers
- Throws:
SAXException
-
startPageSequence
Description copied from interface:StructureTreeEventHandlerStarts 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()Description copied from interface:StructureTreeEventHandlerEnds a page sequence structure tree node.- Specified by:
endPageSequencein interfaceStructureTreeEventHandler
-
prepareRetrievedMarkersEventRecorder
private void prepareRetrievedMarkersEventRecorder() -
startNode
public StructureTreeElement startNode(String name, Attributes attributes, StructureTreeElement parent) Description copied from interface:StructureTreeEventHandlerStarts 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
-
addParentAttribute
-
endNode
Description copied from interface:StructureTreeEventHandlerEnds 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) Description copied from interface:StructureTreeEventHandlerStarts 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) Description copied from interface:StructureTreeEventHandlerStarts 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
-
getNextID
-
addIDAttribute
-