Changeset 5291
- Timestamp:
- 05/27/14 07:41:55 (10 years ago)
- Location:
- SRUAggregator/trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUAggregator/trunk/pom.xml
r5044 r5291 145 145 <artifactId>javax.servlet-api</artifactId> 146 146 <version>3.1.0</version> 147 <scope>provided</scope> 147 148 </dependency> 148 149 </dependencies> -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/app/WebAppListener.java
r5041 r5291 7 7 import eu.clarin.sru.client.SRUThreadedClient; 8 8 import eu.clarin.sru.client.fcs.ClarinFCSRecordParser; 9 import eu.clarin.sru.fcs.aggregator.cache.EndpointUrlFilter;10 9 import eu.clarin.sru.fcs.aggregator.sopt.CenterRegistryI; 11 10 import eu.clarin.sru.fcs.aggregator.sopt.CenterRegistryLive; … … 15 14 import java.io.IOException; 16 15 import java.io.InputStream; 17 import java.util.Date;18 16 import java.util.HashSet; 19 17 import java.util.Set; 20 import java.util.Timer;21 18 import java.util.concurrent.ExecutorService; 22 19 import java.util.concurrent.Executors; … … 27 24 import javax.naming.InitialContext; 28 25 import javax.naming.NamingException; 29 import javax.servlet.ServletContext;30 26 import opennlp.tools.tokenize.TokenizerModel; 31 import org.joda.time.DateTime;32 27 import org.zkoss.zk.ui.WebApp; 33 28 import org.zkoss.zk.ui.util.WebAppCleanup; … … 78 73 webapp.setAttribute(LANGUAGES, languages); 79 74 75 // toggle following 2 comments to test user interface 80 76 setUpScanCache(webapp); 81 77 //setUpScanCacheForReadOnly(webapp); … … 103 99 if (!aggregatorDir.exists()) { 104 100 LOGGER.severe("Aggregator directory does not exist and cannot be created: " 105 101 + aggregatorDir.getAbsolutePath()); 106 102 } 107 103 File scanDir = new File(aggregatorDir, SCAN_DIR_NAME); … … 144 140 CenterRegistryI centerRegistry = new CenterRegistryLive(); 145 141 SRUThreadedClient sruScanClient = (SRUThreadedClient) webapp.getAttribute(WebAppListener.SHARED_SRU_CLIENT); 146 //EndpointUrlFilter filter = new EndpointUrlFilter(); 147 //filter.urlShouldContainAnyOf("leipzig"); 148 //filter.urlShouldContainAnyOf("uni-tuebingen.de"); 149 //filter.urlShouldContainAnyOf("uni-tuebingen.de", ".mpi.nl"); 150 //filter.urlShouldContainAnyOf("dspin.dwds.de", "lindat."); 151 //ScanCrawler scanCrawler = new ScanCrawler(centerRegistry, sruScanClient, filter, CACHE_MAX_DEPTH); 142 143 // Comment-out when testing: 152 144 ScanCrawler scanCrawler = new ScanCrawler(centerRegistry, sruScanClient, null, cacheMaxDepth); 145 146 // For Testing: 147 // EndpointUrlFilter filter = new EndpointUrlFilter(); 148 // //filter.urlShouldContainAnyOf("leipzig"); 149 // //filter.urlShouldContainAnyOf("uni-tuebingen.de"); 150 // filter.urlShouldContainAnyOf("uni-tuebingen.de", ".mpi.nl"); 151 // //filter.urlShouldContainAnyOf("dspin.dwds.de", "lindat."); 152 // ScanCrawler scanCrawler = new ScanCrawler(centerRegistry, sruScanClient, filter, cacheMaxDepth); 153 153 ScanCache scanCache; 154 154 … … 196 196 try { 197 197 // Wait a while for existing tasks to terminate 198 if (!pool.awaitTermination(WAITING_TIME_FOR_POOL_SHUTDOWN_MS, 198 if (!pool.awaitTermination(WAITING_TIME_FOR_POOL_SHUTDOWN_MS, 199 199 TimeUnit.MILLISECONDS)) { 200 200 pool.shutdownNow(); // Cancel currently executing tasks 201 201 // Wait a while for tasks to respond to being cancelled 202 if (!pool.awaitTermination(WAITING_TIME_FOR_POOL_SHUTDOWN_MS, 202 if (!pool.awaitTermination(WAITING_TIME_FOR_POOL_SHUTDOWN_MS, 203 203 TimeUnit.MILLISECONDS)) { 204 204 LOGGER.info("Pool did not terminate");
Note: See TracChangeset
for help on using the changeset viewer.