org.semanticdesktop.aperture.crawler.mail
Interface DataObjectFactory.PartStreamFactory

All Known Implementing Classes:
AbstractJavaMailCrawler, ImapCrawler, MboxCrawler, MimeSubCrawler
Enclosing class:
DataObjectFactory

public static interface DataObjectFactory.PartStreamFactory

Obtains InputStreams from Part instances.


Method Summary
 MessageDataObject createDataObject(URI dataObjectId, DataSource dataSource, RDFContainer metadata, javax.mail.internet.MimeMessage msg)
          Creates a message data object for the given parameters
 InputStream getPartStream(javax.mail.Part part)
          Returns an input stream with the part content.
 

Method Detail

getPartStream

InputStream getPartStream(javax.mail.Part part)
                          throws javax.mail.MessagingException,
                                 IOException
Returns an input stream with the part content. It's conceptually a wrapper around the Part.getInputStream() method, designed to allow for customization of the returned input stream.

Parameters:
part -
Returns:
an InputStream with the content of the part
Throws:
javax.mail.MessagingException
IOException

createDataObject

MessageDataObject createDataObject(URI dataObjectId,
                                   DataSource dataSource,
                                   RDFContainer metadata,
                                   javax.mail.internet.MimeMessage msg)
                                   throws javax.mail.MessagingException
Creates a message data object for the given parameters

Parameters:
dataObjectId -
dataSource -
metadata -
msg -
executorService -
Returns:
a message data object for the given parameters
Throws:
javax.mail.MessagingException


Copyright © 2010 Aperture Development Team. All Rights Reserved.