org.apache.abdera.util
Class AbstractExtensionFactory

java.lang.Object
  extended by org.apache.abdera.util.AbstractExtensionFactory
All Implemented Interfaces:
ExtensionFactory
Direct Known Subclasses:
ErrorExtensionFactory

public abstract class AbstractExtensionFactory
extends java.lang.Object
implements ExtensionFactory


Constructor Summary
protected AbstractExtensionFactory(java.lang.String... namespaces)
           
 
Method Summary
protected  void addImpl(javax.xml.namespace.QName qname, java.lang.Class<? extends ElementWrapper> impl)
           
protected  void addMimeType(javax.xml.namespace.QName qname, java.lang.String mimetype)
           
<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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractExtensionFactory

protected AbstractExtensionFactory(java.lang.String... namespaces)
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

addMimeType

protected void addMimeType(javax.xml.namespace.QName qname,
                           java.lang.String mimetype)

addImpl

protected void addImpl(javax.xml.namespace.QName qname,
                       java.lang.Class<? extends ElementWrapper> impl)

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

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