org.apache.abdera.factory
Class ExtensionFactoryMap

java.lang.Object
  extended by org.apache.abdera.factory.ExtensionFactoryMap
All Implemented Interfaces:
ExtensionFactory

public class ExtensionFactoryMap
extends java.lang.Object
implements ExtensionFactory


Constructor Summary
ExtensionFactoryMap(java.util.List<ExtensionFactory> factories)
           
 
Method Summary
 void addFactory(ExtensionFactory factory)
           
<T extends Element>
T
getElementWrapper(Element internal)
          Retrieve an ElementWrapper for the specified Element or return the parameter itself if a wrapper could not be retrieved
<T extends Base>
java.lang.String
getMimeType(T base)
          Retrieve the mime type for the element
 java.lang.String[] getNamespaces()
          Returns the Namespace URIs handled by this Extension Factory
 boolean handlesNamespace(java.lang.String namespace)
          Returns true if this extension factory handles the specified namespace
 java.lang.String[] listExtensionFactories()
           
<T extends Element>
T
newExtensionElement(javax.xml.namespace.QName qname, Base parent, Factory factory)
           
 void setElementWrapper(Element internal, Element wrapper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensionFactoryMap

public ExtensionFactoryMap(java.util.List<ExtensionFactory> factories)
Method Detail

getElementWrapper

public <T extends Element> T getElementWrapper(Element internal)
Description copied from interface: ExtensionFactory
Retrieve an ElementWrapper for the specified Element or return the parameter itself if a wrapper could not be retrieved

Specified by:
getElementWrapper in interface ExtensionFactory

setElementWrapper

public void setElementWrapper(Element internal,
                              Element wrapper)

getNamespaces

public java.lang.String[] getNamespaces()
Description copied from interface: ExtensionFactory
Returns the Namespace URIs handled by this Extension Factory

Specified by:
getNamespaces in interface ExtensionFactory
Returns:
A List of Namespace URIs Supported by this Extension

handlesNamespace

public boolean handlesNamespace(java.lang.String namespace)
Description copied from interface: ExtensionFactory
Returns true if this extension factory handles the specified namespace

Specified by:
handlesNamespace in interface ExtensionFactory

newExtensionElement

public <T extends Element> T newExtensionElement(javax.xml.namespace.QName qname,
                                                 Base parent,
                                                 Factory factory)

addFactory

public void addFactory(ExtensionFactory factory)

getMimeType

public <T extends Base> java.lang.String getMimeType(T base)
Description copied from interface: ExtensionFactory
Retrieve the mime type for the element

Specified by:
getMimeType in interface ExtensionFactory

listExtensionFactories

public java.lang.String[] listExtensionFactories()