org.dspace.app.mediafilter
Class MediaFilter
java.lang.Object
org.dspace.app.mediafilter.MediaFilter
- All Implemented Interfaces:
- FormatFilter
- Direct Known Subclasses:
- BrandedPreviewJPEGFilter, HTMLFilter, JPEGFilter, PDFFilter, WordFilter, XPDF2Text, XPDF2Thumbnail
public abstract class MediaFilter
- extends Object
- implements FormatFilter
Abstract class which defines the default settings for a *simple* Media or Format Filter.
This class may be extended by any class which wishes to define a simple filter to be run
by the MediaFilterManager. More complex filters should likely implement the FormatFilter
interface directly, so that they can define their own pre/postProcessing methods.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MediaFilter
public MediaFilter()
preProcessBitstream
public boolean preProcessBitstream(Context c,
Item item,
Bitstream source)
throws Exception
- Perform any pre-processing of the source bitstream *before* the actual
filtering takes place in MediaFilterManager.processBitstream().
Return true if pre-processing is successful (or no pre-processing
is necessary). Return false if bitstream should be skipped
for any reason.
- Specified by:
preProcessBitstream in interface FormatFilter
- Parameters:
c - contextitem - item containing bitstream to processsource - source bitstream to be processed
- Returns:
- true if bitstream processing should continue,
false if this bitstream should be skipped
- Throws:
Exception
postProcessBitstream
public void postProcessBitstream(Context c,
Item item,
Bitstream generatedBitstream)
throws Exception
- Perform any post-processing of the generated bitstream *after* this
filter has already been run.
Return true if pre-processing is successful (or no pre-processing
is necessary). Return false if bitstream should be skipped
for some reason.
- Specified by:
postProcessBitstream in interface FormatFilter
- Parameters:
c - contextitem - item containing bitstream to processgeneratedBitstream - the bitstream which was generated by
this filter.
- Throws:
Exception
Copyright © 2009 The DSpace Foundation. All Rights Reserved.