public class ApertureTransformer extends Object implements Transformer
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 and Description |
|---|
ApertureTransformer()
Extractor Constructor
|
| Modifier and Type | Method and Description |
|---|---|
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
|
public static void main(String[] args)
args - The file you wish to processpublic void init(String jsonString) throws PluginException
init in interface PluginjsonString - of configuration for ExtractorPluginException - if fail to parse the configpublic void init(File jsonFile) throws PluginException
init in interface PluginjsonFile - to retrieve the configuration for ExtractorPluginException - if fail to read the config filepublic static org.semanticdesktop.aperture.rdf.RDFContainer extractRDF(String file, String sourceId) throws IOException, org.semanticdesktop.aperture.extractor.ExtractorException, URISyntaxException
file - The file to be extractedIOExceptionorg.semanticdesktop.aperture.extractor.ExtractorExceptionURISyntaxExceptionpublic static File getFile(String file) throws URISyntaxException
file - URISyntaxExceptionpublic static org.semanticdesktop.aperture.rdf.RDFContainer extractRDF(File file, String sourceId) throws IOException, org.semanticdesktop.aperture.extractor.ExtractorException
file - IOExceptionorg.semanticdesktop.aperture.extractor.ExtractorExceptionpublic static org.semanticdesktop.aperture.rdf.RDFContainer extractRDF(File file, String mimeType, String sourceId) throws IOException, org.semanticdesktop.aperture.extractor.ExtractorException
file - mimeType - IOExceptionorg.semanticdesktop.aperture.extractor.ExtractorExceptionpublic String getId()
public String getName()
public PluginDescription getPluginDetails()
getPluginDetails in interface Pluginpublic void shutdown()
throws PluginException
shutdown in interface PluginPluginExceptionpublic DigitalObject transform(DigitalObject in, String jsonConfig) throws TransformerException
transform in interface TransformerDigitalObject - to be processedTransformerExceptionpublic String stripNonValidXMLCharacters(org.semanticdesktop.aperture.rdf.RDFContainer rdf)
Copyright © 2009-2013. All Rights Reserved.