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

void add(ElementFactory ef)
Add an ElementFactory.

Parameters:
ef - the ElementFactory.

get

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

ElementFactory[] getAll()
Get all ElementFactories.

Returns:
an array of all registered ElementFactory instances.


Generated on 10:38:35 AM April 14, 2011, © 1996-2010 Cafésoft LLC. All rights reserved.