org.semanticdesktop.aperture.addressbook
Class AddressbookCrawler

java.lang.Object
  extended by org.semanticdesktop.aperture.crawler.base.CrawlerBase
      extended by org.semanticdesktop.aperture.addressbook.AddressbookCrawler
All Implemented Interfaces:
Crawler
Direct Known Subclasses:
ThunderbirdCrawler

public abstract class AddressbookCrawler
extends CrawlerBase

This is a superclass of all addressbook crawlers. Modified dates are not used, but a checksum is computed to determine if entries are changed. Return addressbook enties are expected to use VCard vocabulary.


Field Summary
protected static String ADDRESSBOOK_CHECKSUM_KEY
          Key used to store the addressbook entry checksum in the AccessData - used for incremental crawling
 
Fields inherited from class org.semanticdesktop.aperture.crawler.base.CrawlerBase
accessData, accessorRegistry, crawlReportFile, source, stopRequested
 
Constructor Summary
AddressbookCrawler()
           
 
Method Summary
abstract  List crawlAddressbook()
          Crawls the addressbook and returns a list of DataObjects.
protected  ExitCode crawlObjects()
          Method called by crawl() that should implement the actual crawling of the DataSource.
abstract  URI getContactListUri()
          Returns the URI of the address book itself
 
Methods inherited from class org.semanticdesktop.aperture.crawler.base.CrawlerBase
clear, clear, crawl, getAccessData, getCrawlerHandler, getCrawlReport, getCrawlReportFile, getDataAccessorRegistry, getDataSource, getRDFContainerFactory, inDomain, isStopRequested, reportAccessingObject, reportDeletedDataObject, reportFatalErrorCause, reportFatalErrorCause, reportFatalErrorCause, reportModifiedDataObject, reportNewDataObject, reportUnmodifiedDataObject, reportUntouched, runSubCrawler, setAccessData, setCrawlerHandler, setCrawlReportFile, setDataAccessorRegistry, setDataSource, stop, storeCrawlReport, touchObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADDRESSBOOK_CHECKSUM_KEY

protected static final String ADDRESSBOOK_CHECKSUM_KEY
Key used to store the addressbook entry checksum in the AccessData - used for incremental crawling

See Also:
Constant Field Values
Constructor Detail

AddressbookCrawler

public AddressbookCrawler()
Method Detail

crawlAddressbook

public abstract List crawlAddressbook()
                               throws Exception
Crawls the addressbook and returns a list of DataObjects. Each DataObject corresponds to a single entry in the addresbook.

Returns:
a list of DataObjects representing addressbook entries
Throws:
Exception

getContactListUri

public abstract URI getContactListUri()
Returns the URI of the address book itself

Returns:
the URI of the address book itself

crawlObjects

protected ExitCode crawlObjects()
Description copied from class: CrawlerBase
Method called by crawl() that should implement the actual crawling of the DataSource. The return value of this method should indicate whether the scanning was completed successfully (i.e. it wasn't interrupted or anything). Also this method is expected to update the deprecatedUrls set, as any remaining URLs in this set will be removed as being removed after this method completes.

Specified by:
crawlObjects in class CrawlerBase
Returns:
An ExitCode indicating how the crawl procedure terminated.


Copyright © 2010 Aperture Development Team. All Rights Reserved.