org.semanticdesktop.aperture.extractor
Class AbstractFileExtractor
java.lang.Object
org.semanticdesktop.aperture.extractor.AbstractFileExtractor
- All Implemented Interfaces:
- FileExtractor
- Direct Known Subclasses:
- MP3FileExtractor
public abstract class AbstractFileExtractor
- extends Object
- implements FileExtractor
A common superclass for all file extractors. Its purpose is to check if a file exists and if it's readable
before the actual extraction can commence.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractFileExtractor
public AbstractFileExtractor()
extract
public void extract(URI id,
File file,
Charset charset,
String mimeType,
RDFContainer result)
throws ExtractorException
- Extracts metadata from a file. This method checks if the file exists and if it's readable before
calling the method that performs the actual extraction.
- Specified by:
extract
in interface FileExtractor
- Parameters:
id
- the URI identifying the object (e.g. a file or web page) from which the file was obtained.
The generated statements should describe this URI. Note that it doesn't have to be
the URI of the file that is passed as the second argument.file
- the File with the content from which metadata is to be extractedcharset
- the charset in which the file is encoded (optional).mimeType
- the MIME type of the file (optional).result
- the container in which this FileExtractor can put the RDF statements it generates
- Throws:
ExtractorException
- in case of any error during the extraction process.- See Also:
FileExtractor.extract(URI, File, Charset, String, RDFContainer)
performExtraction
protected abstract void performExtraction(URI id,
File file,
Charset charset,
String mimeType,
RDFContainer result)
throws ExtractorException
- Throws:
ExtractorException
Copyright © 2010 Aperture Development Team. All Rights Reserved.