com.cafesoft.core.xml.dom
Interface ElementFactoryRegistry

All Known Implementing Classes:
StandardElementFactoryRegistry

public interface ElementFactoryRegistry

ElementFactoryRegistry defines an interface for a registry of ElementFactory instances. Each ElementFactory is associated with a node within an XML Document Object Model by:

  1. namespace
  2. tag name
and registers a factory class for constructing Object instances associated with an Element hierarchy. This enables an XML document to be extended with new implementations of known interfaces.


Method Summary
 void add(ElementFactory ef)
          Add an ElementFactory.
 ElementFactory get(String nameSpace, String tagName)
          Get an ElementFactory.
 ElementFactory[] getAll()
          Get all ElementFactories.
 

Method Detail

add

public void add(ElementFactory ef)
Add an ElementFactory.

Parameters:
ef - the ElementFactory.

get

public ElementFactory get(String nameSpace,
                          String tagName)
Get an ElementFactory.

Parameters:
nameSpace - the NameSpace (e.g. http://cafesoft.com/goober)
tagName - the Element tag name.
Returns:
the ElementFactory associated with the namespace and tagname (case insensitive) or null if no ElementFactory is registered.

getAll

public ElementFactory[] getAll()
Get all ElementFactories.

Returns:
an array of all registered ElementFactory instances.


Generated on 5:16:42 PM May 12, 2008, © 1996-2005 Cafésoft LLC. All rights reserved.