org.apache.abdera.factory
Interface ExtensionFactory

All Known Implementing Classes:
AbstractExtensionFactory, ErrorExtensionFactory, ExtensionFactoryMap

public interface ExtensionFactory

Extension Factories are used to provide a means of dynamically resolving builders for namespaced extension elements

There are four ways of supporting extension elements.

  1. Implement your own Factory (hard)
  2. Subclass the default Axiom-based Factory (also somewhat difficult)
  3. Implement and register an ExtensionFactory (wonderfully simple)
  4. Use the Feed Object Model's dynamic support for extensions (also very simple)

Registering an Extension Factory requires generally nothing more than implementing ExtensionFactory and then creating the file META-INF/services/org.apache.abdera.factory.ExtensionFactory and listing the class names of each ExtensionFactory you wish to register.


Method Summary
<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
 

Method Detail

handlesNamespace

boolean handlesNamespace(java.lang.String namespace)
Returns true if this extension factory handles the specified namespace


getNamespaces

java.lang.String[] getNamespaces()
Returns the Namespace URIs handled by this Extension Factory

Returns:
A List of Namespace URIs Supported by this Extension

getElementWrapper

<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


getMimeType

<T extends Base> java.lang.String getMimeType(T base)
Retrieve the mime type for the element