org.apache.fop.fo
Class ElementMappingRegistry
java.lang.Object
org.apache.fop.fo.ElementMappingRegistry
public class ElementMappingRegistry
extends java.lang.Object
This class keeps track of all configured ElementMapping implementations which are responsible
for properly handling all kinds of different XML namespaces.
protected Map | fobjTable - Table mapping element names to the makers of objects
representing formatting objects.
|
protected Log | log - logging instance
|
protected Map | namespaces - Map of mapped namespaces and their associated ElementMapping instances.
|
fobjTable
protected Map fobjTable
Table mapping element names to the makers of objects
representing formatting objects.
log
protected Log log
logging instance
namespaces
protected Map namespaces
Map of mapped namespaces and their associated ElementMapping instances.
ElementMappingRegistry
public ElementMappingRegistry(FopFactory factory)
Main constructor. Adds all default element mapping as well as detects ElementMapping
through the Service discovery.
factory
- the Fop Factory
addElementMapping
public void addElementMapping(String mappingClassName)
throws IllegalArgumentException
Add the element mapping with the given class name.
mappingClassName
- the class name representing the element mapping.
addElementMapping
public void addElementMapping(ElementMapping mapping)
Add the element mapping.
mapping
- the element mapping instance
findFOMaker
public ElementMapping.Maker findFOMaker(String namespaceURI,
String localName,
Locator locator)
throws FOPException
Finds the Maker used to create node objects of a particular type
namespaceURI
- URI for the namespace of the elementlocalName
- name of the Elementlocator
- the Locator instance for context information
- the ElementMapping.Maker that can create an FO object for this element
FOPException
- if a Maker could not be found for a bound namespace.
getDOMImplementationForNamespace
public DOMImplementation getDOMImplementationForNamespace(String namespaceURI)
Tries to determine the DOMImplementation that is used to handled a particular namespace.
The method may return null for namespaces that don't result in a DOM. It is mostly used
in namespaces occurring in foreign objects.
namespaceURI
- the namespace URI
- the handling DOMImplementation, or null if not applicable
getElementMapping
public ElementMapping getElementMapping(String namespaceURI)
Returns an ElementMapping class for a namespace URI if there is one.
namespaceURI
- the namespace URI
- the requested ElementMapping or null, if no ElementMapping for the namespace is
available.
isKnownNamespace
public boolean isKnownNamespace(String namespaceURI)
Indicates whether a namespace is known to FOP.
namespaceURI
- the namespace URI
- true if the namespace is known.
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.