org.semanticdesktop.aperture.extractor
Interface FileExtractor

All Known Implementing Classes:
AbstractFileExtractor, MP3FileExtractor

public interface FileExtractor

FileExtractors extract information from files. FileExtractors are typically specific for a single MIME type or a number of closely related MIME types. They are used in cases where efficient metadata extraction is difficult or impossible to implement with an InputStream.


Method Summary
 void extract(URI id, File file, Charset charset, String mimeType, RDFContainer result)
          Extracts full-text and metadata from the specified file and stores the extracted information as RDF statements in the specified RDFContainer.
 

Method Detail

extract

void extract(URI id,
             File file,
             Charset charset,
             String mimeType,
             RDFContainer result)
             throws ExtractorException
Extracts full-text and metadata from the specified file and stores the extracted information as RDF statements in the specified RDFContainer. The optionally specified Charset and MIME type can be used to direct how the stream should be parsed.

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 extracted
charset - 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.


Copyright © 2010 Aperture Development Team. All Rights Reserved.