-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-config.js
62 lines (51 loc) · 1.45 KB
/
api-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
module.exports = {
endpointUrl: 'http://data.zazuko.com:80/ssz/query',
user: 'ssz-read',
password: process.env.SPARQL_ENDPOINT_PASSWORD,
apiStub: 'hydra-api-stub.json',
shapeContextStub: 'shape.context.jsonld',
outDir: 'api',
// *** WHITELISTING ***
viewFilter: view => {
const notation = view.notation.value;
const whitelist = [
// landing page
'WRT-RAUM-ZEIT-ARA-OBJ',
'GBF-RAUM-ZEIT-ARA',
'GBD-RAUM-ZEIT-ARA',
// verwandte statistiken
'AVA-RAUM-ZEIT-GGH-SEX',
'AVA-RAUM-ZEIT-HEL-SEX',
'AVA-RAUM-ZEIT-HEL-PSA',
'AVA-RAUM-ZEIT-ELK-HEL-PSA',
'GES-RAUM-ZEIT-HEL-SEX',
'GES-RAUM-ZEIT-ALT',
'GES-RAUM-ZEIT-HEL',
'GES-RAUM-ZEIT-ALT-TOU',
'GES-RAUM-ZEIT-SEX-TOU',
'SNB-RAUM-ZEIT-HEL',
'SWB-RAUM-ZEIT-HEO',
// for simple shakedown
'BEW-RAUM-ZEIT-HEL',
// for testing observations with NaN
'ZUS-RAUM-ZEIT-BTA-VSA',
'WHG-RAUM-ZEIT-ZIM'
];
return whitelist.includes(notation);
}
// *** BLACKLISTING ***
// viewFilter: view => {
// const blacklist = [
// 'BES-RAUM-ZEIT-0',
// 'GEB-RAUM-ZEIT-NAF-NAM-SEX'
// ];
// const notation = view.notation.value;
// for (i = 0; i < blacklist.length; i++) {
// if (notation.startsWith(blacklist[i])) {
// console.log(`blacklisted & skipped: ${notation}`);
// return false;
// }
// }
// return true;
// }
}