org.semanticdesktop.aperture.crawler.samba
Class SambaCrawler

java.lang.Object
  extended by org.semanticdesktop.aperture.crawler.base.CrawlerBase
      extended by org.semanticdesktop.aperture.crawler.samba.SambaCrawler
All Implemented Interfaces:
Crawler

public class SambaCrawler
extends CrawlerBase

A crawler for Samba shares. Simplicity assumptions:

Author:
Antoni

Field Summary
 
Fields inherited from class org.semanticdesktop.aperture.crawler.base.CrawlerBase
accessData, accessorRegistry, crawlReportFile, source, stopRequested
 
Constructor Summary
SambaCrawler()
           
 
Method Summary
protected  ExitCode crawlObjects()
          Method called by crawl() that should implement the actual crawling of the DataSource.
static String generateUrl(String domain, String username, String password, String server, String port, String share, String path)
          Generates and smb:// url out of the supplied parameter.
 
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
 

Constructor Detail

SambaCrawler

public SambaCrawler()
Method Detail

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.

generateUrl

public static String generateUrl(String domain,
                                 String username,
                                 String password,
                                 String server,
                                 String port,
                                 String share,
                                 String path)
Generates and smb:// url out of the supplied parameter. Takes care about proper escaping of characters disallowed in the URL.
 smb://[[[domain;]username[:password]@]server[:port]/[[share/[dir/]file]]][?[param=value[param2=value2[...]]]
 

Parameters:
domain -
username -
password -
server - (obligatory)
port -
share -
path -
Returns:


Copyright © 2010 Aperture Development Team. All Rights Reserved.