org.apache.cocoon.components.transcoder
Class ExtendableTranscoderFactory
java.lang.Object
|
+--org.apache.cocoon.components.transcoder.ExtendableTranscoderFactory
- All Implemented Interfaces:
- TranscoderFactory
- public class ExtendableTranscoderFactory
- extends java.lang.Object
- implements TranscoderFactory
An extendable Batik Transcoder factory.
When given a MIME type, find a Transcoder which supports that MIME
type. This factory is extendable as new Transcoder
s can
be added at runtime.
- Version:
- CVS $Id: ExtendableTranscoderFactory.java,v 1.4 2002/02/22 07:00:14 cziegeler Exp $
- Author:
- Ross Burton
Method Summary |
void |
addTranscoder(java.lang.String mimeType,
java.lang.Class transcoderClass)
Add a mapping from the specified MIME type to a transcoder.
|
org.apache.batik.transcoder.Transcoder |
createTranscoder(java.lang.String mimeType)
Create a transcoder for a specified MIME type. |
static TranscoderFactory |
getTranscoderFactoryImplementation()
Get a reference to this Transcoder Factory. |
void |
removeTranscoder(java.lang.String mimeType)
Remove the mapping from a specified MIME type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
transcoders
protected static java.util.Map transcoders
singleton
protected static final TranscoderFactory singleton
getTranscoderFactoryImplementation
public static final TranscoderFactory getTranscoderFactoryImplementation()
- Get a reference to this Transcoder Factory.
createTranscoder
public org.apache.batik.transcoder.Transcoder createTranscoder(java.lang.String mimeType)
- Create a transcoder for a specified MIME type.
- Specified by:
createTranscoder
in interface TranscoderFactory
- Parameters:
mimeType
- The MIME type of the destination format- Returns:
- A suitable transcoder, or
null
if one cannot be found
addTranscoder
public void addTranscoder(java.lang.String mimeType,
java.lang.Class transcoderClass)
- Add a mapping from the specified MIME type to a transcoder.
Note: The transcoder must have a no-argument constructor.
- Parameters:
mimeType
- The MIME type of the TranscodertranscoderClass
- The Class
object for the Transcoder.
removeTranscoder
public void removeTranscoder(java.lang.String mimeType)
- Remove the mapping from a specified MIME type.
- Parameters:
mimeType
- The MIME type to remove from the mapping.
Copyright � 1999-2002 Apache Software Foundation. All Rights Reserved.