Skip to content

Commit a6cbd8e

Browse files
committed
Encapsulate serialization specifics in filter models (#455)
1 parent 7f78f34 commit a6cbd8e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

frontend/src/semantic-search/dropdown-constants.ts

+9
Original file line numberDiff line numberDiff line change
@@ -25,58 +25,67 @@ export const filters = new Collection([{
2525
i18nKey: 'filters.equals',
2626
uris: true,
2727
literals: true,
28+
operator: '=',
2829
}, {
2930
id: 'filter:less',
3031
label: 'Is less than',
3132
i18nKey: 'filters.less',
3233
uris: false,
3334
literals: true,
35+
operator: '<',
3436
}, {
3537
id: 'filter:greater',
3638
label: 'Is greater than',
3739
i18nKey: 'filters.greater',
3840
uris: false,
3941
literals: true,
42+
operator: '>',
4043
}, {
4144
id: 'filter:isIRI',
4245
label: 'Is defined',
4346
i18nKey: 'filters.isDefined',
4447
uris: true,
4548
literals: false,
49+
function: 'isIRI',
4650
}, {
4751
id: 'filter:isLiteral',
4852
label: 'Is defined',
4953
i18nKey: 'filters.isDefined',
5054
uris: false,
5155
literals: true,
56+
function: 'isLiteral',
5257
}, {
5358
id: 'filter:stringStarts',
5459
label: 'Starts with',
5560
i18nKey: 'filters.startsWith',
5661
uris: false,
5762
literals: true,
5863
restrict: [xsd.string],
64+
function: 'strStarts',
5965
}, {
6066
id: 'filter:stringEnds',
6167
label: 'Ends with',
6268
i18nKey: 'filters.endsWith',
6369
uris: false,
6470
literals: true,
6571
restrict: [xsd.string],
72+
function: 'strEnds',
6673
}, {
6774
id: 'filter:stringContains',
6875
label: 'Contains',
6976
i18nKey: 'filters.contains',
7077
uris: false,
7178
literals: true,
7279
restrict: [xsd.string],
80+
function: 'contains',
7381
}, {
7482
id: 'filter:regex',
7583
label: 'Matches regular expression',
7684
i18nKey: 'filters.matchRegex',
7785
uris: false,
7886
literals: true,
7987
restrict: [xsd.string],
88+
function: 'regex',
8089
}]);
8190

8291
export const groupLabels = new Collection([{

0 commit comments

Comments
 (0)