cookxml.core.taglibrary
Class MultiNSTagLibrary

java.lang.Object
  extended bycookxml.core.taglibrary.MultiNSTagLibrary
All Implemented Interfaces:
TagLibrary

public class MultiNSTagLibrary
extends Object
implements TagLibrary

This tag library pools several SingleNSTagLibrary together to serve as a single TagLibrary.


Constructor Summary
MultiNSTagLibrary()
           
MultiNSTagLibrary(TagLibrary parentTagLibrary)
           
 
Method Summary
 void addTagLibrary(String ns, SingleNSTagLibrary tagLibrary)
           
 Adder getAdder(String ns, String tag)
          Get the Adder delegate associated with the namespace and tag.
 Converter getConverter(String ns, Class targetClass)
          Get the Converter that converts a string attribute value into the target class.
 Creator getCreator(String ns, String tag)
          Get the Creator object factory associated with the namespace and tag.
 Setter getSetter(String ns, String tag, String attrNS, String attr)
          Get the Setter delegate associated with the namespace and tag.
 SpecialCreator getSpecialCreator()
          Get the SpecialCreator for the TagLibrary.
 SingleNSTagLibrary getTagLibrary(String ns)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiNSTagLibrary

public MultiNSTagLibrary()

MultiNSTagLibrary

public MultiNSTagLibrary(TagLibrary parentTagLibrary)
Method Detail

addTagLibrary

public void addTagLibrary(String ns,
                          SingleNSTagLibrary tagLibrary)

getTagLibrary

public SingleNSTagLibrary getTagLibrary(String ns)

getSpecialCreator

public SpecialCreator getSpecialCreator()
Description copied from interface: TagLibrary
Get the SpecialCreator for the TagLibrary. This function is called only once per DecodeEngine instance.

Most TagLibrary implementations should simply return the parent tag library implementation if it does not handle it for sure. TagLibrary implementations that pool several TagLibraries should pool multiple SpecialCreator instances into one.

Specified by:
getSpecialCreator in interface TagLibrary
Returns:
the creator for the object creation.

getCreator

public Creator getCreator(String ns,
                          String tag)
Description copied from interface: TagLibrary
Get the Creator object factory associated with the namespace and tag.

Specified by:
getCreator in interface TagLibrary
Parameters:
ns - the namespace.
tag - the tag name.
Returns:
the Creator object.

getSetter

public Setter getSetter(String ns,
                        String tag,
                        String attrNS,
                        String attr)
Description copied from interface: TagLibrary
Get the Setter delegate associated with the namespace and tag.

Specified by:
getSetter in interface TagLibrary
Parameters:
ns - the namespace.
tag - the tag name.
attrNS - the attribute namespace.
attr - the attribute name @return the Setter delegate.

getAdder

public Adder getAdder(String ns,
                      String tag)
Description copied from interface: TagLibrary
Get the Adder delegate associated with the namespace and tag.

Specified by:
getAdder in interface TagLibrary
Parameters:
ns - the tag namespace.
tag - the tag name.
Returns:
the Adder delegate.

getConverter

public Converter getConverter(String ns,
                              Class targetClass)
Description copied from interface: TagLibrary
Get the Converter that converts a string attribute value into the target class.

Specified by:
getConverter in interface TagLibrary
Parameters:
ns - the attribute namespace.
targetClass - the target class type.
Returns:
the Converter delegate.