SMILA 1.0 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(ConnectivityId id)
          Disposes the record with the given Id.
 byte[] getAttachment(ConnectivityId id, java.lang.String name)
          Returns the attachment for the given Id and name pair.
 java.lang.String[] getAttachmentNames(ConnectivityId id)
          Returns an array of String[] containing the names of the available attachments for the given id.
 AnyMap getMetadata(ConnectivityId id)
          Returns the metadata for the given id.
 

Method Detail

getMetadata

AnyMap getMetadata(ConnectivityId id)
                   throws CrawlerException,
                          CrawlerCriticalException
Returns the metadata 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(ConnectivityId 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(ConnectivityId 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(ConnectivityId id)
Disposes the record with the given Id.

Parameters:
id - the record id

SMILA 1.0 API documentation