1 | package eu.clarin.cmdi.vlo; |
---|
2 | |
---|
3 | /** |
---|
4 | * Definition of facet, resource type and URL constants. |
---|
5 | */ |
---|
6 | public 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_LICENSE = "license"; |
---|
16 | public static final String FIELD_LANGUAGE_CODE = "languageCode"; |
---|
17 | public static final String FIELD_YEAR = "year"; |
---|
18 | public static final String FIELD_GENRE = "genre"; |
---|
19 | public static final String FIELD_MODALITY = "modality"; |
---|
20 | public static final String FIELD_SUBJECT = "subject"; |
---|
21 | public static final String FIELD_ORGANISATION = "organisation"; |
---|
22 | public static final String FIELD_RESOURCE_CLASS = "resourceClass"; |
---|
23 | public static final String FIELD_FORMAT = "format"; |
---|
24 | public static final String FIELD_PROJECT_NAME = "projectName"; |
---|
25 | public static final String FIELD_COMPLETE_METADATA = "metadataSource"; |
---|
26 | public static final String FIELD_NATIONAL_PROJECT = "nationalProject"; |
---|
27 | public static final String FIELD_KEYWORDS = "keywords"; |
---|
28 | |
---|
29 | //The _ facets are not meant to be shown to users. |
---|
30 | public static final String FIELD_SELF_LINK = "_selfLink"; |
---|
31 | public static final String FIELD_FILENAME = "_fileName"; |
---|
32 | public static final String FIELD_RESOURCE = "_resourceRef"; |
---|
33 | public static final String FIELD_CLARIN_PROFILE = "_componentProfile"; |
---|
34 | public static final String FIELD_SEARCH_SERVICE = "_contentSearchRef"; |
---|
35 | public static final String FIELD_LAST_SEEN = "_lastSeen"; |
---|
36 | |
---|
37 | /** |
---|
38 | * Facet constant associated with the landing page type. |
---|
39 | */ |
---|
40 | public static final String FIELD_LANDINGPAGE = "_landingPageRef"; |
---|
41 | /** |
---|
42 | * Facet constant associated with the search page type. |
---|
43 | */ |
---|
44 | public static final String FIELD_SEARCHPAGE = "_searchPageRef"; |
---|
45 | |
---|
46 | //Deprecated fields |
---|
47 | public static final String DEPRECATED_FIELD_LANGUAGE = "language"; |
---|
48 | |
---|
49 | //Normalized mimeTypes |
---|
50 | public static final String RESOURCE_TYPE_AUDIO = "audio"; |
---|
51 | public static final String RESOURCE_TYPE_VIDEO = "video"; |
---|
52 | public static final String RESOURCE_TYPE_TEXT = "text"; |
---|
53 | public static final String RESOURCE_TYPE_IMAGE = "image"; |
---|
54 | public static final String RESOURCE_TYPE_ANNOTATION = "annotation"; |
---|
55 | |
---|
56 | /** |
---|
57 | * Handle proxy base url (to replace part that matches |
---|
58 | * {@link #HANDLE_PREFIX}) |
---|
59 | */ |
---|
60 | public static final String HANDLE_PROXY = "http://hdl.handle.net/"; |
---|
61 | public static final String HANDLE_MPI_PREFIX = "hdl:1839"; |
---|
62 | public static final String HANDLE_PREFIX = "hdl:"; |
---|
63 | public static final String TEST_HANDLE_MPI_PREFIX = "test-hdl:1839"; |
---|
64 | public static final String FIELD_RESOURCE_SPLIT_CHAR = "|"; |
---|
65 | public static final String URN_NBN_PREFIX = "urn:nbn"; |
---|
66 | public static final String URN_NBN_RESOLVER_URL = "http://www.nbn-resolving.org/redirect/"; |
---|
67 | |
---|
68 | /** |
---|
69 | * regular expression that matches the language prefix in description (group |
---|
70 | * 1 matches the ISO639-3 language code) |
---|
71 | */ |
---|
72 | public static final String DESCRIPTION_LANGUAGE_PATTERN = "^\\{lang='([a-z]{3})'\\}"; |
---|
73 | |
---|
74 | /** |
---|
75 | * regular expression that matches the syntax of the 'languageCode' field |
---|
76 | * (with either a language code or a name as indicated by the prefix) |
---|
77 | */ |
---|
78 | public static final String LANGUAGE_CODE_PATTERN = "(name|code):(.*)"; |
---|
79 | } |
---|