Package org.apache.fop.events.model
Class EventModel
java.lang.Object
org.apache.fop.events.model.EventModel
- All Implemented Interfaces:
Serializable
,org.apache.xmlgraphics.util.XMLizable
public class EventModel
extends Object
implements Serializable, org.apache.xmlgraphics.util.XMLizable
Represents a whole event model that supports multiple event producers.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProducer
(EventProducerModel producer) Adds the model of an event producer to the event model.getProducer
(Class clazz) Returns the model of an event producer with the given interface.getProducer
(String interfaceName) Returns the model of an event producer with the given interface name.Returns an iterator over the contained event producer models.void
Saves this event model to an XML file.void
toSAX
(ContentHandler handler) private void
writeXMLizable
(org.apache.xmlgraphics.util.XMLizable object, File outputFile)
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
producers
-
-
Constructor Details
-
EventModel
public EventModel()Creates a new, empty event model
-
-
Method Details
-
addProducer
Adds the model of an event producer to the event model.- Parameters:
producer
- the event producer model
-
getProducers
Returns an iterator over the contained event producer models.- Returns:
- an iterator (Iterator<EventProducerModel>)
-
getProducer
Returns the model of an event producer with the given interface name.- Parameters:
interfaceName
- the fully qualified name of the event producer- Returns:
- the model instance for the event producer (or null if it wasn't found)
-
getProducer
Returns the model of an event producer with the given interface.- Parameters:
clazz
- the interface of the event producer- Returns:
- the model instance for the event producer (or null if it wasn't found)
-
toSAX
- Specified by:
toSAX
in interfaceorg.apache.xmlgraphics.util.XMLizable
- Throws:
SAXException
-
writeXMLizable
private void writeXMLizable(org.apache.xmlgraphics.util.XMLizable object, File outputFile) throws IOException - Throws:
IOException
-
saveToXML
Saves this event model to an XML file.- Parameters:
modelFile
- the target file- Throws:
IOException
- if an I/O error occurs
-