jskos-server 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/.dockerignore +20 -0
  2. package/.editorconfig +9 -0
  3. package/.github/workflows/docker.yml +59 -0
  4. package/.github/workflows/gh-pages.yml +23 -0
  5. package/.github/workflows/gh-release.yml +19 -0
  6. package/.github/workflows/test.yml +39 -0
  7. package/.husky/pre-commit +1 -0
  8. package/CHANGELOG.md +18 -0
  9. package/LICENSE +21 -0
  10. package/README.md +2710 -0
  11. package/bin/extra.js +81 -0
  12. package/bin/import.js +438 -0
  13. package/bin/mongodb.js +21 -0
  14. package/bin/reset.js +257 -0
  15. package/bin/upgrade.js +34 -0
  16. package/config/config.default.json +88 -0
  17. package/config/config.schema.json +877 -0
  18. package/config/config.test.json +107 -0
  19. package/config/index.js +77 -0
  20. package/config/setup.js +212 -0
  21. package/depdendencies.png +0 -0
  22. package/docker/.env +1 -0
  23. package/docker/Dockerfile +20 -0
  24. package/docker/README.md +175 -0
  25. package/docker/docker-compose.yml +29 -0
  26. package/docker/docker-entrypoint.sh +8 -0
  27. package/docker/mongo-initdb.d/mongo_setup.sh +22 -0
  28. package/ecosystem.example.json +7 -0
  29. package/errors/index.js +94 -0
  30. package/eslint.config.js +17 -0
  31. package/index.js +10 -0
  32. package/models/annotations.js +13 -0
  33. package/models/concepts.js +12 -0
  34. package/models/concordances.js +12 -0
  35. package/models/index.js +33 -0
  36. package/models/mappings.js +20 -0
  37. package/models/meta.js +21 -0
  38. package/models/registries.js +12 -0
  39. package/models/schemes.js +12 -0
  40. package/package.json +91 -0
  41. package/routes/annotations.js +83 -0
  42. package/routes/common.js +86 -0
  43. package/routes/concepts.js +64 -0
  44. package/routes/concordances.js +86 -0
  45. package/routes/data.js +19 -0
  46. package/routes/mappings.js +108 -0
  47. package/routes/registries.js +24 -0
  48. package/routes/schemes.js +72 -0
  49. package/routes/validate.js +37 -0
  50. package/server.js +190 -0
  51. package/services/abstract.js +328 -0
  52. package/services/annotations.js +237 -0
  53. package/services/concepts.js +459 -0
  54. package/services/concordances.js +264 -0
  55. package/services/data.js +30 -0
  56. package/services/index.js +34 -0
  57. package/services/mappings.js +978 -0
  58. package/services/registries.js +319 -0
  59. package/services/schemes.js +318 -0
  60. package/services/validate.js +39 -0
  61. package/status.schema.json +145 -0
  62. package/test/abstract-service.js +36 -0
  63. package/test/annotations/annotation.json +13 -0
  64. package/test/api.js +2481 -0
  65. package/test/chai.js +14 -0
  66. package/test/changes.js +179 -0
  67. package/test/concepts/conceptNoFileEnding +4 -0
  68. package/test/concepts/concepts-ddc-6-60-61-62.json +123 -0
  69. package/test/concordances/concordances.ndjson +2 -0
  70. package/test/config.js +26 -0
  71. package/test/configs/complex-config.json +90 -0
  72. package/test/configs/empty-object.json +1 -0
  73. package/test/configs/fail-array.json +1 -0
  74. package/test/configs/fail-empty.json +0 -0
  75. package/test/configs/fail-mapping-only-props1.json +5 -0
  76. package/test/configs/fail-mapping-only-props2.json +5 -0
  77. package/test/configs/fail-mapping-only-props3.json +5 -0
  78. package/test/configs/fail-mapping-only-props4.json +5 -0
  79. package/test/configs/fail-nonexisting-prop.json +3 -0
  80. package/test/configs/fail-port-string.json +3 -0
  81. package/test/configs/fail-registry-types.json +16 -0
  82. package/test/configs/registry-types.json +16 -0
  83. package/test/data-write.js +784 -0
  84. package/test/eslint.js +22 -0
  85. package/test/import-reset.js +287 -0
  86. package/test/infer-mappings.js +340 -0
  87. package/test/ipcheck.js +287 -0
  88. package/test/mappings/README.md +1 -0
  89. package/test/mappings/ddc-gnd-1.mapping.json +33 -0
  90. package/test/mappings/ddc-gnd-2.mapping.json +67 -0
  91. package/test/mappings/mapping-ddc-gnd-noScheme.json +145 -0
  92. package/test/mappings/mapping-ddc-gnd.json +175 -0
  93. package/test/mappings/mappings-ddc.json +214 -0
  94. package/test/registries/registries.ndjson +2 -0
  95. package/test/services.js +557 -0
  96. package/test/terminologies/terminologies.json +94 -0
  97. package/test/test-utils.js +182 -0
  98. package/test/utils.js +425 -0
  99. package/test/validate.js +226 -0
  100. package/utils/adjust.js +206 -0
  101. package/utils/auth.js +154 -0
  102. package/utils/changes.js +88 -0
  103. package/utils/db.js +106 -0
  104. package/utils/ipcheck.js +76 -0
  105. package/utils/middleware.js +636 -0
  106. package/utils/searchHelper.js +153 -0
  107. package/utils/status.js +77 -0
  108. package/utils/users.js +7 -0
  109. package/utils/utils.js +114 -0
  110. package/utils/uuid.js +6 -0
  111. package/utils/version.js +324 -0
  112. package/views/base.ejs +172 -0
@@ -0,0 +1,214 @@
1
+ [
2
+ {
3
+ "from": {
4
+ "memberSet": [
5
+ {
6
+ "uri": "http://dewey.info/class/612.112/e23/",
7
+ "notation": [
8
+ "612.112"
9
+ ]
10
+ }
11
+ ]
12
+ },
13
+ "to": {
14
+ "memberSet": [
15
+ {
16
+ "uri": "http://rvk.uni-regensburg.de/nt/WW_8844",
17
+ "notation": [
18
+ "WW 8844"
19
+ ]
20
+ }
21
+ ]
22
+ },
23
+ "fromScheme": {
24
+ "uri": "http://bartoc.org/en/node/241",
25
+ "notation": [
26
+ "DDC"
27
+ ]
28
+ },
29
+ "toScheme": {
30
+ "uri": "http://bartoc.org/en/node/533",
31
+ "notation": [
32
+ "RVK"
33
+ ]
34
+ },
35
+ "@context": "https://gbv.github.io/jskos/context.json"
36
+ },
37
+ {
38
+ "from": {
39
+ "memberSet": [
40
+ {
41
+ "uri": "http://dewey.info/class/612.112/e23/",
42
+ "notation": [
43
+ "612.112"
44
+ ]
45
+ }
46
+ ]
47
+ },
48
+ "to": {
49
+ "memberSet": [
50
+ {
51
+ "uri": "http://rvk.uni-regensburg.de/nt/WW_8840",
52
+ "notation": [
53
+ "WW 8840"
54
+ ]
55
+ }
56
+ ]
57
+ },
58
+ "fromScheme": {
59
+ "uri": "http://bartoc.org/en/node/241",
60
+ "notation": [
61
+ "DDC"
62
+ ]
63
+ },
64
+ "toScheme": {
65
+ "uri": "http://bartoc.org/en/node/533",
66
+ "notation": [
67
+ "RVK"
68
+ ]
69
+ },
70
+ "@context": "https://gbv.github.io/jskos/context.json"
71
+ },
72
+ {
73
+ "from": {
74
+ "memberSet": [
75
+ {
76
+ "uri": "http://dewey.info/class/612.11/e23/",
77
+ "notation": [
78
+ "612.11"
79
+ ]
80
+ }
81
+ ]
82
+ },
83
+ "to": {
84
+ "memberSet": [
85
+ {
86
+ "uri": "http://rvk.uni-regensburg.de/nt/WW_8840",
87
+ "notation": [
88
+ "WW 8840"
89
+ ]
90
+ }
91
+ ]
92
+ },
93
+ "fromScheme": {
94
+ "uri": "http://bartoc.org/en/node/241",
95
+ "notation": [
96
+ "DDC"
97
+ ]
98
+ },
99
+ "toScheme": {
100
+ "uri": "http://bartoc.org/en/node/533",
101
+ "notation": [
102
+ "RVK"
103
+ ]
104
+ },
105
+ "@context": "https://gbv.github.io/jskos/context.json"
106
+ },
107
+ {
108
+ "from": {
109
+ "memberSet": [
110
+ {
111
+ "uri": "http://dewey.info/class/612.111/e23/",
112
+ "notation": [
113
+ "612.111"
114
+ ]
115
+ }
116
+ ]
117
+ },
118
+ "to": {
119
+ "memberSet": [
120
+ {
121
+ "uri": "http://rvk.uni-regensburg.de/nt/WW_8840",
122
+ "notation": [
123
+ "WW 8840"
124
+ ]
125
+ }
126
+ ]
127
+ },
128
+ "fromScheme": {
129
+ "uri": "http://bartoc.org/en/node/241",
130
+ "notation": [
131
+ "DDC"
132
+ ]
133
+ },
134
+ "toScheme": {
135
+ "uri": "http://bartoc.org/en/node/533",
136
+ "notation": [
137
+ "RVK"
138
+ ]
139
+ },
140
+ "@context": "https://gbv.github.io/jskos/context.json"
141
+ },
142
+ {
143
+ "from": {
144
+ "memberSet": [
145
+ {
146
+ "uri": "http://d-nb.info/gnd/4074195-3",
147
+ "notation": [
148
+ "4074195-3"
149
+ ]
150
+ }
151
+ ]
152
+ },
153
+ "to": {
154
+ "memberSet": [
155
+ {
156
+ "uri": "http://dewey.info/class/612.112/e23/",
157
+ "notation": [
158
+ "612.112"
159
+ ]
160
+ }
161
+ ]
162
+ },
163
+ "fromScheme": {
164
+ "uri": "http://bartoc.org/en/node/430",
165
+ "notation": [
166
+ "GND"
167
+ ]
168
+ },
169
+ "toScheme": {
170
+ "uri": "http://bartoc.org/en/node/241",
171
+ "notation": [
172
+ "DDC"
173
+ ]
174
+ },
175
+ "type": ["http://www.w3.org/2004/02/skos/core#closeMatch"],
176
+ "@context": "https://gbv.github.io/jskos/context.json"
177
+ },
178
+ {
179
+ "from": {
180
+ "memberSet": [
181
+ {
182
+ "uri": "http://d-nb.info/gnd/4499720-6",
183
+ "notation": [
184
+ "4499720-6"
185
+ ]
186
+ }
187
+ ]
188
+ },
189
+ "to": {
190
+ "memberSet": [
191
+ {
192
+ "uri": "http://dewey.info/class/612.112/e23/",
193
+ "notation": [
194
+ "612.112"
195
+ ]
196
+ }
197
+ ]
198
+ },
199
+ "fromScheme": {
200
+ "uri": "http://bartoc.org/en/node/430",
201
+ "notation": [
202
+ "GND"
203
+ ]
204
+ },
205
+ "toScheme": {
206
+ "uri": "http://bartoc.org/en/node/241",
207
+ "notation": [
208
+ "DDC"
209
+ ]
210
+ },
211
+ "type": ["http://www.w3.org/2004/02/skos/core#relatedMatch"],
212
+ "@context": "https://gbv.github.io/jskos/context.json"
213
+ }
214
+ ]
@@ -0,0 +1,2 @@
1
+ {"uri":"http://example.org/registry/1","notation":["ERMS"],"prefLabel":{"en":"ERMS Example Registry"},"definition":{"en":["Registry entry containing ERMS for suggest/search tests."]},"type":["http://www.w3.org/ns/dcat#Catalog"],"created":"2020-01-01T00:00:00.000Z","modified":"2020-01-01T00:00:00.000Z"}
2
+ {"uri":"http://example.org/registry/2","notation":["XYZ"],"prefLabel":{"en":"XYZ Example Registry"},"definition":{"en":["Second registry entry."]},"type":["http://www.w3.org/ns/dcat#Catalog"],"created":"2020-01-01T00:00:00.000Z","modified":"2020-01-01T00:00:00.000Z"}