diff options
Diffstat (limited to 'examples/plan')
-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); |