source: SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/scan/Institution.java @ 5893

Last change on this file since 5893 was 5893, checked in by emanuel.dima@uni-tuebingen.de, 9 years ago

switching to throttled client with statistics, work in progress; more UI improvements

File size: 927 bytes
Line 
1package eu.clarin.sru.fcs.aggregator.scan;
2
3import java.util.*;
4
5/**
6 * Institution. Contains information about institution name and link (url). Can
7 * have information about its CQL Endpoints.
8 *
9 * @author Yana Panchenko
10 */
11public class Institution {
12
13        private String name;
14        private String link;
15        private Set<String> endpoints;
16
17        // for JSON deserialization
18        public Institution() {
19        }
20
21        public Institution(String name, String link) {
22                this.name = name;
23                this.link = link;
24                this.endpoints = new LinkedHashSet<String>();
25        }
26
27        public String addEndpoint(String endpointUrl) {
28                endpoints.add(endpointUrl);
29                return endpointUrl;
30        }
31
32        public String getName() {
33                return name;
34        }
35
36        public String getLink() {
37                return link;
38        }
39
40        public Set<String> getEndpoints() {
41                return this.endpoints;
42        }
43
44        @Override
45        public String toString() {
46                if (name != null && name.length() > 0) {
47                        return name;
48                } else {
49                        return link;
50                }
51        }
52
53}
Note: See TracBrowser for help on using the repository browser.