Changeset 7150 for SRUAggregator
- Timestamp:
- 09/28/17 09:09:03 (7 years ago)
- Location:
- SRUAggregator/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUAggregator/trunk/aggregator.yml
r6254 r7150 3 3 # additionalCQLEndpoints: 4 4 # - https://clarin.ids-mannheim.de/digibibsru-new 5 # additionalFCSEndpoints: 5 6 7 #AGGREGATOR_FILE_PATH: /var/lib/aggregator/fcsAggregatorCorpora.json 8 #AGGREGATOR_FILE_PATH_BACKUP: /var/lib/aggregator/fcsAggregatorCorpora.backup.json 6 9 AGGREGATOR_FILE_PATH: /var/lib/aggregator/fcsAggregatorCorpora.json 7 10 AGGREGATOR_FILE_PATH_BACKUP: /var/lib/aggregator/fcsAggregatorCorpora.backup.json … … 37 40 applicationContextPath: /Aggregator 38 41 type: simple 42 #rootPath: '/rest/*' 39 43 connector: 40 44 type: http … … 52 56 appenders: 53 57 - type: file 58 #currentLogFilename: /var/log/aggregator/access.log 54 59 currentLogFilename: /var/log/aggregator/access.log 60 #archivedLogFilenamePattern: /var/log/aggregator/access-%d.log.gz 55 61 archivedLogFilenamePattern: /var/log/aggregator/access-%d.log.gz 56 62 archivedFileCount: 5 63 # appenders: 64 # - type: console -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/FCSProtocolVersion.java
r7022 r7150 9 9 LEGACY, // https://trac.clarin.eu/wiki/FCS-specification 10 10 VERSION_1, // https://trac.clarin.eu/wiki/FCS/Specification 11 VERSION_2, // https://trac.clarin.eu/wiki/ Taskforces/FCS/FCS-Specification-Draft11 VERSION_2, // https://trac.clarin.eu/wiki/FCS/FCS-Specification-v2 12 12 } -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/Institution.java
r5957 r7150 28 28 endpoints.add(new Endpoint(endpointUrl, FCSProtocolVersion.LEGACY)); 29 29 return endpointUrl; 30 } 31 32 public String addEndpoint(String endpointUrl, FCSProtocolVersion version) { 33 if (version.equals(FCSProtocolVersion.VERSION_2)) { 34 endpoints.add(new Endpoint(endpointUrl, FCSProtocolVersion.VERSION_2)); 35 } else if (version.equals(FCSProtocolVersion.VERSION_1)) { 36 endpoints.add(new Endpoint(endpointUrl, FCSProtocolVersion.VERSION_1)); 37 } else if (version.equals(FCSProtocolVersion.LEGACY)) { 38 endpoints.add(new Endpoint(endpointUrl, FCSProtocolVersion.LEGACY)); 39 } else { 40 endpoints.add(new Endpoint(endpointUrl, FCSProtocolVersion.LEGACY)); 41 } 42 return endpointUrl; 30 43 } 31 44 -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/ScanCrawlTask.java
r6396 r7150 31 31 private String centerRegistryUrl; 32 32 private List<URL> additionalCQLEndpoints; 33 private List<URL> additionalFCSEndpoints; 33 34 34 35 public ScanCrawlTask(ThrottledClient sruClient, String centerRegistryUrl, 35 int cacheMaxDepth, List<URL> additionalCQLEndpoints, 36 int cacheMaxDepth, 37 List<URL> additionalCQLEndpoints, 38 List<URL> additionalFCSEndpoints, 36 39 EndpointFilter filter, 37 40 AtomicReference<Corpora> corporaAtom, … … 44 47 this.cacheMaxDepth = cacheMaxDepth; 45 48 this.additionalCQLEndpoints = additionalCQLEndpoints; 49 this.additionalFCSEndpoints = additionalFCSEndpoints; 46 50 this.filter = filter; 47 51 this.corporaAtom = corporaAtom; … … 64 68 if (additionalCQLEndpoints != null && !additionalCQLEndpoints.isEmpty()) { 65 69 institutions.add(0, 66 new Institution("Unknown Institution ", null) {70 new Institution("Unknown Institution, legacy", null) { 67 71 { 68 72 for (URL u : additionalCQLEndpoints) { 69 addEndpoint(u.toExternalForm()); 73 addEndpoint(u.toExternalForm(), FCSProtocolVersion.LEGACY); 74 } 75 } 76 }); 77 } 78 if (additionalFCSEndpoints != null && !additionalFCSEndpoints.isEmpty()) { 79 institutions.add(0, 80 new Institution("Unknown Institution, FCS v2.0", null) { 81 { 82 for (URL u : additionalFCSEndpoints) { 83 addEndpoint(u.toExternalForm(), FCSProtocolVersion.VERSION_2); 70 84 } 71 85 } -
SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/Statistics.java
r7022 r7150 172 172 EndpointStats stats = getEndpointStats(institution, endpoint); 173 173 synchronized (stats.lock) { 174 stats.version = endpoint.getProtocol() == FCSProtocolVersion.VERSION_2? FCSProtocolVersion.VERSION_2 : FCSProtocolVersion.VERSION_1;174 stats.version = endpoint.getProtocol().equals(FCSProtocolVersion.VERSION_2) ? FCSProtocolVersion.VERSION_2 : FCSProtocolVersion.VERSION_1; 175 175 } 176 176 }
Note: See TracChangeset
for help on using the changeset viewer.