source: vlo/trunk/vlo_webapp/src/main/java/eu/clarin/cmdi/vlo/Configuration.java @ 1007

Last change on this file since 1007 was 1007, checked in by patdui, 13 years ago
  • added resourceType facet and added a list of resources on the show result page.
  • added i18n properties
  • fixed some olac facets supporting multiple patterns to match a facet
File size: 1.7 KB
Line 
1package eu.clarin.cmdi.vlo;
2
3import java.io.UnsupportedEncodingException;
4import java.net.URLEncoder;
5
6/**
7 * see applicationContext.xml resource for proper values.
8 *
9 **/
10public final class Configuration {
11   
12    private final static Configuration INSTANCE = new Configuration();
13
14    public static final String CONFIG_FILE = "applicationContext.xml";
15
16    private String solrUrl;
17
18    private String imdiBrowserUrl;// = "http://corpus1.mpi.nl/ds/imdi_browser?openpath=";
19
20    private String[] facetFields;// = new String[] { "origin", "organisation", "continent", "genre", "country", "subject", "language" };
21
22    private String handleServerUrl; //"http://hdl.handle.net/"
23
24    private Configuration() {
25    }
26
27    public static Configuration getInstance() {
28        return INSTANCE;
29    }
30
31    public void setSolrUrl(String solrUrl) {
32        this.solrUrl = solrUrl;
33    }
34
35    public String getSolrUrl() {
36        return solrUrl;
37    }
38
39    public void setIMDIBrowserUrl(String imdiBrowserUrl) {
40        this.imdiBrowserUrl = imdiBrowserUrl;
41    }
42
43    public String getIMDIBrowserUrl(String handle) {
44        String result;
45        try {
46            result = imdiBrowserUrl + URLEncoder.encode(handle, "UTF-8");
47        } catch (UnsupportedEncodingException e) {
48            result = imdiBrowserUrl + handle;
49        }
50        return result;
51    }
52
53    public String[] getFacetFields() {
54        return facetFields;
55    }
56
57    public void setFacetFields(String[] facetFields) {
58        this.facetFields = facetFields;
59    }
60
61    public String getHandleServerUrl() {
62        return handleServerUrl;
63    }
64
65    public void setHandleServerUrl(String handleServerUrl) {
66        this.handleServerUrl = handleServerUrl;
67    }
68   
69   
70}
Note: See TracBrowser for help on using the repository browser.