Changeset 5959 for SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/ScanCrawlTask.java
- Timestamp:
- 01/28/15 14:47:04 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/ScanCrawlTask.java
r5957 r5959 21 21 private AtomicReference<Corpora> corporaAtom; 22 22 private File cachedCorpora; 23 private AtomicReference<Statistics> statisticsAtom; 23 private AtomicReference<Statistics> scanStatisticsAtom; 24 private AtomicReference<Statistics> searchStatisticsAtom; 24 25 private String centerRegistryUrl; 25 26 … … 27 28 int cacheMaxDepth, EndpointFilter filter, 28 29 AtomicReference<Corpora> corporaAtom, File cachedCorpora, 29 AtomicReference<Statistics> statisticsAtom 30 ) { 30 AtomicReference<Statistics> scanStatisticsAtom, 31 AtomicReference<Statistics> searchStatisticsAtom 32 ) { 31 33 this.sruClient = sruClient; 32 34 this.centerRegistryUrl = centerRegistryUrl; … … 35 37 this.corporaAtom = corporaAtom; 36 38 this.cachedCorpora = cachedCorpora; 37 this.statisticsAtom = statisticsAtom; 39 this.scanStatisticsAtom = scanStatisticsAtom; 40 this.searchStatisticsAtom = searchStatisticsAtom; 38 41 } 39 42 … … 45 48 log.info("ScanCrawlTask: Initiating crawl"); 46 49 CenterRegistry centerRegistry = new CenterRegistryLive(centerRegistryUrl, filter); 47 centerRegistry.getCQLInstitutions().add(0,48 new Institution("test_IDS", null) {49 {50 addEndpoint("https://clarin.ids-mannheim.de/digibibsru-new");51 }52 });50 // centerRegistry.getCQLInstitutions().add(0, 51 // new Institution("test_IDS", null) { 52 // { 53 // addEndpoint("https://clarin.ids-mannheim.de/digibibsru-new"); 54 // } 55 // }); 53 56 // CenterRegistry centerRegistry = new CenterRegistryForTesting(); 54 57 ScanCrawler scanCrawler = new ScanCrawler(centerRegistry, sruClient, cacheMaxDepth); … … 58 61 59 62 corporaAtom.set(corpora); 60 statisticsAtom.set(scanCrawler.getStatistics()); 63 scanStatisticsAtom.set(scanCrawler.getStatistics()); 64 searchStatisticsAtom.set(new Statistics()); // reset search stats 61 65 long time = System.currentTimeMillis() - time0; 62 66
Note: See TracChangeset
for help on using the changeset viewer.