Changeset 5041
- Timestamp:
- 04/24/14 09:59:58 (10 years ago)
- Location:
- SRUAggregator/trunk
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUAggregator/trunk/pom.xml
r5040 r5041 140 140 <version>1.9.5</version> 141 141 <scope>test</scope> 142 </dependency> 143 142 </dependency> 143 <dependency> 144 <groupId>javax.servlet</groupId> 145 <artifactId>javax.servlet-api</artifactId> 146 <version>3.1.0</version> 147 </dependency> 144 148 </dependencies> 145 149 -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/app/Aggregator.java
r5040 r5041 14 14 import org.zkoss.zul.Textbox; 15 15 import eu.clarin.sru.fcs.aggregator.sopt.Corpus; 16 import eu.clarin.sru.fcs.aggregator.sopt.Languages; 16 17 import eu.clarin.sru.fcs.aggregator.util.SRUCQL; 18 import javax.naming.InitialContext; 19 import javax.naming.NamingException; 17 20 import org.zkoss.zul.A; 18 21 import org.zkoss.zul.Div; … … 60 63 * page is displayed and search results of the provided query start to fill 61 64 * it in immediately (i.e. users don't need to click 'search' in the aggregator 62 * page). Was done to meet the request from CLARIN ERIC ( 65 * page). Was done to meet the request from CLARIN ERIC (Martin Wynne 63 66 * contacted us). 67 * 68 * /?mode=live 69 * corresponds to the mode where the information about corpora are taken not 70 * from the scan cache (crawled in advance), but loaded live, starting from 71 * the request to center registry and then performing scan operation requests on 72 * each CQL endpoint listed there. It takes time to get the corresponding 73 * responses from the endpoints, therefore the Aggregator page loads very slow 74 * in this mode. But this mode is useful for testing of the newly added or 75 * changed corpora without waiting for the next crawl. 64 76 * 77 * 65 78 * @author Yana Panchenko 66 79 */ … … 96 109 private Label helpLabel; 97 110 @Wire 98 Progressmeter pMeter; 99 @Wire 100 Menubar menubar; 101 @Wire 102 North controls1; 103 @Wire 104 South controls2; 105 @Wire 106 A prevButton; 107 @Wire 108 A nextButton; 109 @Wire 110 Label tooltipPrevText; 111 @Wire 112 Label tooltipNextText; 113 114 @Wire 115 Menuitem weblichtTcf; 111 private Progressmeter pMeter; 112 @Wire 113 private Menubar menubar; 114 @Wire 115 private North controls1; 116 @Wire 117 private South controls2; 118 @Wire 119 private A prevButton; 120 @Wire 121 private A nextButton; 122 @Wire 123 private Label tooltipPrevText; 124 @Wire 125 private Label tooltipNextText; 126 @Wire 127 private Menuitem weblichtTcf; 116 128 117 129 private int[] searchOffset = new int[]{1, 0}; // start and size … … 119 131 private PagesVisibility pagesVisibility; 120 132 121 private static final String WEBLICHT_URL = 122 "https://weblicht.sfs.uni-tuebingen.de/WebLicht-4/?input="; 123 133 private String weblichtUrl; // defined in web.xml 124 134 public static final String MODE_PARAM = "mode"; 125 135 public static final String MODE_PARAM_VALUE_TEST = "testing"; … … 132 142 public void doAfterCompose(Component comp) throws Exception { 133 143 super.doAfterCompose(comp); 144 processContext(); 134 145 processParameters(); 135 146 searchOptionsComposer = (SearchOptions) soDiv.getChildren().get(0).getChildren().get(0).getAttribute("$" + SearchOptions.class.getSimpleName()); … … 163 174 searchOffset[1] = maxRecords; 164 175 searchResultsComposer.executeSearch(selectedCorpora, searchOffset[0], maxRecords, searchString.getText(), searchLang); 165 if (searchLang.equals( "anylang")) {176 if (searchLang.equals(Languages.ANY_LANGUAGE_NAME)) { 166 177 this.weblichtTcf.setVisible(false); 167 178 } else { … … 230 241 String url = searchResultsComposer.useWebLichtOnText(); 231 242 if (url != null) { 232 Executions.getCurrent().sendRedirect( WEBLICHT_URL243 Executions.getCurrent().sendRedirect(weblichtUrl 233 244 + url, "_blank"); 234 245 } … … 239 250 String url = searchResultsComposer.useWebLichtOnToks(); 240 251 if (url != null) { 241 Executions.getCurrent().sendRedirect( WEBLICHT_URL252 Executions.getCurrent().sendRedirect(weblichtUrl 242 253 + url, "_blank"); 243 254 } … … 335 346 searchOffset[1] = maxRecords; 336 347 searchResultsComposer.executeSearch(selectedCorpora, searchOffset[0], maxRecords, searchString.getText(), searchLang); 337 if (searchLang.equals( "anylang")) {348 if (searchLang.equals(Languages.ANY_LANGUAGE_NAME)) { 338 349 this.weblichtTcf.setVisible(false); 339 350 } else { … … 365 376 searchOffset[1] = maxRecords; 366 377 searchResultsComposer.executeSearch(selectedCorpora, searchOffset[0], maxRecords, searchString.getText(), searchLang); 367 if (searchLang.equals( "anylang")) {378 if (searchLang.equals(Languages.ANY_LANGUAGE_NAME)) { 368 379 this.weblichtTcf.setVisible(false); 369 380 } else { … … 408 419 } 409 420 421 private void processContext() { 422 InitialContext context; 423 try { 424 context = new InitialContext(); 425 weblichtUrl = (String) context.lookup("java:comp/env/weblicht-url"); 426 } catch (NamingException ex) { 427 LOGGER.log(Level.SEVERE, null, ex); 428 } 429 } 430 410 431 } -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/app/PagesVisibility.java
r3038 r5041 6 6 /** 7 7 * Class to control which/how page is to be displayed in the main Aggregator window 8 * ( about page, search options page, results page or helppage).8 * ('about' page, 'search options' page, 'results' page or 'help' page). 9 9 * 10 10 * @author Yana Panchenko -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/app/SearchOptions.java
r5040 r5041 63 63 @Wire 64 64 private Comboitem anyLanguage; 65 @Wire 66 private Combobox maximumRecordsSelect; 67 @Wire 68 private Groupbox allCorpora; 69 @Wire 70 private Tree tree; 71 @Wire 72 private Treecol nameCol; 73 @Wire 74 private Treecol instCol; 75 65 76 private Languages languages; 66 67 @Wire68 private Combobox maximumRecordsSelect;69 70 @Wire71 private Groupbox allCorpora;72 @Wire73 private Tree tree;74 77 private Map<String, List<String>> xAggregationContext; 75 76 78 private CorpusModelI corporaModel; 77 79 private CorpusRenderer corpusRenderer; 78 79 private boolean liveMode = false;80 81 80 private ScanCache cache; 82 83 81 private Aggregator aggregatorController; 84 82 … … 88 86 setUpAggerationContext(); 89 87 cache = (ScanCache) Executions.getCurrent().getDesktop().getWebApp().getAttribute(WebAppListener.CORPUS_CACHE); 90 //if (cache.isEmpty()) {91 // liveMode = true;92 //}93 88 setUpCorpusTree(); 94 89 languages = (Languages) Executions.getCurrent().getDesktop().getWebApp().getAttribute(WebAppListener.LANGUAGES); … … 176 171 Treechildren openTreeItems = tree.getTreechildren(); 177 172 for (Treeitem openItem : openTreeItems.getItems()) { 178 179 173 DefaultTreeNode<Corpus> node = (DefaultTreeNode<Corpus>) openItem.getValue(); 180 //Corpus data = node.getData();181 //System.out.println(data);182 183 174 corpusRenderer.updateItem(openItem, false); 184 175 } … … 214 205 } 215 206 } 216 217 // // this is a temporary solution,218 // // the whole concept on how selected externally resources219 // // are displayed has to be changed, otherwise endpoints with220 // // hundreds of subresources will break the tree interface221 // // by loading all their resources...222 // List<String> handlesCopy = new ArrayList<String>(handles.size());223 // handlesCopy.addAll(handles);224 // selectCorpora(openItem, data, handlesCopy);225 207 } 226 208 } … … 249 231 availableLangs.add(corpus.getLanguages().iterator().next()); 250 232 } 251 //for (String langCode : corpus.getLanguages()) { 252 // availableLangs.add(langCode); 253 //} 254 } 255 256 //List<String> sortedAvailableLanguages = new ArrayList<String>(availableLangs.size()); 257 //sortedAvailableLanguages.addAll(availableLangs); 258 //Collections.sort(sortedAvailableLanguages); 233 } 234 259 235 List<Language> sortedLangs = new ArrayList<Language>(availableLangs.size()); 260 236 for (String langCode : availableLangs) { … … 307 283 this.corporaModel = model; 308 284 this.corpusRenderer = renderer; 309 } else if ( liveMode) {285 } else if (isLiveModeOn()) { 310 286 CenterRegistryI registry = new CenterRegistryLive(); 311 287 CorpusModelLive model = new CorpusModelLive(registry); … … 325 301 this.corpusRenderer = renderer; 326 302 } 327 Treecol nameCol = (Treecol) tree.getTreecols().getFellow("nameCol");303 //Treecol nameCol = (Treecol) tree.getTreecols().getFellow("nameCol"); 328 304 nameCol.setSortAscending(new CorpusByNameComparator()); 329 305 nameCol.setSortDescending(new CorpusByNameDComparator()); 330 Treecol instCol = (Treecol) tree.getTreecols().getFellow("instCol");306 //Treecol instCol = (Treecol) tree.getTreecols().getFellow("instCol"); 331 307 instCol.setSortAscending(new CorpusByInstitutionComparator()); 332 308 instCol.setSortDescending(new CorpusByInstitutionDComparator()); … … 335 311 336 312 337 private void selectCorpora(Treeitem openItem, Corpus data, List<String> handles) {338 List<String> handlesFound = new ArrayList<String>();339 for (String handle : handles) {340 if (handle.equals(data.getHandle())) {341 handlesFound.add(handle);342 }343 }344 for (String handle : handlesFound) {345 corpusRenderer.updateItem(openItem, true);346 handles.remove(handle);347 }348 349 if (!handles.isEmpty()) {350 int sizeBefore = handles.size();351 openItem.setOpen(true);352 Treechildren tchildren = openItem.getTreechildren();353 List<Treeitem> tcitems = new ArrayList<Treeitem>();354 tcitems.addAll(tchildren.getItems());355 for (Treeitem child : tcitems) {356 DefaultTreeNode<Corpus> node = (DefaultTreeNode<Corpus>) child.getValue();357 Corpus cdata = node.getData();358 selectCorpora(child, cdata, handles);359 if (handles.isEmpty()) {360 break;361 }362 }363 if (sizeBefore == handles.size()) {364 openItem.setOpen(false);365 }366 }367 }313 // private void selectCorpora(Treeitem openItem, Corpus data, List<String> handles) { 314 // List<String> handlesFound = new ArrayList<String>(); 315 // for (String handle : handles) { 316 // if (handle.equals(data.getHandle())) { 317 // handlesFound.add(handle); 318 // } 319 // } 320 // for (String handle : handlesFound) { 321 // corpusRenderer.updateItem(openItem, true); 322 // handles.remove(handle); 323 // } 324 // 325 // if (!handles.isEmpty()) { 326 // int sizeBefore = handles.size(); 327 // openItem.setOpen(true); 328 // Treechildren tchildren = openItem.getTreechildren(); 329 // List<Treeitem> tcitems = new ArrayList<Treeitem>(); 330 // tcitems.addAll(tchildren.getItems()); 331 // for (Treeitem child : tcitems) { 332 // DefaultTreeNode<Corpus> node = (DefaultTreeNode<Corpus>) child.getValue(); 333 // Corpus cdata = node.getData(); 334 // selectCorpora(child, cdata, handles); 335 // if (handles.isEmpty()) { 336 // break; 337 // } 338 // } 339 // if (sizeBefore == handles.size()) { 340 // openItem.setOpen(false); 341 // } 342 // } 343 // } 368 344 369 345 … … 373 349 if (paramValue != null) { 374 350 String mode = paramValue[0].trim(); 375 LOGGER.log(Level.INFO, "Received parameter: {0}[{1}]", new String[]{Aggregator.MODE_PARAM, mode});376 351 if (mode.equals(Aggregator.MODE_PARAM_VALUE_TEST)) { 377 352 testingOn = true; 353 LOGGER.log(Level.INFO, "Received parameter: {0}[{1}]", new String[]{Aggregator.MODE_PARAM, mode}); 378 354 } 379 355 } 380 356 return testingOn; 357 } 358 359 private boolean isLiveModeOn() { 360 boolean liveOn = false; 361 String[] paramValue = Executions.getCurrent().getParameterMap().get(Aggregator.MODE_PARAM); 362 if (paramValue != null) { 363 String mode = paramValue[0].trim(); 364 if (mode.equals(Aggregator.MODE_PARAM_VALUE_LIVE)) { 365 liveOn = true; 366 LOGGER.log(Level.INFO, "Received parameter: {0}[{1}]", new String[]{Aggregator.MODE_PARAM, mode}); 367 } 368 } 369 return liveOn; 381 370 } 382 371 … … 386 375 if (paramValue != null) { 387 376 String mode = paramValue[0].trim(); 388 LOGGER.log(Level.INFO, "Received parameter: {0}[{1}]", new String[]{Aggregator.MODE_PARAM, mode});389 377 if (mode.equals(Aggregator.MODE_PARAM_VALUE_SEARCH)) { 390 378 searchOn = true; 379 LOGGER.log(Level.INFO, "Received parameter: {0}[{1}]", new String[]{Aggregator.MODE_PARAM, mode}); 391 380 } 392 381 } -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/app/WebAppListener.java
r5040 r5041 25 25 import java.util.logging.Level; 26 26 import java.util.logging.Logger; 27 import javax.naming.InitialContext; 28 import javax.naming.NamingException; 29 import javax.servlet.ServletContext; 27 30 import opennlp.tools.tokenize.TokenizerModel; 28 31 import org.joda.time.DateTime; … … 40 43 public class WebAppListener implements WebAppInit, WebAppCleanup { 41 44 45 private static final Logger LOGGER = Logger.getLogger(WebAppListener.class.getName()); 42 46 public static final String ACTIVE_SEARCH_CONTROLLERS = "ACTIVE_SEARCH_CONTROLLERS"; 43 47 public static final String SHARED_SRU_CLIENT = "SHARED_SRU_CLIENT"; 44 48 public static final String LANGUAGES = "LANG"; 45 49 public static final String CORPUS_CACHE = "CORPUS_CACHE"; 46 private static final Logger LOGGER = Logger.getLogger(WebAppListener.class.getName()); 47 //private static final int HOURS_BETWEEN_CACHE_UPDATE = 3; 50 public static final String CORPUS_CRAWLER = "CORPUS_CRAWLER"; 51 public static final int WAITING_TIME_FOR_SRUCLIENT_SHUTDOWN_MS = 10000; 52 public static final int WAITING_TIME_FOR_POOL_SHUTDOWN_MS = 60000; 48 53 //private Timer cacheTimer; 49 54 public static final String DE_TOK_MODEL = "/tokenizer/de-tuebadz-8.0-token.bin"; 50 private static final String AGGREGATOR_DIR_NAME = "aggregator"; 55 private static final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); 56 private static final String DEFAULT_DATA_LOCATION = "/data"; 57 private String dataLocation; // defined in web.xml with fall-back in the code 58 private String aggregatorDirName; // defined in web.xml 51 59 private static final String SCAN_DIR_NAME = "scan"; 52 private static final TimeUnit CACHE_UPDATE_INTERVAL_UNIT = TimeUnit.HOURS; 53 private static final int CACHE_UPDATE_INTERVAL = 6; 54 private static final int CACHE_MAX_DEPTH = 3; 55 private static final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); 56 public static final String CORPUS_CRAWLER = "CORPUS_CRAWLER"; 60 private TimeUnit cacheUpdateIntervalUnit; // defined in web.xml 61 private Integer cacheUpdateInterval; // defined in web.xml 62 private Integer cacheMaxDepth; // defined in web.xml 57 63 58 64 @Override 59 public void init(WebApp webapp) throws Exception{65 public void init(WebApp webapp) { 60 66 61 67 LOGGER.info("Aggregator is starting."); 62 68 processContext(); 69 63 70 Set<SearchResults> activeControllers = new HashSet<SearchResults>(); 64 71 webapp.setAttribute(ACTIVE_SEARCH_CONTROLLERS, activeControllers); 65 72 66 73 SRUThreadedClient sruClient = new SRUThreadedClient(); 67 74 sruClient.registerRecordParser(new ClarinFCSRecordParser()); … … 70 77 Languages languages = new Languages(); 71 78 webapp.setAttribute(LANGUAGES, languages); 72 73 //setUpScanCache(webapp);74 setUpScanCacheForReadOnly(webapp);75 79 80 setUpScanCache(webapp); 81 //setUpScanCacheForReadOnly(webapp); 82 76 83 setUpTokenizers(webapp); 77 84 78 85 } 79 86 … … 92 99 93 100 private String getScanDirectory() { 94 File aggregatorDir = new File(System.getProperty("user.home"), "/." + AGGREGATOR_DIR_NAME); 95 //File aggregatorDir = new File("/var/www", "/." + AGGREGATOR_DIR_NAME); 96 //File aggregatorDir = new File("/data/fcsAggregator"); 97 101 102 File aggregatorDir = new File(dataLocation, aggregatorDirName); 98 103 if (!aggregatorDir.exists()) { 99 if (!aggregatorDir.mkdir()) { 100 LOGGER.info("Scan directory does not exist and cannot be created: " 104 LOGGER.severe("Aggregator directory does not exist and cannot be created: " 105 + aggregatorDir.getAbsolutePath()); 106 } 107 File scanDir = new File(aggregatorDir, SCAN_DIR_NAME); 108 if (!scanDir.exists()) { 109 if (!scanDir.mkdir()) { 110 LOGGER.severe("Scan directory does not exist and cannot be created: " 101 111 + aggregatorDir.getAbsolutePath()); 102 112 } 103 113 } 104 File scanDir = new File(aggregatorDir, SCAN_DIR_NAME);105 if (!scanDir.exists()) {106 scanDir.mkdir();107 }108 114 String scanPath = scanDir.getAbsolutePath(); 109 LOGGER.info("Scan location: " + scanPath);115 LOGGER.info("Scan data location: " + scanPath); 110 116 return scanPath; 111 117 } 112 118 113 119 /** 114 * Use this method instead of setUpScanCache() method if it is necessary 115 * to run the application without scan data crawl, given that the scan 116 * data was crawled before and was stored as cache under appropriate 117 * location (useful when testing or when smth is wrong with the endpoint 118 * scan responses). 119 * 120 * @param webapp 120 * Use this method instead of setUpScanCache() method if it is necessary to 121 * run the application without scan data crawl, given that the scan data was 122 * crawled before and was stored as cache under appropriate location (useful 123 * when testing or when smth is wrong with the endpoint scan responses). 124 * 125 * @param webapp 121 126 */ 122 127 private void setUpScanCacheForReadOnly(WebApp webapp) { … … 145 150 //filter.urlShouldContainAnyOf("dspin.dwds.de", "lindat."); 146 151 //ScanCrawler scanCrawler = new ScanCrawler(centerRegistry, sruScanClient, filter, CACHE_MAX_DEPTH); 147 ScanCrawler scanCrawler = new ScanCrawler(centerRegistry, sruScanClient, null, CACHE_MAX_DEPTH);152 ScanCrawler scanCrawler = new ScanCrawler(centerRegistry, sruScanClient, null, cacheMaxDepth); 148 153 ScanCache scanCache; 149 154 150 //synchronized (scanCrawler) { 151 LOGGER.info("Start cache read"); 152 try { 153 scanCache = scanCacheFiled.read(); 154 LOGGER.info("Finished cache read, number of root corpora: " + scanCache.getRootCorpora().size()); 155 } catch (Exception e) { 156 LOGGER.log(Level.SEVERE, "Error while reading the scan cache!", e); 157 scanCache = new SimpleInMemScanCache(); 158 } 159 //} 155 LOGGER.info("Start cache read"); 156 try { 157 scanCache = scanCacheFiled.read(); 158 LOGGER.info("Finished cache read, number of root corpora: " + scanCache.getRootCorpora().size()); 159 } catch (Exception e) { 160 LOGGER.log(Level.SEVERE, "Error while reading the scan cache!", e); 161 scanCache = new SimpleInMemScanCache(); 162 } 160 163 webapp.setAttribute(CORPUS_CACHE, scanCache); 161 164 webapp.setAttribute(CORPUS_CRAWLER, scanCrawler); … … 163 166 scheduler.scheduleAtFixedRate( 164 167 new ScanCrawlTask(scanCrawler, scanCacheFiled, webapp), 165 0, CACHE_UPDATE_INTERVAL, CACHE_UPDATE_INTERVAL_UNIT);168 0, cacheUpdateInterval, cacheUpdateIntervalUnit); 166 169 167 170 } … … 176 179 // Wait 10 secs for existing tasks to terminate 177 180 // replace with awaitTermination if ever provided in SRUClient API 178 Thread.sleep( 10000);181 Thread.sleep(WAITING_TIME_FOR_SRUCLIENT_SHUTDOWN_MS); 179 182 sruClient.shutdownNow(); // Cancel currently executing tasks 180 183 // Wait 10 secs for tasks to respond to being cancelled 181 184 // replace with awaitTermination if ever provided in SRUClient API 182 Thread.sleep( 10000);185 Thread.sleep(WAITING_TIME_FOR_SRUCLIENT_SHUTDOWN_MS); 183 186 } catch (InterruptedException ie) { 184 187 // (Re-)Cancel if current thread also interrupted … … 193 196 try { 194 197 // Wait a while for existing tasks to terminate 195 if (!pool.awaitTermination(60, TimeUnit.SECONDS)) { 198 if (!pool.awaitTermination(WAITING_TIME_FOR_POOL_SHUTDOWN_MS, 199 TimeUnit.MILLISECONDS)) { 196 200 pool.shutdownNow(); // Cancel currently executing tasks 197 201 // Wait a while for tasks to respond to being cancelled 198 if (!pool.awaitTermination(60, TimeUnit.SECONDS)) { 202 if (!pool.awaitTermination(WAITING_TIME_FOR_POOL_SHUTDOWN_MS, 203 TimeUnit.MILLISECONDS)) { 199 204 LOGGER.info("Pool did not terminate"); 200 205 } … … 220 225 } 221 226 227 private void processContext() { 228 try { 229 InitialContext context; 230 context = new InitialContext(); 231 String dataLocationPropertyName = (String) context.lookup("java:comp/env/data-location-property"); 232 aggregatorDirName = (String) context.lookup("java:comp/env/aggregator-folder"); 233 String updateIntervalUnitString = (String) context.lookup("java:comp/env/update-interval-unit"); 234 cacheUpdateIntervalUnit = TimeUnit.valueOf(updateIntervalUnitString); 235 cacheUpdateInterval = (Integer) context.lookup("java:comp/env/update-interval"); 236 cacheMaxDepth = (Integer) context.lookup("java:comp/env/scan-max-depth"); 237 // see if data location is set in properties 238 dataLocation = System.getProperty(dataLocationPropertyName); 239 if (dataLocation == null || !(new File(dataLocation, aggregatorDirName).exists())) { 240 dataLocation = DEFAULT_DATA_LOCATION; 241 if (!(new File(dataLocation, aggregatorDirName).exists())) { 242 dataLocation = System.getProperty("user.home"); 243 } 244 if ((new File(dataLocation, aggregatorDirName).exists())) { 245 LOGGER.info(dataLocationPropertyName + " property is not defined, " 246 + "setting to default: " + dataLocation); 247 } else { 248 LOGGER.info(dataLocationPropertyName + " property is not defined, " 249 + "default location does not extist: " + dataLocation); 250 throw new RuntimeException("Data location not found"); 251 } 252 } 253 } catch (NamingException ex) { 254 Logger.getLogger(WebAppListener.class.getName()).log(Level.SEVERE, null, ex); 255 } 256 } 222 257 } -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/CenterRegistryLive.java
r5035 r5041 13 13 import java.util.logging.Level; 14 14 import java.util.logging.Logger; 15 import javax.naming.InitialContext; 16 import javax.naming.NamingException; 15 17 16 18 /** … … 22 24 23 25 private static final Logger LOGGER = Logger.getLogger(CenterRegistryLive.class.getName()); 24 private static final String CENTER_REGISTRY_URL = "http://130.183.206.32/restxml/"; 26 //private static final String CENTER_REGISTRY_URL = "http://130.183.206.32/restxml/"; 27 private String centerRegistryUrl; //defined in web.xml 25 28 //https://centerregistry-clarin.esc.rzg.mpg.de/restxml/ 26 29 private boolean hasInstitutionsLoaded = false; 27 30 private List<Institution> centers = new ArrayList<Institution>(); 31 32 public CenterRegistryLive() { 33 super(); 34 processContext(); 35 } 28 36 29 37 @Override … … 39 47 } 40 48 hasInstitutionsLoaded = true; 41 URI url = URI.create( CENTER_REGISTRY_URL);49 URI url = URI.create(centerRegistryUrl); 42 50 CenterRegistryConnector connector = new CenterRegistryConnector(url, 30000); 43 51 try { … … 90 98 return centers.get(index); 91 99 } 100 101 private void processContext() { 102 InitialContext context; 103 try { 104 context = new InitialContext(); 105 centerRegistryUrl = (String) context.lookup("java:comp/env/center-registry-url"); 106 } catch (NamingException ex) { 107 LOGGER.log(Level.SEVERE, null, ex); 108 } 109 } 92 110 93 111 } -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/Corpus.java
r5035 r5041 6 6 7 7 /** 8 * Represents information about corpus resource, such as corpus handle (id), 9 * institution, title, description, language(s), etc. Does not store the 10 * information about corpus sub-corpora. 8 11 * 9 12 * @author Yana Panchenko -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/CorpusByInstitutionComparator.java
r3038 r5041 5 5 6 6 /** 7 * Comparator necessary for sorting the corpora according to their 8 * institution name in ascending order. 7 9 * 8 10 * @author Yana Panchenko -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/CorpusByInstitutionDComparator.java
r3038 r5041 5 5 6 6 /** 7 * 7 * Comparator necessary for sorting the corpora according to their 8 * institution name in descending order. 9 * 8 10 * @author Yana Panchenko 9 11 */ -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/CorpusByNameComparator.java
r3038 r5041 5 5 6 6 /** 7 * 7 * Comparator necessary for sorting the corpora according to the corpus name 8 * in ascending order. 9 * 8 10 * @author Yana Panchenko 9 11 */ -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/CorpusByNameDComparator.java
r3038 r5041 5 5 6 6 /** 7 * 7 * Comparator necessary for sorting the corpora according to the corpus name 8 * in descending order. 9 * 8 10 * @author Yana Panchenko 9 11 */ -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/CorpusModelCached.java
r5035 r5041 15 15 16 16 /** 17 * 17 * Represents corpora model where corpora data is taken from cache of the 18 * pre-crawled scan requests. 19 * 18 20 * @author Yana Panchenko 19 21 */ … … 161 163 162 164 private void initCorpusTree() { 163 //System.out.println("Initializing tree");164 //System.out.println(cache);165 165 for (Corpus c : cache.getRootCorpora()) { 166 166 // create node from root corpora 167 DefaultTreeNode<Corpus> rootChildNode = new DefaultTreeNode(c, new ArrayList<DefaultTreeNode<Corpus>>()); 168 169 //System.out.println("Adding children to root node " + c.getEndpointUrl() + " " + c.getHandle()); 167 DefaultTreeNode<Corpus> rootChildNode = 168 new DefaultTreeNode(c, new ArrayList<DefaultTreeNode<Corpus>>()); 170 169 // add children to that node 171 170 addChildren(rootChildNode); 172 173 //System.out.println("Adding root to tree " + c.getEndpointUrl() + " " + c.getHandle());174 171 // add to the root of the model 175 172 super.getRoot().getChildren().add(rootChildNode); … … 182 179 183 180 List<Corpus> corpusChildren = cache.getChildren(corpus); 184 //System.out.println("Getting children of " + corpus.getEndpointUrl() + " " + corpus.getHandle() + "--> " + corpusChildren);185 181 for (Corpus corpusChild : corpusChildren) { 186 182 DefaultTreeNode<Corpus> child = new DefaultTreeNode(corpusChild, new ArrayList<DefaultTreeNode<Corpus>>()); 187 183 parentNode.add(child); 188 //System.out.println("Adding child " + corpusChild.getEndpointUrl() + " " + corpusChild.getHandle());189 184 addChildren(child); 190 185 } -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/CorpusModelI.java
r3058 r5041 7 7 8 8 /** 9 * 9 * Represents corpora model that has access to Corpus objects and their 10 * information about corpora. 11 * 10 12 * @author Yana Panchenko 11 13 */ -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/CorpusModelLive.java
r5039 r5041 1 1 package eu.clarin.sru.fcs.aggregator.sopt; 2 2 3 import eu.clarin.sru.client.SRUClientException;4 import eu.clarin.sru.client.SRUScanRequest;5 import eu.clarin.sru.client.SRUScanResponse;6 import eu.clarin.sru.client.SRUTerm;7 3 import eu.clarin.sru.client.SRUThreadedClient; 8 4 import eu.clarin.sru.fcs.aggregator.app.WebAppListener; 9 5 import eu.clarin.sru.fcs.aggregator.cache.ScanCrawler; 10 import static eu.clarin.sru.fcs.aggregator.sopt.Corpus.ROOT_HANDLE;11 import eu.clarin.sru.fcs.aggregator.util.SRUCQL;12 6 import java.util.ArrayList; 13 7 import java.util.Arrays; … … 17 11 import java.util.Map; 18 12 import java.util.Set; 19 import java.util.concurrent.ExecutionException;20 import java.util.concurrent.Future;21 import java.util.concurrent.TimeUnit;22 import java.util.concurrent.TimeoutException;23 import java.util.logging.Level;24 13 import java.util.logging.Logger; 25 import org.w3c.dom.DocumentFragment;26 import org.w3c.dom.Element;27 import org.w3c.dom.Node;28 import org.w3c.dom.NodeList;29 14 import org.zkoss.zk.ui.Executions; 30 15 import org.zkoss.zul.DefaultTreeModel; … … 33 18 34 19 /** 35 * 20 * Represents corpora model where corpora data is taken from live requests to 21 * corpus endpoints. 22 * 36 23 * @author Yana Panchenko 37 24 */ … … 48 35 } 49 36 37 @Override 50 38 public boolean isCorpusSelected(DefaultTreeNode<Corpus> node) { 51 39 if (selectedCorpora.containsKey(node.getData().getEndpointUrl())) { … … 68 56 * parent's children 69 57 */ 58 @Override 70 59 public void remove(DefaultTreeNode<Corpus> parent, int indexFrom, int indexTo) { 71 60 for (int i = indexTo; i >= indexFrom; i--) { … … 85 74 * parent's children 86 75 */ 76 @Override 87 77 public void remove(DefaultTreeNode<Corpus> parent, int index) { 88 78 parent.getChildren().remove(index); … … 102 92 * parent's children 103 93 */ 94 @Override 104 95 public void insert(DefaultTreeNode<Corpus> parent, int indexFrom, int indexTo, DefaultTreeNode<Corpus>[] newNodes) { 105 96 for (int i = indexFrom; i <= indexTo; i++) { … … 116 107 * @param newNodes New nodes which are appended 117 108 */ 109 @Override 118 110 public void add(DefaultTreeNode<Corpus> parent, DefaultTreeNode<Corpus>[] newNodes) { 119 111 parent.getChildren().addAll(Arrays.asList(newNodes)); … … 128 120 * @param newNode New node which is appended 129 121 */ 122 @Override 130 123 public void add(DefaultTreeNode<Corpus> parent, DefaultTreeNode<Corpus> newNode) { 131 124 parent.getChildren().add(newNode); 132 125 } 133 126 127 @Override 134 128 public boolean hasChildren(Treeitem item) { 135 129 return !item.getTreechildren().getChildren().isEmpty(); … … 165 159 * @param corpus The corpus that the new appended node should contain 166 160 */ 161 @Override 167 162 public void add(DefaultTreeNode<Corpus> parent, Corpus corpus) { 168 163 DefaultTreeNode<Corpus> childNode = createNodeWithTempChildren(corpus); … … 170 165 } 171 166 167 @Override 172 168 public void addToSelected(Corpus data) { 173 169 if (!this.selectedCorpora.containsKey(data.getEndpointUrl())) { … … 178 174 } 179 175 176 @Override 180 177 public void removeFromSelected(Corpus data) { 181 178 if (this.selectedCorpora.containsKey(data.getEndpointUrl())) { … … 184 181 } 185 182 183 @Override 186 184 public Map<String, Set<Corpus>> getSelectedCorpora() { 187 185 return selectedCorpora; … … 192 190 for (Institution instit : startingPoint.getCQLInstitutions()) { 193 191 for (Endpoint endp : instit.getEndpoints()) { 194 //try {195 //TODO: temp for testing, this 3 lines are to be removed:196 //if (//!endp.getUrl().contains("uni-leipzig.de") &&197 // !endp.getUrl().contains("mpi.")198 // && !endp.getUrl().contains("ids-mannheim")199 // && !endp.getUrl().contains("weblicht")) {200 // continue;201 //}202 203 192 List<Corpus> rootCorpora = ScanCrawler.doScan(sruClient, endp.getUrl(), instit, null); 204 193 for (Corpus c : rootCorpora) { … … 206 195 super.getRoot().add(rootChild); 207 196 } 208 // Future<SRUScanResponse> corporaResponse = null;209 // SRUScanRequest corporaRequest = new SRUScanRequest(endp.getUrl());210 // StringBuilder scanClause = new StringBuilder(SRUCQL.SCAN_RESOURCE_PARAMETER);211 // scanClause.append("=");212 // scanClause.append(ROOT_HANDLE);213 // corporaRequest.setScanClause(scanClause.toString());214 // corporaRequest.setExtraRequestData(SRUCQL.SCAN_RESOURCE_INFO_PARAMETER, "true");215 // corporaResponse = sruClient.scan(corporaRequest);216 // SRUScanResponse response = corporaResponse.get(200, TimeUnit.SECONDS);217 // if (response != null && response.hasTerms()) {218 // for (SRUTerm term : response.getTerms()) {219 // Corpus c = new Corpus(instit, endp.getUrl());220 // c.setHandle(term.getValue());221 // c.setDisplayName(term.getDisplayTerm());222 // c.setNumberOfRecords(term.getNumberOfRecords());223 // addExtraInfo(c, term);224 // DefaultTreeNode<Corpus> rootChild = createNodeWithTempChildren(c);225 // super.getRoot().add(rootChild);226 // }227 // } else {228 // Corpus endpCorpus = new Corpus(endp.getInstitution(), endp.getUrl());229 // DefaultTreeNode<Corpus> rootChild = createNodeWithTempChildren(endpCorpus);230 // super.getRoot().add(rootChild);231 // }232 // } catch (SRUClientException ex) {233 // logger.log(Level.SEVERE, "Error accessing corpora {0} at {1} {2} {3}",234 // new String[]{ROOT_HANDLE, endp.getUrl(), ex.getClass().getName(), ex.getMessage()});235 // } catch (InterruptedException ex) {236 // logger.log(Level.SEVERE, "Error accessing corpora {0} at {1} {2} {3}",237 // new String[]{ROOT_HANDLE, endp.getUrl(), ex.getClass().getName(), ex.getMessage()});238 // } catch (ExecutionException ex) {239 // logger.log(Level.SEVERE, "Error accessing corpora {0} at {1} {2} {3}",240 // new String[]{ROOT_HANDLE, endp.getUrl(), ex.getClass().getName(), ex.getMessage()});241 // } catch (TimeoutException ex) {242 // logger.log(Level.SEVERE, "Timeout scanning corpora {0} at {1} {2} {3}",243 // new String[]{ROOT_HANDLE, endp.getUrl(), ex.getClass().getName(), ex.getMessage()});244 // }245 197 } 246 198 … … 249 201 250 202 private Iterable<Corpus> getSubcorpora(Corpus corpus) { 251 //get rid of institution and endpoint? get get this info from corpus203 252 204 return ScanCrawler.doScan(sruClient, corpus.getEndpointUrl(), corpus.getInstitution(), corpus); 253 }254 255 // private Iterable<Corpus> getSubcorpora(Corpus corpus) {256 // logger.info("OBTAINING SUBCORPORA");257 // ArrayList<Corpus> subCorpora = new ArrayList<Corpus>();258 // try {259 //260 //261 // SRUScanRequest corporaRequest = new SRUScanRequest(corpus.getEndpointUrl());262 // StringBuilder scanClause = new StringBuilder(SRUCQL.SCAN_RESOURCE_PARAMETER);263 // scanClause.append("=");264 // String resourceValue = corpus.getHandle();265 // if (corpus.getHandle() == null) {266 // resourceValue = ROOT_HANDLE;267 // }268 // if (Corpus.HANDLE_WITH_SPECIAL_CHARS.matcher(resourceValue).matches()) {269 // resourceValue = "%22" + resourceValue + "%22";270 // }271 // scanClause.append(resourceValue);272 // corporaRequest.setScanClause(scanClause.toString());273 // //!!!TODO request doesn't work for scan with resource handle???274 // //corporaRequest.setExtraRequestData(SRUCQLscan.RESOURCE_INFO_PARAMETER, "true");275 // Future<SRUScanResponse> corporaResponse = sruClient.scan(corporaRequest);276 // logger.info("BEFORE get " + resourceValue);277 // SRUScanResponse response = corporaResponse.get(200, TimeUnit.SECONDS);278 // logger.info("AFTER get " + resourceValue);279 // if (response != null && response.hasTerms()) {280 // for (SRUTerm term : response.getTerms()) {281 // Corpus c = new Corpus(corpus.getInstitution(), corpus.getEndpointUrl());282 // c.setHandle(term.getValue());283 // c.setDisplayName(term.getDisplayTerm());284 // c.setNumberOfRecords(term.getNumberOfRecords());285 // addExtraInfo(c, term);286 // subCorpora.add(c);287 // }288 // logger.info("OBTAINED SUBCORPORA " + subCorpora.size());289 // }290 // } catch (SRUClientException ex) {291 // logger.log(Level.SEVERE, "Error accessing corpora {0} at {1} {2} {3}",292 // new String[]{corpus.getHandle(), corpus.getEndpointUrl(), ex.getClass().getName(), ex.getMessage()});293 // } catch (InterruptedException ex) {294 // logger.log(Level.SEVERE, "Error accessing corpora {0} at {1} {2} {3}",295 // new String[]{corpus.getHandle(), corpus.getEndpointUrl(), ex.getClass().getName(), ex.getMessage()});296 // } catch (ExecutionException ex) {297 // logger.log(Level.SEVERE, "Error accessing corpora {0} at {1} {2} {3}",298 // new String[]{corpus.getHandle(), corpus.getEndpointUrl(), ex.getClass().getName(), ex.getMessage()});299 // } catch (TimeoutException ex) {300 // logger.log(Level.SEVERE, "Timeout scanning corpora {0} at {1} {2} {3}",301 // new String[]{corpus.getHandle(), corpus.getEndpointUrl(), ex.getClass().getName(), ex.getMessage()});302 // }303 //304 // return subCorpora;305 // }306 307 private void addExtraInfo(Corpus c, SRUTerm term) {308 309 DocumentFragment extraInfo = term.getExtraTermData();310 String enDescription = null;311 if (extraInfo != null) {312 NodeList infoNodes = extraInfo.getChildNodes().item(0).getChildNodes();313 for (int i = 0; i < infoNodes.getLength(); i++) {314 Node infoNode = infoNodes.item(i);315 if (infoNode.getNodeType() == Node.ELEMENT_NODE && infoNode.getLocalName().equals("LandingPageURI")) {316 c.setLandingPage(infoNode.getTextContent().trim());317 } else if (infoNode.getNodeType() == Node.ELEMENT_NODE && infoNode.getLocalName().equals("Languages")) {318 NodeList languageNodes = infoNode.getChildNodes();319 for (int j = 0; j < languageNodes.getLength(); j++) {320 if (languageNodes.item(j).getNodeType() == Node.ELEMENT_NODE && languageNodes.item(j).getLocalName().equals("Language")) {321 Element languageNode = (Element) languageNodes.item(j);322 String languageText = languageNode.getTextContent().trim();323 if (!languageText.isEmpty()) {324 c.addLanguage(languageText.trim());325 }326 }327 328 }329 } else if (infoNode.getNodeType() == Node.ELEMENT_NODE && infoNode.getLocalName().equals("Description")) {330 Element element = (Element) infoNode;331 c.setDescription(infoNode.getTextContent().trim());332 //String lang = element.getAttributeNS("http://clarin.eu/fcs/1.0/resource-info", "lang");333 //System.out.println("ATTRIBUTE LANG: " + lang);334 if ("en".equals(element.getAttribute("xml:lang"))) {335 enDescription = infoNode.getTextContent().trim();336 }337 }338 }339 // description in Engish has priority340 if (enDescription != null && !enDescription.isEmpty()) {341 c.setDescription(enDescription);342 }343 }344 205 } 345 206 -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/CorpusRendererLive.java
r5039 r5041 14 14 * renderer. 15 15 * 16 * TODO: mayberemove the loaded sub-resources from the tree when they are17 * closed by the user .16 * TODO: remove the loaded sub-resources from the tree when they are 17 * closed by the user? 18 18 * 19 19 * @author Yana Panchenko -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/Endpoint.java
r5035 r5041 2 2 3 3 /** 4 * Endpoint. Contains the parent Institution. 4 * Endpoint. Contains information about CQL endpoint url and the parent 5 * Institution. 5 6 * 6 7 * @author Yana Panchenko … … 58 59 return true; 59 60 } 60 61 62 63 61 64 62 } -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/Institution.java
r5035 r5041 4 4 5 5 /** 6 * Institution. Can have Endpoint children. 6 * Institution. Contains information about institution name and link (url). 7 * Can have information about its CQL Endpoints. 7 8 * 8 9 * @author Yana Panchenko … … 58 59 } 59 60 61 @Override 60 62 public String toString() { 61 63 if (name != null && name.length() > 0) { -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/Language.java
r5039 r5041 2 2 3 3 /** 4 * 4 * Represents language and contains information about language name and 5 * language codes according to ISO-639 codes. 6 * 5 7 * @author Yana Panchenko 6 8 */ -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sopt/Languages.java
r5039 r5041 12 12 13 13 /** 14 * 14 * Represents collection of languages. 15 * 15 16 * @author Yana Panchenko 16 17 */ -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sresult/Kwic.java
r3038 r5041 4 4 5 5 /** 6 * 6 * Represents keyword in context data view and information about its 7 * PID and reference. 8 * 7 9 * @author Yana Panchenko 8 10 */ -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sresult/SearchResultContent.java
r5039 r5041 31 31 32 32 /** 33 * 34 * @author Yana Panchenko <yana.panchenko@uni-tuebingen.de> 33 * Utility for representing SearchResult data in different formats. 34 * 35 * @author Yana Panchenko 35 36 */ 36 37 public class SearchResultContent { … … 337 338 public String getExportText(List<SearchResult> resultsProcessed) { 338 339 StringBuilder text = new StringBuilder(); 339 //Set<String> resultsLangs = new HashSet<String>(); 340 if (resultsProcessed != null && !resultsProcessed.isEmpty()) { 341 for (SearchResult result : resultsProcessed) { 342 //resultsLangs.addAll(result.getCorpus().getLanguages()); 340 if (resultsProcessed != null && !resultsProcessed.isEmpty()) { 341 for (SearchResult result : resultsProcessed) { 343 342 for (Kwic kwic : result.getKwics()) { 344 343 text.append(kwic.getLeft()); -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/sresult/SearchResultGroupRenderer.java
r5039 r5041 28 28 * the corresponding SearchResult. 29 29 * 30 * @author Yana Panchenko <yana.panchenko@uni-tuebingen.de>30 * @author Yana Panchenko 31 31 */ 32 32 public class SearchResultGroupRenderer { … … 114 114 Label recordsFound = null; 115 115 final Toolbarbutton infoCell = new Toolbarbutton(); 116 117 118 116 119 117 if (resultsItem.getCorpus().getLandingPage() != null) { … … 161 159 sb2.append(" from " + resultsItem.getResponse().getNumberOfRecords() + " found"); 162 160 } 163 164 161 recordsFound = new Label(sb2.toString()); 165 162 recordsFound.setStyle("margin-left:10px;margin-right:30px;"); 166 167 168 163 if (hasInfo) { 169 164 Image infoImage = new Image("img/help-about.png"); 170 165 infoImage.setStyle("margin-right:10px;"); 171 //infoCell.appendChild(infoImage);172 166 infoCell.setImage("img/help-about.png"); 173 167 infoCell.addEventListener(Events.ON_CLICK, new EventListener() { … … 181 175 182 176 } else { 183 //Label label = new Label("");184 //label.setParent(infoCell);185 177 infoCell.setLabel(""); 186 178 } 187 //infoCell.setStyle("margin-left:10px;margin-right:10px;");188 189 //caption.appendChild(name);190 191 179 caption.appendChild(recordsFound); 192 180 if (homeLink != null) { 193 181 caption.appendChild(homeLink); 194 182 } 195 196 183 caption.appendChild(infoCell); 197 184 198 //align="left" width="300px">199 200 201 185 return caption; 202 186 } -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/util/SRUCQL.java
r5035 r5041 2 2 3 3 /** 4 * 5 * @author Yana Panchenko <yana.panchenko@uni-tuebingen.de> 4 * Utility for storing constants related to SRU/CQL specification. 5 * 6 * @author Yana Panchenko 6 7 */ 7 8 public class SRUCQL { -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/util/ZKComp.java
r5039 r5041 1 /*2 * To change this template, choose Tools | Templates3 * and open the template in the editor.4 */5 1 package eu.clarin.sru.fcs.aggregator.util; 6 2 … … 8 4 9 5 /** 10 * 6 * Utility for reusable ZK components created for Aggregator. 7 * 11 8 * @author Yana Panchenko <yana.panchenko@uni-tuebingen.de> 12 9 */ -
SRUAggregator/trunk/src/main/webapp/WEB-INF/web.xml
r5034 r5041 3 3 <description>CLARIN-D Federated Content Search Aggregator</description> 4 4 <display-name>CLARIN-D Federated Content Search Aggregator</display-name> 5 6 <env-entry> 7 <env-entry-name>center-registry-url</env-entry-name> 8 <env-entry-type>java.lang.String</env-entry-type> 9 <env-entry-value>http://centerregistry-clarin.esc.rzg.mpg.de/restxml/</env-entry-value> 10 </env-entry> 11 <env-entry> 12 <env-entry-name>weblicht-url</env-entry-name> 13 <env-entry-type>java.lang.String</env-entry-type> 14 <env-entry-value>https://weblicht.sfs.uni-tuebingen.de/WebLicht-4/?input=</env-entry-value> 15 </env-entry> 16 <env-entry> 17 <env-entry-name>update-interval-unit</env-entry-name> 18 <env-entry-type>java.lang.String</env-entry-type> 19 <env-entry-value>HOURS</env-entry-value> 20 </env-entry> 21 <env-entry> 22 <env-entry-name>update-interval</env-entry-name> 23 <env-entry-type>java.lang.Integer</env-entry-type> 24 <env-entry-value>6</env-entry-value> 25 </env-entry> 26 <env-entry> 27 <env-entry-name>scan-max-depth</env-entry-name> 28 <env-entry-type>java.lang.Integer</env-entry-type> 29 <env-entry-value>3</env-entry-value> 30 </env-entry> 31 <!-- Value of this property (data.location) should be specified in CATALINA_OPT 32 (e.g. inside /etc/init.d/tomcat7*), unless the default is used. 33 Currently defaults to /data/ or user.home --> 34 <env-entry> 35 <env-entry-name>data-location-property</env-entry-name> 36 <env-entry-type>java.lang.String</env-entry-type> 37 <env-entry-value>data.location</env-entry-value> 38 </env-entry> 39 <!-- Folder for the data specific to the current Aggregator application, 40 supposed to be inside the data location folder above --> 41 <env-entry> 42 <env-entry-name>aggregator-folder</env-entry-name> 43 <env-entry-type>java.lang.String</env-entry-type> 44 <env-entry-value>fcsAggregator</env-entry-value> 45 </env-entry> 46 5 47 <listener> 6 48 <description>ZK listener for session cleanup</description> 7 49 <listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class> 8 50 </listener> 51 9 52 <servlet> 10 53 <description>ZK loader for ZUML pages</description> … … 61 104 <welcome-file>index.htm</welcome-file> 62 105 </welcome-file-list> 106 63 107 </web-app>
Note: See TracChangeset
for help on using the changeset viewer.