-
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: refactor a query inside a FLTH file and add a sort statement to…
… another one (#676)
- Loading branch information
1 parent
974d178
commit f706515
Showing
3 changed files
with
48 additions
and
36 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
41 changes: 41 additions & 0 deletions
41
src/main/resources/request/concepts/getConceptsForAdvancedSearch.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,41 @@ | ||
SELECT DISTINCT ?id ?label ?created ?modified ?disseminationStatus ?validationStatus ?definition ?creator ?isTopConceptOf ?valid (group_concat(?altLabelLg1;separator=' || ') as ?altLabel) | ||
WHERE | ||
{ | ||
GRAPH <${CONCEPTS_GRAPH}> { | ||
?concept skos:notation ?notation . | ||
BIND (STR(?notation) AS ?id) | ||
?concept skos:prefLabel ?label . | ||
FILTER (lang(?label) = '${LG1}') . | ||
|
||
OPTIONAL { | ||
?concept skos:altLabel ?altLabelLg1 . | ||
FILTER (lang(?altLabelLg1) = '${LG1}') | ||
} | ||
?concept dcterms:created ?created . | ||
BIND (exists{?concept skos:broader ?broa} AS ?broader) . | ||
BIND (IF(?broader, 'false', 'true') AS ?isTopConceptOf) . | ||
|
||
OPTIONAL{?concept dcterms:modified ?modified} . | ||
OPTIONAL {?concept dcterms:valid ?valid} . | ||
|
||
?concept insee:disseminationStatus ?disseminationStatus . | ||
?concept insee:isValidated ?validationStatus . | ||
|
||
?concept dc:creator ?creator . | ||
OPTIONAL{ | ||
?concept skos:definition ?noteUri . | ||
?noteUri pav:version ?version . | ||
?noteUri evoc:noteLiteral ?definition . | ||
?noteUri dcterms:language '${LG1}'^^xsd:language . | ||
OPTIONAL { | ||
?concept skos:definition ?latest . | ||
?latest pav:version ?latestVersion . | ||
?latest dcterms:language '${LG1}'^^xsd:language . | ||
FILTER (?version < ?latestVersion) | ||
} . | ||
FILTER (!bound (?latest)) | ||
} | ||
} | ||
} | ||
GROUP BY ?id ?label ?created ?modified ?disseminationStatus ?validationStatus ?definition ?creator ?isTopConceptOf ?valid | ||
ORDER BY ?label |
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