org.semanticdesktop.aperture.websites.bibsonomy
Class BibsonomyCrawler

java.lang.Object
  extended by org.semanticdesktop.aperture.crawler.base.CrawlerBase
      extended by org.semanticdesktop.aperture.websites.bibsonomy.BibsonomyCrawler
All Implemented Interfaces:
Crawler

public class BibsonomyCrawler
extends CrawlerBase

Crawls bibtex entries of a bibsonomy user.


Field Summary
 
Fields inherited from class org.semanticdesktop.aperture.crawler.base.CrawlerBase
accessData, accessorRegistry, crawlReportFile, source, stopRequested
 
Constructor Summary
BibsonomyCrawler()
           
 
Method Summary
static DataObject convertBibtexEntryToDataObject(RDFContainer cont, org.bibsonomy.model.Post<? extends org.bibsonomy.model.Resource> post, org.bibsonomy.model.BibTex res)
          Converts the bibtex entry to a data object.
protected  ExitCode crawlObjects()
          Method called by crawl() that should implement the actual crawling of the DataSource.
static URI getBibtexUri(org.bibsonomy.model.Post<? extends org.bibsonomy.model.Resource> post, org.bibsonomy.model.BibTex res)
          Returns a uri for the given bibtex entry.
 
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

BibsonomyCrawler

public BibsonomyCrawler()
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.

convertBibtexEntryToDataObject

public static DataObject convertBibtexEntryToDataObject(RDFContainer cont,
                                                        org.bibsonomy.model.Post<? extends org.bibsonomy.model.Resource> post,
                                                        org.bibsonomy.model.BibTex res)
Converts the bibtex entry to a data object. The metadata rdf container of the returned data object contains information extracted from the bibtex entry expressed with the SWRC and NAO vocabulary.

Parameters:
cont - the RDFContainer where the generated metadata should be stored
post - the post
res - the bibtex entry contained within that post
Returns:
a data object corresponding to the given bibtex entry

getBibtexUri

public static URI getBibtexUri(org.bibsonomy.model.Post<? extends org.bibsonomy.model.Resource> post,
                               org.bibsonomy.model.BibTex res)
Returns a uri for the given bibtex entry.

Parameters:
post - the post containing the entry
res - the bibtex entry
Returns:
a uri for the given bibtex entry


Copyright © 2010 Aperture Development Team. All Rights Reserved.