Last change
on this file since 6715 was
6715,
checked in by davor.ostojic@oeaw.ac.at, 9 years ago
|
cross-mapping
vocabulary-entry instead of invertedMap
|
-
Property svn:mime-type set to
text/plain
|
File size:
1.3 KB
|
Line | |
---|
1 | package eu.clarin.cmdi.vlo.importer; |
---|
2 | |
---|
3 | import java.util.ArrayList; |
---|
4 | import java.util.HashMap; |
---|
5 | import java.util.List; |
---|
6 | import java.util.Map; |
---|
7 | import java.util.Map.Entry; |
---|
8 | import java.util.TreeMap; |
---|
9 | import java.util.regex.Matcher; |
---|
10 | import java.util.regex.Pattern; |
---|
11 | |
---|
12 | import org.slf4j.Logger; |
---|
13 | import org.slf4j.LoggerFactory; |
---|
14 | |
---|
15 | import eu.clarin.cmdi.vlo.pojo.Variant; |
---|
16 | import eu.clarin.cmdi.vlo.pojo.VariantsMap; |
---|
17 | |
---|
18 | /** |
---|
19 | * Adds information about the affiliation of a metadata file to a national |
---|
20 | * project (like CLARIN-X etc.) into facet nationalProject |
---|
21 | * |
---|
22 | * @author Thomas Eckart |
---|
23 | * |
---|
24 | */ |
---|
25 | public class NationalProjectPostProcessor extends PostProcessorsWithVocabularyMap { |
---|
26 | |
---|
27 | private final static Logger LOG = LoggerFactory.getLogger(NationalProjectPostProcessor.class); |
---|
28 | |
---|
29 | /** |
---|
30 | * Returns the national project based on the mapping in |
---|
31 | * Configuration.getNationalProjectMapUrl() If no mapping was found empty |
---|
32 | * String is returned |
---|
33 | * |
---|
34 | * @return |
---|
35 | */ |
---|
36 | @Override |
---|
37 | public List<String> process(String value) { |
---|
38 | List<String> resultList = new ArrayList<String>(); |
---|
39 | resultList.add(normalize(value.trim(), "")); |
---|
40 | |
---|
41 | return resultList; |
---|
42 | } |
---|
43 | |
---|
44 | |
---|
45 | @Override |
---|
46 | public String getNormalizationMapURL() { |
---|
47 | return MetadataImporter.config.getNationalProjectMapping(); |
---|
48 | } |
---|
49 | |
---|
50 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.