diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2010-04-09 17:05:34 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2010-04-09 17:05:34 +0000 |
commit | 5ca051ca1208e83a56014545e94bc1b5d4f1f05d (patch) | |
tree | 473c3b5c4e246405338fbfea0161d0456f8380ba | |
parent | 9a00e131fd3f2f97ba9cc80f4b65cb6da6b368b4 (diff) | |
download | xmlgraphics-fop-5ca051ca1208e83a56014545e94bc1b5d4f1f05d.tar.gz xmlgraphics-fop-5ca051ca1208e83a56014545e94bc1b5d4f1f05d.zip |
Now that the creation of event-model.xml has been standardised, the EventModelFactory mechanism is no longer needed. Removed all the factory classes.
Registration through META-INF/services also is no longer necessary.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@932510 13f79535-47bb-0310-9956-ffa450edef68
22 files changed, 42 insertions, 359 deletions
diff --git a/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory b/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory deleted file mode 100644 index 977471a51..000000000 --- a/src/java/META-INF/services/org.apache.fop.events.model.EventModelFactory +++ /dev/null @@ -1,16 +0,0 @@ -org.apache.fop.afp.AFPEventProducer$EventModelFactory -org.apache.fop.render.bitmap.BitmapRendererEventProducer$EventModelFactory -org.apache.fop.render.pcl.PCLEventProducer$EventModelFactory -org.apache.fop.render.pdf.PDFEventProducer$EventModelFactory -org.apache.fop.render.ps.PSEventProducer$EventModelFactory -org.apache.fop.render.rtf.RTFEventProducer$EventModelFactory -org.apache.fop.accessibility.AccessibilityEventProducer$EventModelFactory -org.apache.fop.area.AreaEventProducer$EventModelFactory -org.apache.fop.ResourceEventProducer$EventModelFactory -org.apache.fop.fo.FOValidationEventProducer$EventModelFactory -org.apache.fop.fo.flow.table.TableEventProducer$EventModelFactory -org.apache.fop.layoutmgr.BlockLevelEventProducer$EventModelFactory -org.apache.fop.layoutmgr.inline.InlineLevelEventProducer$EventModelFactory -org.apache.fop.render.RendererEventProducer$EventModelFactory -org.apache.fop.svg.SVGEventProducer$EventModelFactory -org.apache.fop.fonts.FontEventProducer$EventModelFactory diff --git a/src/java/org/apache/fop/ResourceEventProducer.java b/src/java/org/apache/fop/ResourceEventProducer.java index 002a5a2d0..a87b2d0ec 100644 --- a/src/java/org/apache/fop/ResourceEventProducer.java +++ b/src/java/org/apache/fop/ResourceEventProducer.java @@ -30,8 +30,6 @@ import org.apache.xmlgraphics.image.loader.ImageException; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; /** * Event producer interface for resource events (missing images, fonts etc.). @@ -54,16 +52,6 @@ public interface ResourceEventProducer extends EventProducer { } } - /** Event model factory for Accessibility. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * Image not found. * @param source the event source diff --git a/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java b/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java index 3744ca0b4..9a74b7ca8 100644 --- a/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java +++ b/src/java/org/apache/fop/accessibility/AccessibilityEventProducer.java @@ -21,8 +21,6 @@ package org.apache.fop.accessibility; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; /** * Event producer for accessibility-related events. @@ -46,16 +44,6 @@ public interface AccessibilityEventProducer extends EventProducer { } } - /** Event model factory for Accessibility. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * The structure tree is missing in the XML file. * diff --git a/src/java/org/apache/fop/afp/AFPEventProducer.java b/src/java/org/apache/fop/afp/AFPEventProducer.java index b56250fc2..6e6cb529e 100644 --- a/src/java/org/apache/fop/afp/AFPEventProducer.java +++ b/src/java/org/apache/fop/afp/AFPEventProducer.java @@ -21,8 +21,6 @@ package org.apache.fop.afp; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; /** * Event producer interface for AFP-specific events. @@ -43,16 +41,6 @@ public interface AFPEventProducer extends EventProducer { } } - /** Event model factory for AFP. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * Warn about using default font setup. * diff --git a/src/java/org/apache/fop/area/AreaEventProducer.java b/src/java/org/apache/fop/area/AreaEventProducer.java index 69fb8ba24..325367199 100644 --- a/src/java/org/apache/fop/area/AreaEventProducer.java +++ b/src/java/org/apache/fop/area/AreaEventProducer.java @@ -21,8 +21,6 @@ package org.apache.fop.area; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; /** * Event producer interface for events related to the area tree. @@ -45,16 +43,6 @@ public interface AreaEventProducer extends EventProducer { } } - /** Event model factory for Accessibility. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * An unresolved ID reference was encountered. * @param source the event source diff --git a/src/java/org/apache/fop/events/DefaultEventBroadcaster.java b/src/java/org/apache/fop/events/DefaultEventBroadcaster.java index cd415a8d7..596a0a86b 100644 --- a/src/java/org/apache/fop/events/DefaultEventBroadcaster.java +++ b/src/java/org/apache/fop/events/DefaultEventBroadcaster.java @@ -19,18 +19,23 @@ package org.apache.fop.events; +import java.io.InputStream; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.MissingResourceException; -import org.apache.xmlgraphics.util.Service; +import javax.xml.transform.TransformerException; +import javax.xml.transform.stream.StreamSource; + +import org.apache.commons.io.IOUtils; import org.apache.fop.events.model.EventMethodModel; import org.apache.fop.events.model.EventModel; -import org.apache.fop.events.model.EventModelFactory; +import org.apache.fop.events.model.EventModelParser; import org.apache.fop.events.model.EventProducerModel; import org.apache.fop.events.model.EventSeverity; @@ -66,11 +71,27 @@ public class DefaultEventBroadcaster implements EventBroadcaster { private static List/*<EventModel>*/ eventModels = new java.util.ArrayList(); private Map proxies = new java.util.HashMap(); - static { - Iterator iter = Service.providers(EventModelFactory.class, true); - while (iter.hasNext()) { - EventModelFactory factory = (EventModelFactory)iter.next(); - addEventModel(factory.createEventModel()); + /** + * Loads an event model and returns its instance. + * @param resourceBaseClass base class to use for loading resources + * @return the newly loaded event model. + */ + private static EventModel loadModel(Class resourceBaseClass) { + String resourceName = "event-model.xml"; + InputStream in = resourceBaseClass.getResourceAsStream(resourceName); + if (in == null) { + throw new MissingResourceException( + "File " + resourceName + " not found", + DefaultEventBroadcaster.class.getName(), ""); + } + try { + return EventModelParser.parse(new StreamSource(in)); + } catch (TransformerException e) { + throw new MissingResourceException( + "Error reading " + resourceName + ": " + e.getMessage(), + DefaultEventBroadcaster.class.getName(), ""); + } finally { + IOUtils.closeQuietly(in); } } @@ -78,10 +99,23 @@ public class DefaultEventBroadcaster implements EventBroadcaster { * Adds a new {@link EventModel} to the list of registered event models. * @param eventModel the event model instance */ - public static void addEventModel(EventModel eventModel) { + public static synchronized void addEventModel(EventModel eventModel) { eventModels.add(eventModel); } + private static synchronized EventProducerModel getEventProducerModel(Class clazz) { + for (int i = 0, c = eventModels.size(); i < c; i++) { + EventModel eventModel = (EventModel)eventModels.get(i); + EventProducerModel producerModel = eventModel.getProducer(clazz); + if (producerModel != null) { + return producerModel; + } + } + EventModel model = loadModel(clazz); + addEventModel(model); + return model.getProducer(clazz); + } + /** {@inheritDoc} */ public EventProducer getEventProducerFor(Class clazz) { if (!EventProducer.class.isAssignableFrom(clazz)) { @@ -98,17 +132,6 @@ public class DefaultEventBroadcaster implements EventBroadcaster { return producer; } - private EventProducerModel getEventProducerModel(Class clazz) { - for (int i = 0, c = eventModels.size(); i < c; i++) { - EventModel eventModel = (EventModel)eventModels.get(i); - EventProducerModel producerModel = eventModel.getProducer(clazz); - if (producerModel != null) { - return producerModel; - } - } - return null; - } - /** * Creates a dynamic proxy for the given EventProducer interface that will handle the * conversion of the method call into the broadcasting of an event instance. diff --git a/src/java/org/apache/fop/events/model/AbstractEventModelFactory.java b/src/java/org/apache/fop/events/model/AbstractEventModelFactory.java deleted file mode 100644 index fbb8b1550..000000000 --- a/src/java/org/apache/fop/events/model/AbstractEventModelFactory.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* $Id$ */ - -package org.apache.fop.events.model; - -import java.io.InputStream; -import java.util.MissingResourceException; - -import javax.xml.transform.TransformerException; -import javax.xml.transform.stream.StreamSource; - -import org.apache.commons.io.IOUtils; - -import org.apache.fop.events.DefaultEventBroadcaster; - -/** - * This interface is used to instantiate (load, parse) event models. - */ -public abstract class AbstractEventModelFactory implements EventModelFactory { - - /** - * Loads an event model and returns its instance. - * @param resourceBaseClass base class to use for loading resources - * @param resourceName the resource name pointing to the event model to be loaded - * @return the newly loaded event model. - */ - public EventModel loadModel(Class resourceBaseClass, String resourceName) { - InputStream in = resourceBaseClass.getResourceAsStream(resourceName); - if (in == null) { - throw new MissingResourceException( - "File " + resourceName + " not found", - DefaultEventBroadcaster.class.getName(), ""); - } - try { - return EventModelParser.parse(new StreamSource(in)); - } catch (TransformerException e) { - throw new MissingResourceException( - "Error reading " + resourceName + ": " + e.getMessage(), - DefaultEventBroadcaster.class.getName(), ""); - } finally { - IOUtils.closeQuietly(in); - } - } - -} diff --git a/src/java/org/apache/fop/events/model/EventModelFactory.java b/src/java/org/apache/fop/events/model/EventModelFactory.java deleted file mode 100644 index ea5b2cdbb..000000000 --- a/src/java/org/apache/fop/events/model/EventModelFactory.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* $Id$ */ - -package org.apache.fop.events.model; - -/** - * This interface is used to instantiate (load, parse) event models. - */ -public interface EventModelFactory { - - /** - * Creates a new EventModel instance. - * @return the new EventModel instance - */ - EventModel createEventModel(); - -} diff --git a/src/java/org/apache/fop/fo/FOValidationEventProducer.java b/src/java/org/apache/fop/fo/FOValidationEventProducer.java index ae4157f3d..ff005b1b4 100644 --- a/src/java/org/apache/fop/fo/FOValidationEventProducer.java +++ b/src/java/org/apache/fop/fo/FOValidationEventProducer.java @@ -26,8 +26,6 @@ import org.apache.xmlgraphics.util.QName; import org.apache.fop.apps.FOPException; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; import org.apache.fop.fo.expr.PropertyException; /** @@ -53,16 +51,6 @@ public interface FOValidationEventProducer extends EventProducer { } } - /** Event model factory for Accessibility. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * Too many child nodes. * @param source the event source diff --git a/src/java/org/apache/fop/fo/flow/table/TableEventProducer.java b/src/java/org/apache/fop/fo/flow/table/TableEventProducer.java index 5c9f88367..d6abf609e 100644 --- a/src/java/org/apache/fop/fo/flow/table/TableEventProducer.java +++ b/src/java/org/apache/fop/fo/flow/table/TableEventProducer.java @@ -23,8 +23,6 @@ import org.xml.sax.Locator; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; import org.apache.fop.fo.ValidationException; import org.apache.fop.fo.expr.PropertyException; @@ -47,16 +45,6 @@ public interface TableEventProducer extends EventProducer { } } - /** Event model factory for Accessibility. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * A value other than "auto" has been specified on fo:table. * @param source the event source diff --git a/src/java/org/apache/fop/fonts/FontEventProducer.java b/src/java/org/apache/fop/fonts/FontEventProducer.java index 719c598ee..ae4294318 100644 --- a/src/java/org/apache/fop/fonts/FontEventProducer.java +++ b/src/java/org/apache/fop/fonts/FontEventProducer.java @@ -21,8 +21,6 @@ package org.apache.fop.fonts; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; /** * Event producer for fonts-related events. @@ -46,16 +44,6 @@ public interface FontEventProducer extends EventProducer { } } - /** Event model factory for Accessibility. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * Notifies about a font being substituted as the requested one isn't available. * @param source the event source diff --git a/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java b/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java index ea81d0686..7d3964181 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java +++ b/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java @@ -23,8 +23,6 @@ import org.xml.sax.Locator; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; import org.apache.fop.fo.pagination.PageProductionException; /** @@ -50,16 +48,6 @@ public interface BlockLevelEventProducer extends EventProducer { } } - /** Event model factory for Accessibility. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * The contents of a table-row are too big to fit in the constraints. * @param source the event source diff --git a/src/java/org/apache/fop/layoutmgr/inline/InlineLevelEventProducer.java b/src/java/org/apache/fop/layoutmgr/inline/InlineLevelEventProducer.java index 88e8d7b04..c9c65e769 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/InlineLevelEventProducer.java +++ b/src/java/org/apache/fop/layoutmgr/inline/InlineLevelEventProducer.java @@ -23,8 +23,6 @@ import org.xml.sax.Locator; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; /** * Event producer interface for inline-level layout managers. @@ -47,16 +45,6 @@ public interface InlineLevelEventProducer extends EventProducer { } } - /** Event model factory for Accessibility. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * fo:leader with "use-content" but without children. * @param source the event source diff --git a/src/java/org/apache/fop/render/RendererEventProducer.java b/src/java/org/apache/fop/render/RendererEventProducer.java index 3eb85be81..c61e4a8ee 100644 --- a/src/java/org/apache/fop/render/RendererEventProducer.java +++ b/src/java/org/apache/fop/render/RendererEventProducer.java @@ -23,8 +23,6 @@ import java.io.IOException; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; /** * Event producer interface for rendering-specific events. @@ -45,16 +43,6 @@ public interface RendererEventProducer extends EventProducer { } } - /** Event model factory for Accessibility. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * I/O error while writing target file. * @param source the event source diff --git a/src/java/org/apache/fop/render/bitmap/BitmapRendererEventProducer.java b/src/java/org/apache/fop/render/bitmap/BitmapRendererEventProducer.java index 6688e40ea..0808a7ac9 100644 --- a/src/java/org/apache/fop/render/bitmap/BitmapRendererEventProducer.java +++ b/src/java/org/apache/fop/render/bitmap/BitmapRendererEventProducer.java @@ -23,8 +23,6 @@ import java.io.IOException; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; /** * Event producer interface for events generated by the bitmap renderers. @@ -45,16 +43,6 @@ public interface BitmapRendererEventProducer extends EventProducer { } } - /** Event model factory for this event producer. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * No filename information available. Stopping early after the first page. * @param source the event source diff --git a/src/java/org/apache/fop/render/pcl/PCLEventProducer.java b/src/java/org/apache/fop/render/pcl/PCLEventProducer.java index 3e95bd4f9..8afe0bb94 100644 --- a/src/java/org/apache/fop/render/pcl/PCLEventProducer.java +++ b/src/java/org/apache/fop/render/pcl/PCLEventProducer.java @@ -21,8 +21,6 @@ package org.apache.fop.render.pcl; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; /** * Event producer interface for events generated by the PCL renderer. @@ -43,16 +41,6 @@ public interface PCLEventProducer extends EventProducer { } } - /** Event model factory for this event producer. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * Paper type could not be determined. Falling back to another. * @param source the event source diff --git a/src/java/org/apache/fop/render/pdf/PDFEventProducer.java b/src/java/org/apache/fop/render/pdf/PDFEventProducer.java index 4d1b3a42b..1e1ddf98a 100644 --- a/src/java/org/apache/fop/render/pdf/PDFEventProducer.java +++ b/src/java/org/apache/fop/render/pdf/PDFEventProducer.java @@ -21,8 +21,6 @@ package org.apache.fop.render.pdf; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; /** * Event producer interface for events generated by the PDF renderer. @@ -48,16 +46,6 @@ public interface PDFEventProducer extends EventProducer { } } - /** Event model factory for this event producer. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * Some link targets haven't been fully resolved. * @param source the event source diff --git a/src/java/org/apache/fop/render/ps/PSEventProducer.java b/src/java/org/apache/fop/render/ps/PSEventProducer.java index c7c621e78..f04205e1c 100644 --- a/src/java/org/apache/fop/render/ps/PSEventProducer.java +++ b/src/java/org/apache/fop/render/ps/PSEventProducer.java @@ -21,8 +21,6 @@ package org.apache.fop.render.ps; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; /** * Event producer interface for events generated by the PostScript renderer. @@ -43,16 +41,6 @@ public interface PSEventProducer extends EventProducer { } } - /** Event model factory for this event producer. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * A PostScript dictionary could not be parsed. * @param source the event source diff --git a/src/java/org/apache/fop/render/rtf/RTFEventProducer.java b/src/java/org/apache/fop/render/rtf/RTFEventProducer.java index 69058501f..b2b47d7f2 100644 --- a/src/java/org/apache/fop/render/rtf/RTFEventProducer.java +++ b/src/java/org/apache/fop/render/rtf/RTFEventProducer.java @@ -23,8 +23,6 @@ import org.xml.sax.Locator; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; import org.apache.fop.fo.FONode; /** @@ -46,16 +44,6 @@ public interface RTFEventProducer extends EventProducer { } } - /** Event model factory for this event producer. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * The RTF handler only supports simple-page-masters. * @param source the event source diff --git a/src/java/org/apache/fop/svg/SVGEventProducer.java b/src/java/org/apache/fop/svg/SVGEventProducer.java index cdff24a36..27d7da215 100644 --- a/src/java/org/apache/fop/svg/SVGEventProducer.java +++ b/src/java/org/apache/fop/svg/SVGEventProducer.java @@ -21,8 +21,6 @@ package org.apache.fop.svg; import org.apache.fop.events.EventBroadcaster; import org.apache.fop.events.EventProducer; -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; /** * Event producer interface for SVG-related events. @@ -45,16 +43,6 @@ public interface SVGEventProducer extends EventProducer { } } - /** Event model factory for Accessibility. */ - public static class EventModelFactory extends AbstractEventModelFactory { - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), "event-model.xml"); - } - - } - /** * Error during SVG processing. Either message or e must be set. * @param source the event source diff --git a/test/java/META-INF/services/org.apache.fop.events.model.EventModelFactory b/test/java/META-INF/services/org.apache.fop.events.model.EventModelFactory deleted file mode 100644 index a40d5658a..000000000 --- a/test/java/META-INF/services/org.apache.fop.events.model.EventModelFactory +++ /dev/null @@ -1 +0,0 @@ -org.apache.fop.events.FOPTestEventModelFactory
\ No newline at end of file diff --git a/test/java/org/apache/fop/events/FOPTestEventModelFactory.java b/test/java/org/apache/fop/events/FOPTestEventModelFactory.java deleted file mode 100644 index 244cd5fec..000000000 --- a/test/java/org/apache/fop/events/FOPTestEventModelFactory.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* $Id$ */ - -package org.apache.fop.events; - -import org.apache.fop.events.model.AbstractEventModelFactory; -import org.apache.fop.events.model.EventModel; - -/** - * Factory for FOP's test event model. - */ -public class FOPTestEventModelFactory extends AbstractEventModelFactory { - - private static final String EVENT_MODEL_FILENAME = "event-model.xml"; - - /** {@inheritDoc} */ - public EventModel createEventModel() { - return loadModel(getClass(), EVENT_MODEL_FILENAME); - } - -} |