Package org.apache.abdera.util
Class AbstractExtensionFactory
java.lang.Object
org.apache.abdera.util.AbstractExtensionFactory
- All Implemented Interfaces:
ExtensionFactory
- Direct Known Subclasses:
MediaExtensionFactory
@Deprecated(since="2021-07-29")
public abstract class AbstractExtensionFactory
extends Object
implements ExtensionFactory
Deprecated.
This API is deprecated as Apache Abdera is a retired project since 2017.
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 { ... }
-
Method Summary
Modifier and TypeMethodDescription<T extends Element>
TgetElementWrapper
(Element internal) Deprecated.Abdera's support for static extensions is based on a simple delegation model.getMimeType
(T base) Deprecated.Retrieve the mime type for the elementString[]
Deprecated.Returns the Namespace URIs handled by this Extension Factoryboolean
handlesNamespace
(String namespace) Deprecated.Returns true if this extension factory handles the specified namespace
-
Method Details
-
getElementWrapper
Deprecated.Description copied from interface:ExtensionFactory
Abdera's support for static extensions is based on a simple delegation model. Static extension interfaces wrap the dynamic extension API. ExtensionFactory's are handed the internal dynamic element instance and are expected to hand back an object wrapper.- Specified by:
getElementWrapper
in interfaceExtensionFactory
- Parameters:
internal
- The Abdera element that needs to be wrapped- Returns:
- The wrapper element
-
getMimeType
Deprecated.Description copied from interface:ExtensionFactory
Retrieve the mime type for the element- Specified by:
getMimeType
in interfaceExtensionFactory
- Parameters:
base
- An Abdera object- Returns:
- A MIME media type for the object
-
getNamespaces
Deprecated.Description copied from interface:ExtensionFactory
Returns the Namespace URIs handled by this Extension Factory- Specified by:
getNamespaces
in interfaceExtensionFactory
- Returns:
- A List of Namespace URIs Supported by this Extension
-
handlesNamespace
Deprecated.Description copied from interface:ExtensionFactory
Returns true if this extension factory handles the specified namespace- Specified by:
handlesNamespace
in interfaceExtensionFactory
- Parameters:
namespace
- The XML namespace of the extension- Returns:
- True if the namespace is supported by the ExtensionFactory
-