com.googlecode.fascinator.transformer.ims
Class ImsTransformer

java.lang.Object
  extended by com.googlecode.fascinator.transformer.ims.ImsTransformer
All Implemented Interfaces:
Plugin, Transformer

public class ImsTransformer
extends Object
implements Transformer

This plugin is used for harvesting IMS packages by relying on imsmanifest.xml file. The content of the file will be unzipped and displayed by using Paquete.

Configuration

Standard configuration table:
Option Description Required Default
id Transformer Id Yes ims

Examples

  1. IMS transformer attached to the transformer list in The Fascinator
          "ims": {
                 "id": "ims"
             }
     

Wiki Link

None

Author:
Ron Ward, Linda Octalina

Constructor Summary
ImsTransformer()
          ImsTransformer constructor
 
Method Summary
 DigitalObject createImsPayload(DigitalObject object, File file)
          Create Payload method for Ims files
 String getFileExt(File fileName)
          Get File extension method
 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 Ims transformer
 void init(String jsonString)
          Init method to initialise Ims transformer
 void shutdown()
          Shut down the transformer plugin
 DigitalObject transform(DigitalObject in, String jsonConfig)
          Transform method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImsTransformer

public ImsTransformer()
ImsTransformer constructor

Method Detail

init

public void init(File jsonFile)
          throws PluginException
Init method to initialise Ims transformer

Specified by:
init in interface Plugin
Parameters:
jsonFile -
Throws:
IOException
PluginException

init

public void init(String jsonString)
          throws PluginException
Init method to initialise Ims transformer

Specified by:
init in interface Plugin
Parameters:
jsonString -
Throws:
IOException
PluginException

transform

public DigitalObject transform(DigitalObject in,
                               String jsonConfig)
                        throws TransformerException
Transform method

Specified by:
transform in interface Transformer
Parameters:
object - : DigitalObject to be transformed
jsonConfig - : String containing configuration for this item
Returns:
DigitalObject The object after being transformed
Throws:
TransformerException

createImsPayload

public DigitalObject createImsPayload(DigitalObject object,
                                      File file)
                               throws StorageException,
                                      IOException
Create Payload method for Ims files

Parameters:
object - : DigitalObject that store the payload
file - : File to be stored as payload
Returns:
transformed DigitalObject
Throws:
StorageException
IOException

getId

public String getId()
Get Transformer ID

Specified by:
getId in interface Plugin
Returns:
id

getName

public String getName()
Get Transformer Name

Specified by:
getName in interface Plugin
Returns:
name

getPluginDetails

public PluginDescription getPluginDetails()
Gets a PluginDescription object relating to this plugin.

Specified by:
getPluginDetails in interface Plugin
Returns:
a PluginDescription

shutdown

public void shutdown()
              throws PluginException
Shut down the transformer plugin

Specified by:
shutdown in interface Plugin
Throws:
PluginException

getFileExt

public String getFileExt(File fileName)
Get File extension method

Parameters:
fileName -
Returns:
file extension


Copyright © 2009-2012. All Rights Reserved.