org.semanticdesktop.aperture.extractor.word
Class WordExtractor

java.lang.Object
  extended by org.semanticdesktop.aperture.extractor.word.WordExtractor
All Implemented Interfaces:
Extractor

public class WordExtractor
extends Object
implements Extractor


Constructor Summary
WordExtractor()
           
 
Method Summary
 void extract(URI id, InputStream stream, Charset charset, String mimeType, RDFContainer result)
          Extracts full-text and metadata from the specified binary stream and stores the extracted information as RDF statements in the specified RDFContainer.
 void extract(URI id, InputStream stream, org.apache.poi.poifs.filesystem.POIFSFileSystem fileSystem, Charset charset, String mimeType, RDFContainer result)
          Additional extract method that lets you specify an existing POIFSFileSystem.
static String tryPoiExtraction(org.apache.poi.poifs.filesystem.DirectoryNode dir, org.apache.poi.poifs.filesystem.POIFSFileSystem fs, RDFContainer container)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordExtractor

public WordExtractor()
Method Detail

extract

public void extract(URI id,
                    InputStream stream,
                    Charset charset,
                    String mimeType,
                    RDFContainer result)
             throws ExtractorException
Description copied from interface: Extractor
Extracts full-text and metadata from the specified binary stream 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.

The specified InputStream is expected to already use some kind of buffering so that the Extractors are not required to internally buffer bytes to improve performance.

Specified by:
extract in interface Extractor
Parameters:
id - the URI identifying the object (e.g. a file or web page) from which the stream was obtained. The generated statements should describe this URI.
stream - the InputStream delivering the raw bytes.
charset - the charset in which the inputstream is encoded (optional).
mimeType - the MIME type of the passed stream (optional).
result - the container in which this Extractor can put its created RDF statements.
Throws:
ExtractorException - in case of any error during the extraction process.

extract

public void extract(URI id,
                    InputStream stream,
                    org.apache.poi.poifs.filesystem.POIFSFileSystem fileSystem,
                    Charset charset,
                    String mimeType,
                    RDFContainer result)
             throws ExtractorException
Additional extract method that lets you specify an existing POIFSFileSystem.

Throws:
ExtractorException

tryPoiExtraction

public static String tryPoiExtraction(org.apache.poi.poifs.filesystem.DirectoryNode dir,
                                      org.apache.poi.poifs.filesystem.POIFSFileSystem fs,
                                      RDFContainer container)
                               throws IOException,
                                      org.apache.poi.EncryptedDocumentException
Throws:
IOException
org.apache.poi.EncryptedDocumentException


Copyright © 2010 Aperture Development Team. All Rights Reserved.