Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
td_histoire_numerique:exercice_2 [2015/09/22 21:40] Francesco Beretta |
td_histoire_numerique:exercice_2 [2015/09/22 21:48] Francesco Beretta |
||
---|---|---|---|
Ligne 4: | Ligne 4: | ||
**Document à télécharger pour l'exercice de mardi 22 septembre**: {{:td_histoire_numerique:liste_notices_bnf.ods|liste_notices_BNF}} | **Document à télécharger pour l'exercice de mardi 22 septembre**: {{:td_histoire_numerique:liste_notices_bnf.ods|liste_notices_BNF}} | ||
+ | |||
+ | Les indications concernant la production du document se trouvent sur [[td_histoire_numerique:creation_liste_notices_bnf|cette page]]. | ||
+ | |||
+ | |||
==== Requête dans les données de la Bibliothèque nationale ==== | ==== Requête dans les données de la Bibliothèque nationale ==== | ||
Ligne 10: | Ligne 14: | ||
<code sparql> | <code sparql> | ||
- | PREFIX egr: <http://rdvocab.info/ElementsGr2/> | + | PREFIX egr: <http://rdvocab.info/ElementsGr2/> |
- | + | ||
- | SELECT DISTINCT ?s ?na ?fn ?annee ?pb ?gd ?bio | + | |
+ | SELECT DISTINCT ?s ?na ?fn ?annee ?pb ?gd ?bio | ||
WHERE | WHERE | ||
- | + | { { { SELECT DISTINCT ?s ?bio | |
- | { { { SELECT DISTINCT ?s ?bio | + | WHERE |
- | + | { { ?s egr:biographicalInformation ?bio | |
- | WHERE | + | FILTER ( contains(?bio, "mathém") || contains(?bio, "Mathém") ) |
- | + | } | |
- | { { ?s egr:biographicalInformation ?bio | + | UNION |
- | + | { ?s egr:biographicalInformation ?bio | |
- | FILTER ( contains(?bio, "mathém") || contains(?bio, "Mathém") ) | + | FILTER ( contains(?bio, "astrono") || contains(?bio, "Astrono") ) |
- | + | } | |
- | } | + | } |
- | + | } | |
- | UNION | + | ?s egr:dateOfBirth ?bd |
- | + | OPTIONAL | |
- | { ?s egr:biographicalInformation ?bio | + | { ?s <http://xmlns.com/foaf/0.1/name> ?na } |
- | + | OPTIONAL | |
- | FILTER ( contains(?bio, "astrono") || contains(?bio, "Astrono") ) | + | { ?s <http://xmlns.com/foaf/0.1/familyName> ?fn } |
- | + | OPTIONAL | |
- | } | + | { ?s egr:placeOfBirth ?pb } |
- | + | OPTIONAL | |
- | } | + | { ?s <http://xmlns.com/foaf/0.1/gender> ?gd } |
- | + | } | |
- | } | + | BIND(strbefore(strafter(str(?bd), "http://data.bnf.fr/date/"), "/") AS ?annee) |
- | + | FILTER ( ( ?annee > "1100" ) && ( ?annee < "1761" ) ) | |
- | ?s egr:dateOfBirth ?bd | + | } |
- | + | ||
- | OPTIONAL | + | |
- | + | ||
- | { ?s <http://xmlns.com/foaf/0.1/name> ?na } | + | |
- | + | ||
- | OPTIONAL | + | |
- | + | ||
- | { ?s <http://xmlns.com/foaf/0.1/familyName> ?fn } | + | |
- | + | ||
- | OPTIONAL | + | |
- | + | ||
- | { ?s egr:placeOfBirth ?pb } | + | |
- | + | ||
- | OPTIONAL | + | |
- | + | ||
- | { ?s <http://xmlns.com/foaf/0.1/gender> ?gd } | + | |
- | + | ||
- | } | + | |
- | + | ||
- | BIND(strbefore(strafter(str(?bd), "http://data.bnf.fr/date/"), "/") AS ?annee) | + | |
- | + | ||
- | FILTER ( ( ?annee> "1100" ) && ( ?annee <"1761" ) ) | + | |
- | + | ||
- | } | + | |
ORDER BY ?annee | ORDER BY ?annee | ||
</code> | </code> |