java.lang.Object
org.apache.batik.test.AbstractTest
org.apache.batik.apps.rasterizer.AbstractConfigTest
org.apache.batik.apps.rasterizer.TranscoderConfigTest
- All Implemented Interfaces:
- SVGConverterController, org.apache.batik.test.Test
- class TranscoderConfigTest
- extends AbstractConfigTest
Provides a simple string constructor which allows the user to
create a given test to check that a specific transcoder class is
used for a given mime type.
| Methods inherited from class org.apache.batik.test.AbstractTest |
assertEquals, assertEquals, assertNull, assertTrue, error, getId, getParent, getQualifiedId, reportError, reportException, reportSuccess, run, runImplBasic, setId, setName, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SOURCE_FILE
static final java.lang.String SOURCE_FILE
- See Also:
- Constant Field Values
DEST_FILE_NAME
static final java.lang.String DEST_FILE_NAME
- See Also:
- Constant Field Values
dstType
protected DestinationType dstType
ERROR_NO_COMPUTED_TASK
public static final java.lang.String ERROR_NO_COMPUTED_TASK
- The 'proceedWithComputedTask' handler was not called
- See Also:
- Constant Field Values
ERROR_UNEXPECTED_TRANSCODER_CLASS
public static final java.lang.String ERROR_UNEXPECTED_TRANSCODER_CLASS
- The transcoderClass is not the one expected.
- See Also:
- Constant Field Values
ENTRY_KEY_EXPECTED_TRANSCODER_CLASS
public static final java.lang.String ENTRY_KEY_EXPECTED_TRANSCODER_CLASS
- See Also:
- Constant Field Values
ENTRY_KEY_COMPUTED_TRANSCODER_CLASS
public static final java.lang.String ENTRY_KEY_COMPUTED_TRANSCODER_CLASS
- See Also:
- Constant Field Values
ERROR_UNEXPECTED_NUMBER_OF_HINTS
public static final java.lang.String ERROR_UNEXPECTED_NUMBER_OF_HINTS
- Error if the hints do not match
- See Also:
- Constant Field Values
ENTRY_KEY_EXPECTED_NUMBER_OF_HINTS
public static final java.lang.String ENTRY_KEY_EXPECTED_NUMBER_OF_HINTS
- See Also:
- Constant Field Values
ENTRY_KEY_COMPUTED_NUMBER_OF_HINTS
public static final java.lang.String ENTRY_KEY_COMPUTED_NUMBER_OF_HINTS
- See Also:
- Constant Field Values
ENTRY_KEY_EXPECTED_HINTS
public static final java.lang.String ENTRY_KEY_EXPECTED_HINTS
- See Also:
- Constant Field Values
ENTRY_KEY_COMPUTED_HINTS
public static final java.lang.String ENTRY_KEY_COMPUTED_HINTS
- See Also:
- Constant Field Values
ERROR_UNEXPECTED_TRANSCODING_HINT
public static final java.lang.String ERROR_UNEXPECTED_TRANSCODING_HINT
- See Also:
- Constant Field Values
ENTRY_KEY_EXPECTED_HINT_KEY
public static final java.lang.String ENTRY_KEY_EXPECTED_HINT_KEY
- See Also:
- Constant Field Values
ENTRY_KEY_COMPUTED_HINT_VALUE
public static final java.lang.String ENTRY_KEY_COMPUTED_HINT_VALUE
- See Also:
- Constant Field Values
ENTRY_KEY_EXPECTED_HINT_VALUE
public static final java.lang.String ENTRY_KEY_EXPECTED_HINT_VALUE
- See Also:
- Constant Field Values
ERROR_UNEXPECTED_SOURCES_LIST
public static final java.lang.String ERROR_UNEXPECTED_SOURCES_LIST
- Error if the sources do not match
- See Also:
- Constant Field Values
ENTRY_KEY_EXPECTED_NUMBER_OF_SOURCES
public static final java.lang.String ENTRY_KEY_EXPECTED_NUMBER_OF_SOURCES
- See Also:
- Constant Field Values
ENTRY_KEY_COMPUTED_NUMBER_OF_SOURCES
public static final java.lang.String ENTRY_KEY_COMPUTED_NUMBER_OF_SOURCES
- See Also:
- Constant Field Values
ENTRY_KEY_EXPECTED_SOURCE_AT_INDEX
public static final java.lang.String ENTRY_KEY_EXPECTED_SOURCE_AT_INDEX
- See Also:
- Constant Field Values
ENTRY_KEY_COMPUTED_SOURCE_AT_INDEX
public static final java.lang.String ENTRY_KEY_COMPUTED_SOURCE_AT_INDEX
- See Also:
- Constant Field Values
ENTRY_KEY_COMPUTED_SOURCES_LIST
public static final java.lang.String ENTRY_KEY_COMPUTED_SOURCES_LIST
- See Also:
- Constant Field Values
ENTRY_KEY_EXPECTED_SOURCES_LIST
public static final java.lang.String ENTRY_KEY_EXPECTED_SOURCES_LIST
- See Also:
- Constant Field Values
ERROR_UNEXPECTED_DEST_LIST
public static final java.lang.String ERROR_UNEXPECTED_DEST_LIST
- Error if the dest do not match
- See Also:
- Constant Field Values
ENTRY_KEY_EXPECTED_NUMBER_OF_DEST
public static final java.lang.String ENTRY_KEY_EXPECTED_NUMBER_OF_DEST
- See Also:
- Constant Field Values
ENTRY_KEY_COMPUTED_NUMBER_OF_DEST
public static final java.lang.String ENTRY_KEY_COMPUTED_NUMBER_OF_DEST
- See Also:
- Constant Field Values
ENTRY_KEY_EXPECTED_DEST_AT_INDEX
public static final java.lang.String ENTRY_KEY_EXPECTED_DEST_AT_INDEX
- See Also:
- Constant Field Values
ENTRY_KEY_COMPUTED_DEST_AT_INDEX
public static final java.lang.String ENTRY_KEY_COMPUTED_DEST_AT_INDEX
- See Also:
- Constant Field Values
ENTRY_KEY_COMPUTED_DEST_LIST
public static final java.lang.String ENTRY_KEY_COMPUTED_DEST_LIST
- See Also:
- Constant Field Values
ENTRY_KEY_EXPECTED_DEST_LIST
public static final java.lang.String ENTRY_KEY_EXPECTED_DEST_LIST
- See Also:
- Constant Field Values
expectedConfig
protected AbstractConfigTest.Config expectedConfig
computedConfig
protected AbstractConfigTest.Config computedConfig
TranscoderConfigTest
public TranscoderConfigTest(DestinationType dstType,
java.lang.Class expectedTranscoderClass)
configure
public void configure(SVGConverter c)
- Configures the test with the given mime type
- Specified by:
configure in class AbstractConfigTest
setExpectedConfig
protected void setExpectedConfig(AbstractConfigTest.Config expectedConfig)
makeSourceList
protected java.lang.String makeSourceList(java.util.Vector v)
makeHintsString
protected java.lang.String makeHintsString(java.util.HashMap map)
getName
public java.lang.String getName()
- Description copied from class:
org.apache.batik.test.AbstractTest
- Returns this Test's name.
- Specified by:
getName in interface org.apache.batik.test.Test
runImpl
public org.apache.batik.test.TestReport runImpl()
throws java.lang.Exception
- Description copied from class:
org.apache.batik.test.AbstractTest
- Subclasses should implement this method with the content of
the test case. Typically, implementations will choose to
catch and process all exceptions and error conditions they
are looking for in the code they exercise but will let
exceptions due to their own processing propagate.
proceedWithComputedTask
public boolean proceedWithComputedTask(org.apache.batik.transcoder.Transcoder transcoder,
java.util.Map hints,
java.util.Vector sources,
java.util.Vector dest)
- Description copied from interface:
SVGConverterController
- Invoked when the rasterizer has computed the
exact description of what it should do. The controller
should return true if the transcoding process should
proceed or false otherwise.
- Specified by:
proceedWithComputedTask in interface SVGConverterController
proceedWithSourceTranscoding
public boolean proceedWithSourceTranscoding(SVGConverterSource source,
java.io.File dest)
- Description copied from interface:
SVGConverterController
- Invoked when the rasterizer is about to start transcoding
of a given source.
The controller should return true if the source should be
transcoded and false otherwise.
- Specified by:
proceedWithSourceTranscoding in interface SVGConverterController
proceedOnSourceTranscodingFailure
public boolean proceedOnSourceTranscodingFailure(SVGConverterSource source,
java.io.File dest,
java.lang.String errorCode)
- Description copied from interface:
SVGConverterController
- Invoked when the rasterizer got an error while
transcoding the input source.
The controller should return true if the transcoding process
should continue on other sources and it should return false
if it should not.
- Specified by:
proceedOnSourceTranscodingFailure in interface SVGConverterController
onSourceTranscodingSuccess
public void onSourceTranscodingSuccess(SVGConverterSource source,
java.io.File dest)
- Description copied from interface:
SVGConverterController
- Invoked when the rasterizer successfully transcoded
the input source.
- Specified by:
onSourceTranscodingSuccess in interface SVGConverterController