|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.googlecode.fascinator.transformer.ice2.Ice2Transformer
public class Ice2Transformer
This plugin uses Integrated Content Environment (ICE) conversion services to get the rendition version of a file.
Standard configuration table:
| Option | Description | Required | Default |
|---|---|---|---|
| id | Transformer Id | Yes | ice2 |
| url | Address of where the ICE service located | Yes | http://ice-service.usq.edu.au/api/convert/ |
| outputPath | Path where the aperture will store the temporary files | Yes | ${java.io.tmpdir}/${user.name}/ice2-output |
| excludeRenditionExt | The list of renditions to be excluded | No | txt,mp3,m4a,mov,mp4,wav,wma,wmv,mpg,flv |
| priority | TPriority of ICE transformer | No | true |
Customise configuration for resizing the image for both thumbnail and preview
| Option | Description | Required | Default |
|---|---|---|---|
| resize/thumbnail/option | Resizing option, possible mode: fixedWidth and ratio | Yes | fixedWidth |
| resize/thumbnail/ratio | Image will be resized based on provided ratio if ratio mode is selected | Yes | -90 |
| resize/thumbnail/fixedWidth | Image will be resized based on the width if fixedWidth mode is selected | Yes | 160 |
| resize/thumbnail/enlarge | keep image size if image width is less than the fixedWidth value | Yes | false |
| resize/preview/option | Resizing option, possible mode: fixedWidth and ratio | Yes | fixedWidth |
| resize/preview/ratio | Image will be resized based on provided ratio if ratio mode is selected | Yes | -90 |
| resize/preview/fixedWidth | Image will be resized based on the width if fixedWidth mode is selected | 600 | 160 |
| resize/preview/enlarge | keep image size if image width is less than the fixedWidth value | Yes | false |
For further information about Image resizing service provided by ICE, please refer to https ://ice.usq.edu.au/trac/wiki/ICEService/ResizeImage
"ice2": {
"id": "ice2",
"url": "http://ice-service.usq.edu.au/api/convert/",
"outputPath": "${java.io.tmpdir}/${user.name}/ice2-output",
"excludeRenditionExt": "txt,mp3,m4a,mov,mp4,wav,wma,wmv,mpg,flv",
"priority": "true",
"resize": {
"thumbnail": {
"option": "fixedWidth",
"ratio": "-90",
"fixedWidth": "160",
"enlarge": "false"
},
"preview": {
"option": "fixedWidth",
"ratio": "-90",
"fixedWidth": "600",
"enlarge": "false"
}
}
}
https://fascinator.usq.edu.au/trac/wiki/Fascinator/Documents/Plugins/ Transformer/ICE2
| Constructor Summary | |
|---|---|
Ice2Transformer()
ICE transformer constructor |
|
| Method Summary | |
|---|---|
DigitalObject |
createErrorPayload(DigitalObject object,
String file,
Exception ex)
Create Payload method for ICE Error |
DigitalObject |
createIcePayload(DigitalObject object,
File file)
Create Payload method for ICE rendition files |
String |
getId()
Get Transformer ID |
String |
getName()
Get Transformer Name |
PluginDescription |
getPluginDetails()
Gets a PluginDescription object relating to this plugin. |
void |
init(File jsonFile)
Init method to initialise ICE transformer |
void |
init(String jsonString)
Init method to initialise ICE transformer |
void |
shutdown()
Shut down the transformer plugin |
DigitalObject |
transform(DigitalObject object,
String jsonConfig)
Transform method |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Ice2Transformer()
| Method Detail |
|---|
public void init(File jsonFile)
throws PluginException
init in interface PluginjsonFile -
IOException
PluginException
public void init(String jsonString)
throws PluginException
init in interface PluginjsonString -
IOException
PluginException
public DigitalObject transform(DigitalObject object,
String jsonConfig)
throws TransformerException
transform in interface Transformerobject - : DigitalObject to be transformed
TransformerException
StorageException
UnsupportedEncodingException
IOException
public DigitalObject createErrorPayload(DigitalObject object,
String file,
Exception ex)
throws StorageException,
UnsupportedEncodingException
object - : DigitalObject that store the payloadfile - : File to be stored as payloadmessage - : Error message
StorageException
UnsupportedEncodingException
public DigitalObject createIcePayload(DigitalObject object,
File file)
throws StorageException,
IOException,
Exception
object - : DigitalObject that store the payloadfile - : File to be stored as payload
StorageException
IOException
Exceptionpublic String getId()
getId in interface Pluginpublic String getName()
getName in interface Pluginpublic PluginDescription getPluginDetails()
getPluginDetails in interface Plugin
public void shutdown()
throws PluginException
shutdown in interface PluginPluginException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||