diff options
author | Glen Mazza <gmazza@apache.org> | 2003-07-12 21:22:04 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2003-07-12 21:22:04 +0000 |
commit | 0e6c2209be64649074f003d33d049c2420664248 (patch) | |
tree | cd969e91e5af4877ecb9a17c684b15ee84e3726c /examples/plan/src | |
parent | e22802340b91f6c6eb2b9f81d168d59a3ae1c01c (diff) | |
download | xmlgraphics-fop-0e6c2209be64649074f003d33d049c2420664248.tar.gz xmlgraphics-fop-0e6c2209be64649074f003d33d049c2420664248.zip |
Reconfigured ElementMapping from an interface to an abstract base class
Removed FOTreeBuilder references from all ElementMapping subclasses
Simplified FOTreeBuilder ElementMapping instantiation somewhat
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196687 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'examples/plan/src')
-rw-r--r-- | examples/plan/src/org/apache/fop/plan/PlanElementMapping.java | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/examples/plan/src/org/apache/fop/plan/PlanElementMapping.java b/examples/plan/src/org/apache/fop/plan/PlanElementMapping.java index 7a1fecb19..724871edd 100644 --- a/examples/plan/src/org/apache/fop/plan/PlanElementMapping.java +++ b/examples/plan/src/org/apache/fop/plan/PlanElementMapping.java @@ -50,7 +50,6 @@ */ package org.apache.fop.plan; -import org.apache.fop.fo.FOTreeBuilder; import org.apache.fop.fo.FONode; import org.apache.fop.fo.ElementMapping; import org.apache.fop.image.analyser.XMLReader; @@ -62,14 +61,13 @@ import java.util.HashMap; /** * This class provides the element mapping for FOP. */ -public class PlanElementMapping implements ElementMapping { +public class PlanElementMapping extends ElementMapping { - /** The namespace for the plan extension */ - public static final String URI = "http://xml.apache.org/fop/plan"; - - private static HashMap foObjs = null; + public PlanElementMapping() { + URI = "http://xml.apache.org/fop/plan"; + } - private static synchronized void setupPlan() { + protected void initialize() { if (foObjs == null) { foObjs = new java.util.HashMap(); foObjs.put("plan", new PE()); @@ -79,14 +77,6 @@ public class PlanElementMapping implements ElementMapping { } } - /** - * @see org.apache.fop.fo.ElementMapping#addToBuilder(FOTreeBuilder) - */ - public void addToBuilder(FOTreeBuilder builder) { - setupPlan(); - builder.addMapping(URI, foObjs); - } - static class PlanMaker extends ElementMapping.Maker { public FONode make(FONode parent) { return new PlanObj(parent); |