public abstract class AbstractExtensionFactory extends java.lang.Object implements ExtensionFactory
Provides a base implementation for ExtensionFactory instances. By extending this, specific extension factories need only to associate a QName with an implementation class, e.g.,
public class MyExtensionFactory extends AbstractExtensionFactory { private String NS = "http://example.org/foo/ns"; private QName FOO = new QName(NS, "foo"); public MyExtensionFactory() { super(NS); addImpl(FOO, Foo.class); } } public class Foo extends ElementWrapper { ... }
Modifier and Type | Method and Description |
---|---|
<T extends Element> |
getElementWrapper(Element internal)
Abdera's support for static extensions is based on a simple delegation
model.
|
<T extends Base> |
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
|
public <T extends Element> T getElementWrapper(Element internal)
ExtensionFactory
getElementWrapper
in interface ExtensionFactory
internal
- The Abdera element that needs to be wrappedpublic <T extends Base> java.lang.String getMimeType(T base)
ExtensionFactory
getMimeType
in interface ExtensionFactory
base
- An Abdera objectpublic java.lang.String[] getNamespaces()
ExtensionFactory
getNamespaces
in interface ExtensionFactory
public boolean handlesNamespace(java.lang.String namespace)
ExtensionFactory
handlesNamespace
in interface ExtensionFactory
namespace
- The XML namespace of the extensionCopyright © 2010 - 2020 Adobe. All Rights Reserved