Changeset 6153 for SRUAggregator
- Timestamp:
- 04/22/15 07:47:57 (9 years ago)
- Location:
- SRUAggregator/trunk
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUAggregator/trunk/build.sh
r6065 r6153 6 6 JSDIR=$ASSETDIR/js 7 7 8 if [ ! -e bower_components ] 8 RUN_BOWER= 9 BUILD_JSX=1 10 BUILD_JAR= 11 BUILD_GO= 12 RUN_JAR= 13 RUN_JAR_PRODUCTION= 14 15 while [[ $# > 0 ]] 16 do 17 key="$1" 18 # echo $# " :" $key 19 case $key in 20 --bower) 21 RUN_BOWER=1 22 ;; 23 --jsx) 24 BUILD_JSX=1 25 ;; 26 --jar) 27 BUILD_JAR=1 28 ;; 29 --run) 30 RUN_JAR=1 31 ;; 32 --run-production) 33 RUN_JAR_PRODUCTION=1 34 ;; 35 *) 36 echo "Unknown option:" $1 37 exit 1 38 ;; 39 esac 40 shift 41 done 42 43 if [ $RUN_BOWER ] 9 44 then 10 45 mkdir -p $LIBDIR … … 27 62 fi 28 63 29 for f in $JSDIR/*.jsx; do 30 cp -v $f $JSDIR/`basename $f .jsx`.js; 31 done 32 node_modules/react-tools/bin/jsx --no-cache-dir $JSDIR $JSDIR 64 if [ $BUILD_JSX ] 65 then 66 echo; echo "---- jsx" 67 for f in $JSDIR/*.jsx; do 68 cp -v $f $JSDIR/`basename $f .jsx`.js; 69 done 70 node_modules/react-tools/bin/jsx --no-cache-dir $JSDIR $JSDIR 71 fi 33 72 34 if [ "$1" == "--jar"]73 if [ $BUILD_JAR ] 35 74 then 75 echo; echo "---- mvn clean package" 36 76 mvn -q clean package 37 77 fi 38 78 39 # Run in production: 40 #java -jar target/Aggregator2-2.0.0.jar server aggregator.yml 79 if [ $RUN_JAR ] 80 then 81 echo; echo "---- run devel" 82 JAR=`find target -iname 'Aggregator2-*.jar'` 83 echo java -cp src/main/resources:$JAR eu.clarin.sru.fcs.aggregator.app.Aggregator server aggregator_development.yml 84 java -cp src/main/resources:$JAR eu.clarin.sru.fcs.aggregator.app.Aggregator server aggregator_development.yml 85 fi 41 86 42 # Run for development: 43 # java -cp src/main/resources:target/Aggregator2-2.0.0.jar eu.clarin.sru.fcs.aggregator.app.Aggregator server aggregator_development.yml 87 if [ $RUN_JAR_PRODUCTION ] 88 then 89 echo; echo "---- run production" 90 JAR=`find target -iname 'Aggregator2-*.jar'` 91 echo java -jar $JAR server aggregator.yml 92 java -jar $JAR server aggregator.yml 93 fi -
SRUAggregator/trunk/pom.xml
r6145 r6153 8 8 <groupId>eu.clarin.sru.fcs</groupId> 9 9 <artifactId>aggregator</artifactId> 10 <version>2.0.0-beta-3 6</version>10 <version>2.0.0-beta-39</version> 11 11 <name>FCS Aggregator</name> 12 12 -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/app/Aggregator.java
r6145 r6153 68 68 * @author edima 69 69 * 70 * TODO: update comments everywhere71 *72 70 * TODO: add some basic docs 73 71 * -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/app/ErrorHandler.java
r6131 r6153 11 11 12 12 /** 13 * @author edima 13 14 * 14 * @author edima 15 * The Aggregator is a single web page application, and most of the URLs are 16 * routed and handled by the javascript client, not in the server. 17 * Therefore, whenever a 404 pops up in the server, it probably means that the 18 * URL should be handled by javascript, and to do that we must return the normal 19 * index.html HTML code. 20 * 21 * Sometimes the server gets POST calls from external apps (VLO, for example). 22 * We must keep the special parameters which are sent to the Aggregator and 23 * pass them to the js client, and, again, serve the normal index.html file. 15 24 */ 16 25 public class ErrorHandler extends org.eclipse.jetty.server.handler.ErrorHandler { 17 26 18 private static final org.slf4j.Logger log = LoggerFactory.getLogger( Aggregator.class);27 private static final org.slf4j.Logger log = LoggerFactory.getLogger(ErrorHandler.class); 19 28 20 29 public static final String PARAM_QUERY = "query"; -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/client/GenericClient.java
r6132 r6153 12 12 * 13 13 * @author edima 14 * 15 * This is a SRUThreadedClient wrapper that only allows a limited number of 16 * requests per endpoint, no matter what SRU operation the requests make. 17 * This class is an internal utility class, used by the ThrottledClient class. 14 18 */ 15 19 class GenericClient { -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/client/ThrottledClient.java
r6132 r6153 14 14 /** 15 15 * @author edima 16 * 17 * This is a SRUThreadedClient wrapper that only allows a limited number of 18 * requests per endpoint, depending on the requests type. To determine the 19 * number of requests for each endpoint the user must provide a callback. 16 20 */ 17 21 public class ThrottledClient { -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/rest/DataTransfer.java
r6043 r6153 14 14 * @author Yana Panchenko 15 15 * @author edima 16 * 17 * A utility class that allows moving data from the Aggregator server to some 18 * public location (currently the drop-off service). 16 19 */ 17 20 public class DataTransfer { -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/rest/RestService.java
r6131 r6153 43 43 * 44 44 * @author edima 45 * The REST API of the Aggregator (actually, it's a HTTP API, not very restful). 46 * 45 47 */ 46 48 @Produces(MediaType.APPLICATION_JSON) -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/Corpora.java
r5957 r6153 11 11 /** 12 12 * Implementation of the cached scan data (endpoints descriptions) that stores 13 * the cache in memory in maps. 13 * the cache in memory in maps. Must be thread safe, updates in the maps are 14 * asynchronous. 14 15 * 15 16 * @author yanapanchenko -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/Corpus.java
r6065 r6153 12 12 /** 13 13 * Represents information about corpus resource, such as corpus handle (id), 14 * institution, title, description, language(s), etc. Does notstore the14 * institution, title, description, language(s), etc. Also store the 15 15 * information about corpus sub-corpora. 16 16 * -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/Diagnostic.java
r6092 r6153 3 3 import com.fasterxml.jackson.annotation.JsonProperty; 4 4 5 /* 5 /** 6 6 * @author edima 7 7 */ -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/EndpointUrlFilterAllow.java
r5893 r6153 6 6 7 7 /** 8 * Allow takes precedence over deny; default is to include 9 * everything. 10 * Filters for the cache of scan data (endpoint/resources 11 * descriptions) based on 12 * endpoint url. 8 * Allow takes precedence over deny; default is to include everything. 9 * Filters for the cache of scan data (endpoint/resources descriptions) 10 * based on endpoint url. 13 11 * 14 12 * @author yanapanchenko -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/EndpointUrlFilterDeny.java
r5893 r6153 6 6 7 7 /** 8 * Allow takes precedence over deny; default is to include 9 * everything. 10 * Filters for the cache of scan data (endpoint/resources 11 * descriptions) based on 12 * endpoint url. 8 * Allow takes precedence over deny; default is to include everything. 9 * Filters for the cache of scan data (endpoint/resources descriptions) 10 * based on endpoint url. 13 11 * 14 12 * @author yanapanchenko -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/JsonException.java
r5971 r6153 6 6 * 7 7 * @author edima 8 * 9 * A Json representation of an exception in the scan/search process, to be sent 10 * to the JS client 8 11 */ 9 12 public class JsonException { -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/ScanCrawlTask.java
r6093 r6153 14 14 * @author yanapanchenko 15 15 * @author edima 16 * 17 * This task is run by an executor every now and then to scan for new endpoints 16 18 */ 17 19 public class ScanCrawlTask implements Runnable { -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/Statistics.java
r6131 r6153 12 12 * 13 13 * @author edima 14 * 15 * Stores statistics information about scans or searches. The info is then sent 16 * to the JS client and displayed in the /Aggregator/stats page. 14 17 */ 15 18 public class Statistics { -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/search/Result.java
r6097 r6153 25 25 26 26 /** 27 * Represents the results of a SRU search-retrieve operation request. It 28 * contains the endpoint/corpus (if specified in the request) to which a request 29 * was sent, and the corresponding SRU search-retrieve response. 27 * The results of a SRU search-retrieve operation for a particular corpus. 28 * Its content is json-serialized and sent to the JS client for display. 30 29 * 31 30 * @author Yana Panchenko -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/search/Search.java
r6131 r6153 20 20 21 21 /** 22 * Class representing a search operation22 * A search operation done on a list of corpora. 23 23 * 24 24 * @author Yana Panchenko -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/util/CounterLatch.java
r5771 r6153 4 4 5 5 /** 6 * @author edima 6 7 * 7 * @author edima 8 * Similar to a java CountDownLatch, but can also count up. 9 * 8 10 */ 9 11 public class CounterLatch { -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/util/LanguagesISO693.java
r6081 r6153 14 14 15 15 /** 16 * Represents collection of languages.16 * Utility class to convert between various language codes. 17 17 * 18 18 * @author Yana Panchenko … … 28 28 public static class Language { 29 29 30 // code is ISO-639-3 (3 letters) while code_ 2is ISO-639-1 (2 letters)30 // code is ISO-639-3 (3 letters) while code_1 is ISO-639-1 (2 letters) 31 31 private String code_3, code_1, name; 32 32 -
SRUAggregator/trunk/src/main/resources/assets/js/main.js
r6145 r6153 3 3 "use strict"; 4 4 5 var VERSION = window.MyAggregator.VERSION = "VERSION 2.0.0-beta-3 6";5 var VERSION = window.MyAggregator.VERSION = "VERSION 2.0.0-beta-38"; 6 6 7 7 var URLROOT = window.MyAggregator.URLROOT = … … 141 141 React.createElement("ul", {id: "CLARIN_header_right", className: "nav navbar-nav navbar-right"}, 142 142 React.createElement("li", null, 143 React.createElement("div", {id: "clarinservices", style: {padding: 10}})143 React.createElement("div", {id: "clarinservices", style: {padding:5}}) 144 144 ), 145 145 this.renderLogin() -
SRUAggregator/trunk/src/main/resources/assets/js/main.jsx
r6145 r6153 3 3 "use strict"; 4 4 5 var VERSION = window.MyAggregator.VERSION = "VERSION 2.0.0-beta-3 6";5 var VERSION = window.MyAggregator.VERSION = "VERSION 2.0.0-beta-39"; 6 6 7 7 var URLROOT = window.MyAggregator.URLROOT = -
SRUAggregator/trunk/src/main/resources/assets/js/search.js
r6145 r6153 153 153 Corpora.prototype.setAggregationContext = function(endpoints2handles) { 154 154 var selectSubTree = function(select, corpus) { 155 corpus.selected = false;155 corpus.selected = select; 156 156 this.recurseCorpora(corpus.subCorpora, function(c) { c.selected = corpus.selected; }); 157 157 }; … … 253 253 query: this.state.query || json.query || '', 254 254 }); 255 256 // // for testing aggregation context 257 // json['x-aggregation-context'] = { 258 // 'EKUT': ["http://hdl.handle.net/11858/00-1778-0000-0001-DDAF-D"] 259 // }; 255 260 256 261 if (json['x-aggregation-context']) { -
SRUAggregator/trunk/src/main/resources/assets/js/search.jsx
r6145 r6153 153 153 Corpora.prototype.setAggregationContext = function(endpoints2handles) { 154 154 var selectSubTree = function(select, corpus) { 155 corpus.selected = false;155 corpus.selected = select; 156 156 this.recurseCorpora(corpus.subCorpora, function(c) { c.selected = corpus.selected; }); 157 157 }; … … 253 253 query: this.state.query || json.query || '', 254 254 }); 255 256 // // for testing aggregation context 257 // json['x-aggregation-context'] = { 258 // 'EKUT': ["http://hdl.handle.net/11858/00-1778-0000-0001-DDAF-D"] 259 // }; 255 260 256 261 if (json['x-aggregation-context']) {
Note: See TracChangeset
for help on using the changeset viewer.