-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: be able to define multiple wasGeneratedBy for dataset (#703)
* feat: be able to define multiple wasGeneratedBy for dataset * feat: add missing file * feat: add unit test * feat: add unit test * feat: define ID directly in the sparql query * fix: solve review * fix: test
- Loading branch information
1 parent
0ae0b3f
commit d2321a9
Showing
21 changed files
with
732 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/main/resources/request/dataset/getDatasetWasGeneratedIris.ftlh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
SELECT ?iri | ||
FROM <${DATASET_GRAPH}> | ||
WHERE { | ||
?dataset dcterms:identifier '${ID}' ; | ||
prov:wasGeneratedBy ?iri . | ||
} |
3 changes: 1 addition & 2 deletions
3
src/main/resources/request/operations/famOpeSer/getFamily.ftlh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
SELECT DISTINCT ?iri ?seriesIri ?id ?label (group_concat(?altLabelLg1;separator=' || ') as ?altLabel) | ||
WHERE { | ||
GRAPH <${OPERATIONS_GRAPH}> { | ||
?iri a insee:StatisticalOperation . | ||
?iri skos:prefLabel ?label . | ||
FILTER (lang(?label) = '${LG1}') | ||
BIND(STRAFTER(STR(?iri),'/operations/operation/') AS ?id) . | ||
|
||
?seriesIri dcterms:hasPart ?iri . | ||
OPTIONAL{ | ||
?iri skos:altLabel ?altLabelLg1 . | ||
FILTER (lang(?altLabelLg1) = '${LG2}') | ||
} | ||
} | ||
} | ||
GROUP BY ?iri ?seriesIri ?id ?label | ||
ORDER BY ?label |
11 changes: 9 additions & 2 deletions
11
src/main/resources/request/operations/series/checkIfSeriesExists.ftlh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
ASK | ||
SELECT ?uri | ||
FROM <${OPERATIONS_GRAPH}> | ||
WHERE { | ||
<${URI_SERIES}> rdf:type ?type . | ||
|
||
<#list URI_SERIES as URI_SERIE> | ||
{ | ||
<${URI_SERIE}> rdf:type ?type . | ||
BIND('${URI_SERIE}' AS ?uri) . | ||
} | ||
<#sep> UNION </#sep> | ||
</#list> | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/resources/request/operations/series/getSeriesById.ftlh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
src/main/resources/request/operations/series/getSeriesQuery.ftlh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
SELECT DISTINCT ?id ?label (group_concat(?altLabelLg1;separator=' || ') as ?altLabel) | ||
SELECT DISTINCT ?iri ?id ?label (group_concat(?altLabelLg1;separator=' || ') as ?altLabel) | ||
<#if withSims = "true"> ?idSims | ||
</#if> | ||
WHERE { | ||
GRAPH <${OPERATIONS_GRAPH}> { | ||
?series a insee:StatisticalOperationSeries . | ||
?series skos:prefLabel ?label . | ||
?iri a insee:StatisticalOperationSeries . | ||
?iri skos:prefLabel ?label . | ||
FILTER (lang(?label) = '${LG1}') | ||
BIND(STRAFTER(STR(?series),'/operations/serie/') AS ?id) . | ||
BIND(STRAFTER(STR(?iri),'/operations/serie/') AS ?id) . | ||
OPTIONAL{ | ||
?series skos:altLabel ?altLabelLg1 . | ||
?iri skos:altLabel ?altLabelLg1 . | ||
FILTER (lang(?altLabelLg1) = '${LG1}') | ||
} | ||
<#if withSims = "true"> | ||
OPTIONAL{ | ||
?report rdf:type sdmx-mm:MetadataReport . | ||
?report sdmx-mm:target ?series | ||
?report sdmx-mm:target ?iri | ||
BIND(STRAFTER(STR(?report),'/rapport/') AS ?idSims) . | ||
} | ||
</#if> | ||
|
||
} | ||
} | ||
GROUP BY ?id ?label <#if withSims = "true"> ?idSims</#if> | ||
GROUP BY ?iri ?id ?label <#if withSims = "true"> ?idSims</#if> | ||
ORDER BY ?label |
Oops, something went wrong.