Mercurial > hg > ng2-query-ismi
annotate src/app/query-mode.ts @ 62:7787ca310644 webpack tip
update @angular to 4.4.5.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 18 Oct 2017 17:46:41 +0200 |
parents | 308c96f734c8 |
children |
rev | line source |
---|---|
1
59b7c3afcc6b
first interface and http request.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
1 export interface QueryMode { |
59b7c3afcc6b
first interface and http request.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
2 id: string; |
59b7c3afcc6b
first interface and http request.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
3 label: string; |
11
6989cd00e8d7
relations work now as well as longer queries.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
1
diff
changeset
|
4 } |
6989cd00e8d7
relations work now as well as longer queries.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
1
diff
changeset
|
5 |
55 | 6 export function getQueryModeById(id: string) { |
7 return QUERY_MODES.find((elem) => elem.id === id); | |
8 } | |
9 | |
11
6989cd00e8d7
relations work now as well as longer queries.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
1
diff
changeset
|
10 export var QUERY_MODES: QueryMode[] = [ |
6989cd00e8d7
relations work now as well as longer queries.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
1
diff
changeset
|
11 {id: 'type_is', label:'Object type is'}, |
15
f84ff6781e57
added att_num_range query type.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
11
diff
changeset
|
12 {id: 'att_contains', label: 'Attribute (contains)'}, |
f84ff6781e57
added att_num_range query type.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
11
diff
changeset
|
13 {id: 'att_contains_norm', label: 'Attribute (contains normalized)'}, |
f84ff6781e57
added att_num_range query type.
Robert Casties <casties@mpiwg-berlin.mpg.de>
parents:
11
diff
changeset
|
14 {id: 'att_num_range', label: 'Attribute (number range)'}, |
32 | 15 {id: 'relation_is', label: 'Relation type is'}, |
35 | 16 {id: 'id_is', label: 'Object ID is'} |
34 | 17 ]; |
18 | |
19 export var FIRST_QUERY_MODES: QueryMode[] = [ | |
20 {id: 'type_is', label:'Object type is'}, | |
32 | 21 {id: 'id_is', label: 'Object ID is'} |
34 | 22 ]; |