SMILA (incubation) API documentation

org.eclipse.smila.connectivity.framework
Interface CrawlerCallback

All Known Implementing Classes:
AbstractCompoundCrawler, AbstractCrawler, FileSystemCrawler, JdbcCrawler, WebCrawler, ZipCompoundCrawler

public interface CrawlerCallback

A callback interface to access metadata and attachments of crawled data.


Method Summary
 void dispose(Id id)
          Disposes the record with the given Id.
 byte[] getAttachment(Id id, java.lang.String name)
          Returns the attachment for the given Id and name pair.
 java.lang.String[] getAttachmentNames(Id id)
          Returns an array of String[] containing the names of the available attachments for the given id.
 MObject getMObject(Id id)
          Returns the MObject for the given id.
 

Method Detail

getMObject

MObject getMObject(Id id)
                   throws CrawlerException,
                          CrawlerCriticalException
Returns the MObject for the given id.

Parameters:
id - the record id
Returns:
the MObject
Throws:
CrawlerException - if any non critical error occurs
CrawlerCriticalException - if any critical error occurs

getAttachmentNames

java.lang.String[] getAttachmentNames(Id id)
                                      throws CrawlerException,
                                             CrawlerCriticalException
Returns an array of String[] containing the names of the available attachments for the given id.

Parameters:
id - the record id
Returns:
an array of String[] containing the names of the available attachments
Throws:
CrawlerException - if any non critical error occurs
CrawlerCriticalException - if any critical error occurs

getAttachment

byte[] getAttachment(Id id,
                     java.lang.String name)
                     throws CrawlerException,
                            CrawlerCriticalException
Returns the attachment for the given Id and name pair.

Parameters:
id - the record id
name - the name of the attachment
Returns:
a byte[] containing the attachment
Throws:
CrawlerException - if any non critical error occurs
CrawlerCriticalException - if any critical error occurs

dispose

void dispose(Id id)
Disposes the record with the given Id.

Parameters:
id - the record id

SMILA (incubation) API documentation