Skip to content

Commit de2b48f

Browse files
authored
Merge pull request #11433 from DANS-KNAW-jp/npe-cvoc
error handling cvoc filters
2 parents 5e55658 + a00c5c4 commit de2b48f

32 files changed

+4402
-59
lines changed

src/main/java/edu/harvard/iq/dataverse/DatasetFieldServiceBean.java

Lines changed: 92 additions & 59 deletions
Large diffs are not rendered by default.

src/test/java/edu/harvard/iq/dataverse/DatasetFieldServiceBeanFilterResponseTest.java

Lines changed: 292 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"field-name": "dansAATClassification",
3+
"term-uri-field": "dansAATClassification",
4+
"cvoc-url": "https://dev.vocabs.datastations.nl/",
5+
"js-url": "https://github.com/gdcc/dataverse-external-vocab-support/blob/main/scripts/skosmos.js",
6+
"protocol": "skosmos",
7+
"retrieval-uri": "https://dev.vocabs.datastations.nl/rest/v1/data?uri={0}",
8+
"term-parent-uri": "",
9+
"languages": "en, nl",
10+
"allow-free-text": false,
11+
"vocabs": {
12+
"AATC": {
13+
"vocabularyUri": "http://vocab.getty.edu/aat/",
14+
"uriSpace": "http://vocab.getty.edu/aat/"
15+
}
16+
},
17+
"managed-fields": {},
18+
"retrieval-filtering": {
19+
"@context": {
20+
"termName": "https://schema.org/name",
21+
"vocabularyName": "https://dataverse.org/schema/vocabularyName",
22+
"vocabularyUri": "https://dataverse.org/schema/vocabularyUri",
23+
"lang": "@language",
24+
"value": "@value"
25+
},
26+
"@id": {
27+
"pattern": "{0}",
28+
"params": [
29+
"@id"
30+
]
31+
},
32+
"termName": {
33+
"pattern": "{0}",
34+
"params": [
35+
"/graph/uri=@id/prefLabel"
36+
]
37+
},
38+
"vocabularyName": {
39+
"pattern": "{0}",
40+
"params": [
41+
"/graph/type=skos:ConceptScheme/label"
42+
]
43+
},
44+
"vocabularyUri": {
45+
"pattern": "{0}",
46+
"params": [
47+
"/graph/type=skos:ConceptScheme/uri"
48+
]
49+
}
50+
}
51+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"field-name": "dansAbrArtifact",
3+
"term-uri-field": "dansAbrArtifact",
4+
"cvoc-url": "https://dev.vocabs.datastations.nl/",
5+
"js-url": "/custom/skosmos.js",
6+
"protocol": "skosmos",
7+
"retrieval-uri": "https://dev.vocabs.datastations.nl/rest/v1/data?uri={0}",
8+
"term-parent-uri": "https://data.cultureelerfgoed.nl/term/id/abr/22cbb070-6542-48f0-8afe-7d98d398cc0b",
9+
"languages": "nl",
10+
"allow-free-text": false,
11+
"vocabs": {
12+
"ABR": {
13+
"vocabularyUri": "https://data.cultureelerfgoed.nl/term/id/abr/b6df7840-67bf-48bd-aa56-7ee39435d2ed",
14+
"uriSpace": "https://data.cultureelerfgoed.nl/term/id/abr/"
15+
}
16+
},
17+
"managed-fields": {},
18+
"retrieval-filtering": {
19+
"@context": {
20+
"termName": "https://schema.org/name",
21+
"vocabularyName": "https://dataverse.org/schema/vocabularyName",
22+
"vocabularyUri": "https://dataverse.org/schema/vocabularyUri",
23+
"lang": "@language",
24+
"value": "@value"
25+
},
26+
"@id": {
27+
"pattern": "{0}",
28+
"params": [
29+
"@id"
30+
]
31+
},
32+
"termName": {
33+
"pattern": "{0}",
34+
"params": [
35+
"/graph/uri=@id/prefLabel"
36+
]
37+
},
38+
"vocabularyName": {
39+
"pattern": "ABR artifact",
40+
"params": []
41+
},
42+
"vocabularyUri": {
43+
"pattern": "https://data.cultureelerfgoed.nl/term/id/abr/22cbb070-6542-48f0-8afe-7d98d398cc0b",
44+
"params": []
45+
}
46+
}
47+
}
48+
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"field-name": "dansAbrComplex",
3+
"term-uri-field": "dansAbrComplex",
4+
"cvoc-url": "https://dev.vocabs.datastations.nl/",
5+
"js-url": "/custom/skosmos.js",
6+
"protocol": "skosmos",
7+
"retrieval-uri": "https://dev.vocabs.datastations.nl/rest/v1/data?uri={0}",
8+
"term-parent-uri": "https://data.cultureelerfgoed.nl/term/id/abr/e9546020-4b28-4819-b0c2-29e7c864c5c0",
9+
"languages": "nl",
10+
"allow-free-text": false,
11+
"vocabs": {
12+
"ABR": {
13+
"vocabularyUri": "https://data.cultureelerfgoed.nl/term/id/abr/b6df7840-67bf-48bd-aa56-7ee39435d2ed",
14+
"uriSpace": "https://data.cultureelerfgoed.nl/term/id/abr/"
15+
}
16+
},
17+
"managed-fields": {},
18+
"retrieval-filtering": {
19+
"@context": {
20+
"termName": "https://schema.org/name",
21+
"vocabularyName": "https://dataverse.org/schema/vocabularyName",
22+
"vocabularyUri": "https://dataverse.org/schema/vocabularyUri",
23+
"lang": "@language",
24+
"value": "@value"
25+
},
26+
"@id": {
27+
"pattern": "{0}",
28+
"params": [
29+
"@id"
30+
]
31+
},
32+
"termName": {
33+
"pattern": "{0}",
34+
"params": [
35+
"/graph/uri=@id/prefLabel"
36+
]
37+
},
38+
"vocabularyName": {
39+
"pattern": "ABR complextypen",
40+
"params": []
41+
},
42+
"vocabularyUri": {
43+
"pattern": "https://data.cultureelerfgoed.nl/term/id/abr/e9546020-4b28-4819-b0c2-29e7c864c5c0",
44+
"params": []
45+
}
46+
}
47+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"field-name": "dansAbrPeriod",
3+
"term-uri-field": "dansAbrPeriod",
4+
"cvoc-url": "https://dev.vocabs.datastations.nl/",
5+
"js-url": "https://github.com/gdcc/dataverse-external-vocab-support/blob/main/scripts/skosmos.js",
6+
"protocol": "skosmos",
7+
"retrieval-uri": "https://dev.vocabs.datastations.nl/rest/v1/data?uri={0}",
8+
"term-parent-uri": "https://data.cultureelerfgoed.nl/term/id/abr/9b688754-1315-484b-9c89-8817e87c1e84",
9+
"languages": "nl",
10+
"allow-free-text": false,
11+
"vocabs": {
12+
"ABR": {
13+
"vocabularyUri": "https://data.cultureelerfgoed.nl/term/id/abr/b6df7840-67bf-48bd-aa56-7ee39435d2ed",
14+
"uriSpace": "https://data.cultureelerfgoed.nl/term/id/abr/"
15+
}
16+
},
17+
"managed-fields": {},
18+
"retrieval-filtering": {
19+
"@context": {
20+
"termName": "https://schema.org/name",
21+
"vocabularyName": "https://dataverse.org/schema/vocabularyName",
22+
"vocabularyUri": "https://dataverse.org/schema/vocabularyUri",
23+
"lang": "@language",
24+
"value": "@value"
25+
},
26+
"@id": {
27+
"pattern": "{0}",
28+
"params": [
29+
"@id"
30+
]
31+
},
32+
"termName": {
33+
"pattern": "{0}",
34+
"params": [
35+
"/graph/uri=@id/prefLabel"
36+
]
37+
},
38+
"vocabularyName": {
39+
"pattern": "ABR perioden",
40+
"params": []
41+
},
42+
"vocabularyUri": {
43+
"pattern": "https://data.cultureelerfgoed.nl/term/id/abr/9b688754-1315-484b-9c89-8817e87c1e84",
44+
"params": []
45+
}
46+
}
47+
}
48+
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"field-name": "dansAbrRapportType",
3+
"term-uri-field": "dansAbrRapportType",
4+
"cvoc-url": "https://dev.vocabs.datastations.nl/",
5+
"js-url": "/custom/skosmos.js",
6+
"protocol": "skosmos",
7+
"retrieval-uri": "https://dev.vocabs.datastations.nl/rest/v1/data?uri={0}",
8+
"term-parent-uri": "https://data.cultureelerfgoed.nl/term/id/abr/7a99aaba-c1e7-49a4-9dd8-d295dbcc870e",
9+
"languages": "nl",
10+
"allow-free-text": false,
11+
"vocabs": {
12+
"ABR": {
13+
"vocabularyUri": "https://data.cultureelerfgoed.nl/term/id/abr/b6df7840-67bf-48bd-aa56-7ee39435d2ed",
14+
"uriSpace": "https://data.cultureelerfgoed.nl/term/id/abr/"
15+
}
16+
},
17+
"managed-fields": {},
18+
"retrieval-filtering": {
19+
"@context": {
20+
"termName": "https://schema.org/name",
21+
"vocabularyName": "https://dataverse.org/schema/vocabularyName",
22+
"vocabularyUri": "https://dataverse.org/schema/vocabularyUri",
23+
"lang": "@language",
24+
"value": "@value"
25+
},
26+
"@id": {
27+
"pattern": "{0}",
28+
"params": [
29+
"@id"
30+
]
31+
},
32+
"termName": {
33+
"pattern": "{0}",
34+
"params": [
35+
"/graph/uri=@id/prefLabel"
36+
]
37+
},
38+
"vocabularyName": {
39+
"pattern": "ABR rapporten",
40+
"params": []
41+
},
42+
"vocabularyUri": {
43+
"pattern": "https://data.cultureelerfgoed.nl/term/id/abr/7a99aaba-c1e7-49a4-9dd8-d295dbcc870e",
44+
"params": []
45+
}
46+
}
47+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"field-name": "dansAbrVerwervingswijze",
3+
"term-uri-field": "dansAbrVerwervingswijze",
4+
"cvoc-url": "https://dev.vocabs.datastations.nl/",
5+
"js-url": "/custom/skosmos.js",
6+
"protocol": "skosmos",
7+
"retrieval-uri": "https://dev.vocabs.datastations.nl/rest/v1/data?uri={0}",
8+
"term-parent-uri": "https://data.cultureelerfgoed.nl/term/id/abr/554ca1ec-3ed8-42d3-ae4b-47bcb848b238",
9+
"languages": "nl",
10+
"allow-free-text": false,
11+
"vocabs": {
12+
"ABR": {
13+
"vocabularyUri": "https://data.cultureelerfgoed.nl/term/id/abr/b6df7840-67bf-48bd-aa56-7ee39435d2ed",
14+
"uriSpace": "https://data.cultureelerfgoed.nl/term/id/abr/"
15+
}
16+
},
17+
"managed-fields": {},
18+
"retrieval-filtering": {
19+
"@context": {
20+
"termName": "https://schema.org/name",
21+
"vocabularyName": "https://dataverse.org/schema/vocabularyName",
22+
"vocabularyUri": "https://dataverse.org/schema/vocabularyUri",
23+
"lang": "@language",
24+
"value": "@value"
25+
},
26+
"@id": {
27+
"pattern": "{0}",
28+
"params": [
29+
"@id"
30+
]
31+
},
32+
"termName": {
33+
"pattern": "{0}",
34+
"params": [
35+
"/graph/uri=@id/prefLabel"
36+
]
37+
},
38+
"vocabularyName": {
39+
"pattern": "ABR verwervingswijzen",
40+
"params": []
41+
},
42+
"vocabularyUri": {
43+
"pattern": "https://data.cultureelerfgoed.nl/term/id/abr/554ca1ec-3ed8-42d3-ae4b-47bcb848b238",
44+
"params": []
45+
}
46+
}
47+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"field-name": "dansAudience",
3+
"term-uri-field": "dansAudience",
4+
"cvoc-url": "https://dev.vocabs.datastations.nl/",
5+
"js-url": "https://github.com/gdcc/dataverse-external-vocab-support/blob/main/scripts/skosmos.js",
6+
"protocol": "skosmos",
7+
"retrieval-uri": "https://dev.vocabs.datastations.nl/rest/v1/data?uri={0}",
8+
"term-parent-uri": "",
9+
"languages": "en, nl",
10+
"allow-free-text": false,
11+
"vocabs": {
12+
"NARCIS": {
13+
"vocabularyUri": "https://www.narcis.nl/classification/",
14+
"uriSpace": "https://www.narcis.nl/classification/"
15+
}
16+
},
17+
"managed-fields": {},
18+
"retrieval-filtering": {
19+
"@context": {
20+
"termName": "https://schema.org/name",
21+
"vocabularyName": "https://dataverse.org/schema/vocabularyName",
22+
"vocabularyUri": "https://dataverse.org/schema/vocabularyUri",
23+
"lang": "@language",
24+
"value": "@value"
25+
},
26+
"@id": {
27+
"pattern": "{0}",
28+
"params": [
29+
"@id"
30+
]
31+
},
32+
"termName": {
33+
"pattern": "{0}",
34+
"params": [
35+
"/graph/uri=@id/prefLabel"
36+
]
37+
},
38+
"vocabularyName": {
39+
"pattern": "{0}",
40+
"params": [
41+
"/graph/type=skos:ConceptScheme/label"
42+
]
43+
},
44+
"vocabularyUri": {
45+
"pattern": "{0}",
46+
"params": [
47+
"/graph/type=skos:ConceptScheme/uri"
48+
]
49+
}
50+
}
51+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"allow-free-text": false,
3+
"cvoc-url": "https://dev.vocabs.datastations.nl/",
4+
"field-name": "dansCessdaClassification",
5+
"js-url": "/custom/skosmos.js",
6+
"languages": "en",
7+
"managed-fields": {},
8+
"protocol": "skosmos",
9+
"retrieval-filtering": {
10+
"@context": {
11+
"lang": "@language",
12+
"termName": "https://schema.org/name",
13+
"value": "@value",
14+
"vocabularyName": "https://dataverse.org/schema/vocabularyName",
15+
"vocabularyUri": "https://dataverse.org/schema/vocabularyUri"
16+
},
17+
"@id": {
18+
"params": [
19+
"@id"
20+
],
21+
"pattern": "{0}"
22+
},
23+
"termName": {
24+
"params": [
25+
"/graph/uri=@id/prefLabel"
26+
],
27+
"pattern": "{0}"
28+
},
29+
"vocabularyName": {
30+
"params": [],
31+
"pattern": "CESSDA Topis classification 4.2"
32+
},
33+
"vocabularyUri": {
34+
"params": [],
35+
"pattern": "https://vocabularies.cessda.eu/vocabulary/TopicClassification?v=4.2"
36+
}
37+
},
38+
"retrieval-uri": "https://dev.vocabs.datastations.nl/rest/v1/data?uri={0}",
39+
"term-parent-uri": "",
40+
"term-uri-field": "dansCessdaClassification",
41+
"vocabs": {
42+
"TopicClassification_4_2": {
43+
"uriSpace": "https://vocabularies.cessda.eu/vocabulary/TopicClassification?v=4.2",
44+
"vocabularyUri": "https://vocabularies.cessda.eu/vocabulary/TopicClassification?v=4.2"
45+
}
46+
}
47+
}

0 commit comments

Comments
 (0)