The ElementMapping list is not necessary since we now have the ElementMappingRegistry. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@389212 13f79535-47bb-0310-9956-ffa450edef68pull/35/head
@@ -108,9 +108,6 @@ public class FopFactory { | |||
/** @see #setBreakIndentInheritanceOnReferenceAreaBoundary(boolean) */ | |||
private boolean breakIndentInheritanceOnReferenceAreaBoundary = false; | |||
/** Additional fo.ElementMapping subclasses set by user */ | |||
private List additionalElementMappings = null; | |||
/** Optional overriding LayoutManagerMaker */ | |||
private LayoutManagerMaker lmMakerOverride = null; | |||
@@ -260,18 +257,7 @@ public class FopFactory { | |||
* @param elementMapping the class name representing the element mapping. | |||
*/ | |||
public void addElementMapping(ElementMapping elementMapping) { | |||
if (additionalElementMappings == null) { | |||
additionalElementMappings = new java.util.ArrayList(); | |||
} | |||
additionalElementMappings.add(elementMapping); | |||
} | |||
/** | |||
* Returns the List of user-added ElementMapping class names | |||
* @return List of Strings holding ElementMapping names. | |||
*/ | |||
public List getAdditionalElementMappings() { | |||
return additionalElementMappings; | |||
this.elementMappingRegistry.addElementMapping(elementMapping); | |||
} | |||
/** |
@@ -59,15 +59,6 @@ public class ElementMappingRegistry { | |||
public ElementMappingRegistry(FopFactory factory) { | |||
// Add standard element mappings | |||
setupDefaultMappings(); | |||
// add additional ElementMappings defined within FOUserAgent | |||
List addlEMs = factory.getAdditionalElementMappings(); | |||
if (addlEMs != null) { | |||
for (int i = 0; i < addlEMs.size(); i++) { | |||
addElementMapping((ElementMapping) addlEMs.get(i)); | |||
} | |||
} | |||
} | |||
/** | |||
@@ -116,7 +107,11 @@ public class ElementMappingRegistry { | |||
} | |||
} | |||
private void addElementMapping(ElementMapping mapping) { | |||
/** | |||
* Add the element mapping. | |||
* @param mapping the element mapping instance | |||
*/ | |||
public void addElementMapping(ElementMapping mapping) { | |||
this.fobjTable.put(mapping.getNamespaceURI(), mapping.getTable()); | |||
this.namespaces.put(mapping.getNamespaceURI().intern(), mapping); | |||
} |