cz.cuni.pogamut.posh.explorer
Class NameMapCrawler

Package class diagram package NameMapCrawler
java.lang.Object
  extended by cz.cuni.pogamut.posh.explorer.NameMapCrawler
All Implemented Interfaces:
CrawlerListener<cz.cuni.amis.pogamut.sposh.executor.PrimitiveData>

public class NameMapCrawler
extends Object
implements CrawlerListener<cz.cuni.amis.pogamut.sposh.executor.PrimitiveData>

Special cralwer listener that will listen for all collected PrimitiveData and pass mapping of names to ShedPresenter.

Author:
Honza

Constructor Summary
NameMapCrawler(ShedPresenter presenter)
           
 
Method Summary
 void crawledData(Crawler<cz.cuni.amis.pogamut.sposh.executor.PrimitiveData> crawler, Collection<cz.cuni.amis.pogamut.sposh.executor.PrimitiveData> data)
          When receiving new PrimitiveData, set name mapping in ShedPresenter, fqn to PrimitiveData.
 void finished(Crawler<cz.cuni.amis.pogamut.sposh.executor.PrimitiveData> crawler, boolean error)
          Do nothing.
 void started(Crawler<cz.cuni.amis.pogamut.sposh.executor.PrimitiveData> crawler)
          When crawling starts, clear previsou name mappings (ShedPresenter#setNameMapping(fqn, null))
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameMapCrawler

public NameMapCrawler(ShedPresenter presenter)
Method Detail

started

public void started(Crawler<cz.cuni.amis.pogamut.sposh.executor.PrimitiveData> crawler)
When crawling starts, clear previsou name mappings (ShedPresenter#setNameMapping(fqn, null))

Specified by:
started in interface CrawlerListener<cz.cuni.amis.pogamut.sposh.executor.PrimitiveData>
Parameters:
crawler - crawler that has started executing.

crawledData

public void crawledData(Crawler<cz.cuni.amis.pogamut.sposh.executor.PrimitiveData> crawler,
                        Collection<cz.cuni.amis.pogamut.sposh.executor.PrimitiveData> data)
When receiving new PrimitiveData, set name mapping in ShedPresenter, fqn to PrimitiveData.

Specified by:
crawledData in interface CrawlerListener<cz.cuni.amis.pogamut.sposh.executor.PrimitiveData>
Parameters:
data -
crawler - crawler that has crawled new data
See Also:
ShedPresenter#setNameMapping(java.lang.String, cz.cuni.pogamut.posh.explorer.PrimitiveData)

finished

public void finished(Crawler<cz.cuni.amis.pogamut.sposh.executor.PrimitiveData> crawler,
                     boolean error)
Do nothing.

Specified by:
finished in interface CrawlerListener<cz.cuni.amis.pogamut.sposh.executor.PrimitiveData>
Parameters:
crawler - crawler that has finished.
error - did crawler finsih because of error?


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.