|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.googlecode.fascinator.transformer.aperture.ApertureTransformer
public class ApertureTransformer
In this plugin Aperture Framework is utilised to extract RDF metadata and full-text from the DigitalObject.
| Option | Description | Required | Default |
|---|---|---|---|
| id | Transformer Id | Yes | aperture |
| outputPath | Path where the aperture will store the temporary files | Yes | ${java.io.tmpdir}/${user.name}/ice2-output |
"aperture": {
"id": "aperture",
"outputPath": "${java.io.tmpdir}/${user.name}/ice2-output"
}
https://fascinator.usq.edu.au/trac/wiki/Fascinator/Documents/Plugins/ Transformer/Aperture
Presently, only local files are accessible.
| Constructor Summary | |
|---|---|
ApertureTransformer()
Extractor Constructor |
|
| Method Summary | |
|---|---|
static org.semanticdesktop.aperture.rdf.RDFContainer |
extractRDF(File file,
String sourceId)
Extracts RDF from the given File object. |
static org.semanticdesktop.aperture.rdf.RDFContainer |
extractRDF(File file,
String mimeType,
String sourceId)
Extracts RDF from the given File object, using the provided MIME Type rather than trying to work it out |
static org.semanticdesktop.aperture.rdf.RDFContainer |
extractRDF(String file,
String sourceId)
Extracts RDF from a file denoted by a String-based descriptor (ie path) |
static File |
getFile(String file)
Utility function to resolve file:// URL's to a Java File object. |
String |
getId()
Overridden method getId |
String |
getName()
Overridden method getName |
PluginDescription |
getPluginDetails()
Gets a PluginDescription object relating to this plugin. |
void |
init(File jsonFile)
Overridden method init to initialize Configuration sample: "transformer": { "conveyer": "aperture-extractor, ice-transformer", "extractor": { "outputPath" : "${user.home}/ice2-output" }, "ice-transformer": { "url": "http://ice-service.usq.edu.au/api/convert/", "outputPath": "${user.home}/ice2-output" } } |
void |
init(String jsonString)
Overridden method init to initialize Configuration sample: "transformer": { "conveyer": "aperture-extractor, ice-transformer", "extractor": { "outputPath" : "${user.home}/ice2-output" }, "ice-transformer": { "url": "http://ice-service.usq.edu.au/api/convert/", "outputPath": "${user.home}/ice2-output" } } |
static void |
main(String[] args)
Testing interface. |
void |
shutdown()
Overridden method shutdown method |
String |
stripNonValidXMLCharacters(org.semanticdesktop.aperture.rdf.RDFContainer rdf)
|
DigitalObject |
transform(DigitalObject in,
String jsonConfig)
Overridden transform method |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ApertureTransformer()
| Method Detail |
|---|
public static void main(String[] args)
args - The file you wish to process
public void init(String jsonString)
throws PluginException
init in interface PluginjsonString - of configuration for Extractor
PluginException - if fail to parse the config
public void init(File jsonFile)
throws PluginException
init in interface PluginjsonFile - to retrieve the configuration for Extractor
PluginException - if fail to read the config file
public static org.semanticdesktop.aperture.rdf.RDFContainer extractRDF(String file,
String sourceId)
throws IOException,
org.semanticdesktop.aperture.extractor.ExtractorException,
URISyntaxException
file - The file to be extracted
IOException
org.semanticdesktop.aperture.extractor.ExtractorException
URISyntaxException
public static File getFile(String file)
throws URISyntaxException
file -
URISyntaxException
public static org.semanticdesktop.aperture.rdf.RDFContainer extractRDF(File file,
String sourceId)
throws IOException,
org.semanticdesktop.aperture.extractor.ExtractorException
file -
IOException
org.semanticdesktop.aperture.extractor.ExtractorException
public static org.semanticdesktop.aperture.rdf.RDFContainer extractRDF(File file,
String mimeType,
String sourceId)
throws IOException,
org.semanticdesktop.aperture.extractor.ExtractorException
file - mimeType -
IOException
org.semanticdesktop.aperture.extractor.ExtractorExceptionpublic 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
public DigitalObject transform(DigitalObject in,
String jsonConfig)
throws TransformerException
transform in interface TransformerDigitalObject - to be processed
TransformerExceptionpublic String stripNonValidXMLCharacters(org.semanticdesktop.aperture.rdf.RDFContainer rdf)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||