org.semanticdesktop.aperture.subcrawler
Interface SubCrawlerHandler


public interface SubCrawlerHandler

SubCrawlerHandlers are notified by a SubCrawler about additions and modifications of resources in an InputStream.

Rather than being pure listeners on a Crawler, CrawlerHandlers are also responsible to produce an RDFContainer on demand which the Crawler can use to store the source-specific metadata of a DataObject. It is up to the CrawlerHandler implementor to decide whether a new instance is returned for every DataObject or whether a shared instance is used. It is also responsible for any transaction and context management.


Method Summary
 RDFContainerFactory getRDFContainerFactory(String url)
          Returns an RDFContainerFactory that will be used to provide RDFContainers that will hold a DataObject's metadata.
 void objectChanged(DataObject object)
          Notification that the Crawler has found a changed resource in the domain it is crawling.
 void objectNew(DataObject object)
          Notification that the Crawler has found a new resource in the domain it is crawling.
 void objectNotModified(String url)
          Notification that the Crawler has found a resource that has not been modified since the previous crawl.
 

Method Detail

getRDFContainerFactory

RDFContainerFactory getRDFContainerFactory(String url)
Returns an RDFContainerFactory that will be used to provide RDFContainers that will hold a DataObject's metadata.

Parameters:
url - The url of the resource that is currently being accessed.
Returns:
an RDFContainer instance.

objectNew

void objectNew(DataObject object)
Notification that the Crawler has found a new resource in the domain it is crawling.

Parameters:
object - The constructed DataObject modeling the new resource.

objectChanged

void objectChanged(DataObject object)
Notification that the Crawler has found a changed resource in the domain it is crawling.

Parameters:
object - The constructed DataObject modeling the changed resource.

objectNotModified

void objectNotModified(String url)
Notification that the Crawler has found a resource that has not been modified since the previous crawl.

Parameters:
url - The url of the unmodified resource.


Copyright © 2010 Aperture Development Team. All Rights Reserved.