be.re.repo
Interface PreviewExtract


public interface PreviewExtract

The interface for external modules to extract the preview from a document. Such modules are declared in /configuration/maps.xml using the preview-extract element as in the following example:

 <preview-extract>
   <mime-type>application/epub+zip</mime-type>
   <class><name>be.re.repo.mod.PreviewExtractEPub</name></class>
 </preview-extract>
 
 

Author:
Werner Donné

Method Summary
 boolean extract(String vcr, String version, InputStream in, OutputStream out, String mimeType, Context context)
          The module should create a preview image of sufficient quality for the system to be able to create three sizes from it: 64 pixels wide for thumbnails, 380 pixels wide for a medium format and 760 pixels wide for a larger preview.
 

Method Detail

extract

boolean extract(String vcr,
                String version,
                InputStream in,
                OutputStream out,
                String mimeType,
                Context context)
                throws IOException
The module should create a preview image of sufficient quality for the system to be able to create three sizes from it: 64 pixels wide for thumbnails, 380 pixels wide for a medium format and 760 pixels wide for a larger preview.

Parameters:
vcr - the local path of the resource.
version - the version path of the resource.
in - the inputstream for the document.
out - the outputstream into which the generated image should be written.
mimeType - the MIME type of the document.
context - the repository context.
Returns:
true if an image could be created, false otherwise.
Throws:
IOException