Project

General

Profile

1
package eu.dnetlib.organizations.controller;
2

    
3
import java.util.Arrays;
4
import java.util.HashMap;
5
import java.util.List;
6
import java.util.Map;
7

    
8
import org.springframework.web.bind.annotation.RequestMapping;
9
import org.springframework.web.bind.annotation.RequestMethod;
10
import org.springframework.web.bind.annotation.RestController;
11

    
12
@RestController
13
@RequestMapping("/api/vocabularies")
14
public class VocabulariesController {
15

    
16
	@RequestMapping(value = "", method = RequestMethod.GET)
17
	public Map<String, List<String>> ListVocabularies() {
18
		final Map<String, List<String>> vocs = new HashMap<>();
19
		vocs.put("orgTypes", Arrays.asList("Archive", "Company", "Education", "Facility", "Government", "Healthcare", "Nonprofit", "Other"));
20
		vocs.put("idTypes", Arrays.asList("CNRS", "FundRef", "HESA", "ISNI", "OrgRef", "UCAS", "UKPRN", "Wikidata", "grid.ac"));
21
		vocs.put("relTypes", Arrays.asList("Child", "Parent", "Related", "Other"));
22
		vocs.put("languages", Arrays.asList("aa", "af", "am", "ar", "as", "az", "ba", "be", "bg", "bn", "br", "bs", "ca", "ch", "co", "cs", "cy", "da",
23
				"de", "dv", "dz", "el", "en", "eo", "es", "et", "eu", "fa", "fi", "fr", "fy", "ga", "gd", "gl", "gu", "he", "hi", "hr", "hu", "hy", "id", "is",
24
				"it", "iu", "ja", "jv", "ka", "kk", "kl", "km", "kn", "ko", "ku", "ky", "la", "lb", "lo", "lt", "lv", "mg", "mi", "mk", "ml", "mn", "mr", "ms",
25
				"mt", "my", "nb", "ne", "nl", "nn", "no", "oc", "or", "pa", "pl", "ps", "pt", "rm", "ro", "ru", "rw", "sa", "sd", "si", "sk", "sl", "so", "sq",
26
				"sr", "sv", "sw", "ta", "te", "tg", "th", "tk", "tl", "tr", "tt", "ug", "uk", "ur", "uz", "vi", "xh", "yo", "zh", "zu"));
27
		return vocs;
28
	}
29

    
30
}
(3-3/3)