source: vlo/branches/vlo-3.3-oeaw/vlo-importer/src/main/java/eu/clarin/cmdi/vlo/importer/NationalProjectPostProcessor.java @ 6715

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 
1package eu.clarin.cmdi.vlo.importer;
2
3import java.util.ArrayList;
4import java.util.HashMap;
5import java.util.List;
6import java.util.Map;
7import java.util.Map.Entry;
8import java.util.TreeMap;
9import java.util.regex.Matcher;
10import java.util.regex.Pattern;
11
12import org.slf4j.Logger;
13import org.slf4j.LoggerFactory;
14
15import eu.clarin.cmdi.vlo.pojo.Variant;
16import 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 */
25public 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.