Skip to content

Commit be3b3f4

Browse files
authored
Merge pull request #359 from InseeFr/fix/make-family-optional
fix: make family optional when fetching series
2 parents 5c5a3a0 + c77dc2a commit be3b3f4

4 files changed

Lines changed: 33 additions & 27 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<packaging>jar</packaging>
1313
<groupId>fr.insee.rmes</groupId>
1414
<artifactId>magma</artifactId>
15-
<version>1.4.8</version>
15+
<version>1.4.9</version>
1616
<name>magma</name>
1717
<description>Metadata management API</description>
1818
<organization>

src/main/resources/queries/pogues/getAllSeries.ftlh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@
1414

1515
OPTIONAL {?series dc:creator ?proprietaire .}
1616

17-
?series dcterms:isPartOf ?family .
18-
?family a insee:StatisticalOperationFamily .
19-
?family skos:prefLabel ?familyLabelLg1 .
20-
FILTER (lang(?familyLabelLg1 ) = '${LG1}')
21-
?family skos:prefLabel ?familyLabelLg2 .
22-
FILTER (lang(?familyLabelLg2 ) = '${LG2}')
23-
BIND(STRAFTER(STR(?family),'/operations/famille/') AS ?familyId ) .
24-
25-
OPTIONAL { ?series skos:altLabel ?seriesAltLabelLg1 .
17+
OPTIONAL {
18+
?series dcterms:isPartOf ?family .
19+
?family a insee:StatisticalOperationFamily .
20+
?family skos:prefLabel ?familyLabelLg1 .
21+
FILTER (lang(?familyLabelLg1 ) = '${LG1}')
22+
?family skos:prefLabel ?familyLabelLg2 .
23+
FILTER (lang(?familyLabelLg2 ) = '${LG2}')
24+
BIND(STRAFTER(STR(?family),'/operations/famille/') AS ?familyId ) .
25+
}
26+
27+
OPTIONAL { ?series skos:altLabel ?seriesAltLabelLg1 .
2628
FILTER (lang(?seriesAltLabelLg1) = '${LG1}') }
2729
OPTIONAL { ?series skos:altLabel ?seriesAltLabelLg2 .
2830
FILTER (lang(?seriesAltLabelLg2) = '${LG2}') }

src/main/resources/queries/pogues/getAllSeriesSurvey.ftlh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414

1515
OPTIONAL {?series dc:creator ?proprietaire .}
1616

17-
?series dcterms:isPartOf ?family .
18-
?family a insee:StatisticalOperationFamily .
19-
?family skos:prefLabel ?familyLabelLg1 .
20-
FILTER (lang(?familyLabelLg1 ) = '${LG1}')
21-
?family skos:prefLabel ?familyLabelLg2 .
22-
FILTER (lang(?familyLabelLg2 ) = '${LG2}')
23-
BIND(STRAFTER(STR(?family),'/operations/famille/') AS ?familyId ) .
24-
17+
OPTIONAL {
18+
?series dcterms:isPartOf ?family .
19+
?family a insee:StatisticalOperationFamily .
20+
?family skos:prefLabel ?familyLabelLg1 .
21+
FILTER (lang(?familyLabelLg1 ) = '${LG1}')
22+
?family skos:prefLabel ?familyLabelLg2 .
23+
FILTER (lang(?familyLabelLg2 ) = '${LG2}')
24+
BIND(STRAFTER(STR(?family),'/operations/famille/') AS ?familyId ) .
25+
}
26+
2527
OPTIONAL { ?series skos:altLabel ?seriesAltLabelLg1 .
2628
FILTER (lang(?seriesAltLabelLg1) = '${LG1}') }
2729
OPTIONAL { ?series skos:altLabel ?seriesAltLabelLg2 .

src/main/resources/queries/pogues/getSerieById.ftlh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@
1313
FILTER (lang(?seriesLabelLg1) = '${LG1}')
1414
?series skos:prefLabel ?seriesLabelLg2 .
1515
FILTER (lang(?seriesLabelLg2) = '${LG2}')
16-
17-
?series dcterms:isPartOf ?family .
18-
?family a insee:StatisticalOperationFamily .
19-
?family skos:prefLabel ?familyLabelLg1 .
20-
FILTER (lang(?familyLabelLg1 ) = '${LG1}')
21-
?family skos:prefLabel ?familyLabelLg2 .
22-
FILTER (lang(?familyLabelLg2 ) = '${LG2}')
23-
BIND(STRAFTER(STR(?family),'/operations/famille/') AS ?familyId ) .
24-
16+
17+
OPTIONAL {
18+
?series dcterms:isPartOf ?family .
19+
?family a insee:StatisticalOperationFamily .
20+
?family skos:prefLabel ?familyLabelLg1 .
21+
FILTER (lang(?familyLabelLg1 ) = '${LG1}')
22+
?family skos:prefLabel ?familyLabelLg2 .
23+
FILTER (lang(?familyLabelLg2 ) = '${LG2}')
24+
BIND(STRAFTER(STR(?family),'/operations/famille/') AS ?familyId ) .
25+
}
26+
2527
OPTIONAL { ?series skos:altLabel ?seriesAltLabelLg1 .
2628
FILTER (lang(?seriesAltLabelLg1) = '${LG1}') }
2729
OPTIONAL { ?series skos:altLabel ?seriesAltLabelLg2 .

0 commit comments

Comments
 (0)