source: vlo/trunk/vlo-commons/src/main/java/eu/clarin/cmdi/vlo/FacetConstants.java @ 6313

Last change on this file since 6313 was 6313, checked in by Twan Goosen, 9 years ago

renamed languageName facet to _languageName (as it is not directly visible to user) and defined a query alias 'language'
refs #770

File size: 4.3 KB
Line 
1package eu.clarin.cmdi.vlo;
2
3/**
4 * Definition of facet, resource type and URL constants.
5 */
6public class FacetConstants {
7
8    public static final String FIELD_NAME = "name";
9    public static final String FIELD_ID = "id";
10    public static final String FIELD_DATA_PROVIDER = "dataProvider";
11    public static final String FIELD_DESCRIPTION = "description";
12    public static final String FIELD_COLLECTION = "collection";
13    public static final String FIELD_COUNTRY = "country";
14    public static final String FIELD_CONTINENT = "continent";
15    public static final String FIELD_AVAILABILITY = "availability";
16    public static final String FIELD_LICENSE = "license";
17    public static final String FIELD_LANGUAGE_CODE = "languageCode";
18    public static final String FIELD_TEMPORAL_COVERAGE = "temporalCoverage";
19    public static final String FIELD_GENRE = "genre";
20    public static final String FIELD_MODALITY = "modality";
21    public static final String FIELD_SUBJECT = "subject";
22    public static final String FIELD_ORGANISATION = "organisation";
23    public static final String FIELD_RESOURCE_CLASS = "resourceClass";
24    public static final String FIELD_FORMAT = "format";
25    public static final String FIELD_PROJECT_NAME = "projectName";
26    public static final String FIELD_COMPLETE_METADATA = "metadataSource";
27    public static final String FIELD_NATIONAL_PROJECT = "nationalProject";
28    public static final String FIELD_KEYWORDS = "keywords";
29    /**
30     * Solr pseudo-field that reveals the ranking score
31     *
32     * @see
33     * https://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_see_the_relevancy_scores_for_search_results
34     */
35    public static final String FIELD_SOLR_SCORE = "score";
36
37    //The _ facets are not meant to be shown to users.
38    public static final String FIELD_SELF_LINK = "_selfLink";
39    public static final String FIELD_FILENAME = "_fileName";
40    public static final String FIELD_RESOURCE = "_resourceRef";
41    public static final String FIELD_RESOURCE_COUNT = "_resourceRefCount";
42    public static final String FIELD_CLARIN_PROFILE = "_componentProfile";
43    public static final String FIELD_SEARCH_SERVICE = "_contentSearchRef";
44    public static final String FIELD_LAST_SEEN = "_lastSeen";
45    public static final String FIELD_HIERARCHY_WEIGHT = "_hierarchyWeight";
46    public static final String FIELD_IS_PART_OF = "_isPartOf";
47    public static final String FIELD_HAS_PART = "_hasPart";
48    public static final String FIELD_HAS_PART_COUNT = "_hasPartCount";
49    public static final String FIELD_LANGUAGE_NAME = "_languageName";
50
51    /**
52     * Facet constant associated with the landing page type.
53     */
54    public static final String FIELD_LANDINGPAGE = "_landingPageRef";
55    /**
56     * Facet constant associated with the search page type.
57     */
58    public static final String FIELD_SEARCHPAGE = "_searchPageRef";
59
60    //Deprecated fields
61    public static final String DEPRECATED_FIELD_LANGUAGE = "language";
62
63    //Normalized mimeTypes
64    public static final String RESOURCE_TYPE_AUDIO = "audio";
65    public static final String RESOURCE_TYPE_VIDEO = "video";
66    public static final String RESOURCE_TYPE_TEXT = "text";
67    public static final String RESOURCE_TYPE_IMAGE = "image";
68    public static final String RESOURCE_TYPE_ANNOTATION = "annotation";
69
70    /**
71     * Handle proxy base url (to replace part that matches
72     * {@link #HANDLE_PREFIX})
73     */
74    public static final String HANDLE_PROXY = "http://hdl.handle.net/";
75    public static final String HANDLE_MPI_PREFIX = "hdl:1839";
76    public static final String HANDLE_PREFIX = "hdl:";
77    public static final String TEST_HANDLE_MPI_PREFIX = "test-hdl:1839";
78    public static final String FIELD_RESOURCE_SPLIT_CHAR = "|";
79    public static final String URN_NBN_PREFIX = "urn:nbn";
80    public static final String URN_NBN_RESOLVER_URL = "http://www.nbn-resolving.org/redirect/";
81
82    /**
83     * regular expression that matches the language prefix in description (group
84     * 1 matches the ISO639-3 language code)
85     */
86    public static final String DESCRIPTION_LANGUAGE_PATTERN = "^\\{lang='([a-z]{3})'\\}";
87
88    /**
89     * regular expression that matches the syntax of the 'languageCode' field
90     * (with either a language code or a name as indicated by the prefix)
91     */
92    public static final String LANGUAGE_CODE_PATTERN = "(name|code):(.*)";
93}
Note: See TracBrowser for help on using the repository browser.