sparnatural
Version:
Visual client-side SPARQL query builder and knowledge graph exploration tool
684 lines (600 loc) • 24.7 kB
text/turtle
adms: <http://www.w3.org/ns/adms#> .
core: <http://data.sparna.fr/ontologies/sparnatural-config-core#> .
datasources: <http://data.sparna.fr/ontologies/sparnatural-config-datasources#> .
dc: <http://purl.org/dc/elements/1.1/> .
dcat: <http://www.w3.org/ns/dcat#> .
dct: <http://purl.org/dc/terms/> .
doap: <http://usefulinc.com/ns/doap#> .
euvoc: <http://publications.europa.eu/ontology/euvoc#> .
foaf: <http://xmlns.com/foaf/0.1/> .
med: <http://data.esante.gouv.fr/ansm/medicament/> .
org: <http://www.w3.org/ns/org#> .
owl: <http://www.w3.org/2002/07/owl#> .
prov: <http://www.w3.org/ns/prov#> .
qb: <http://purl.org/linked-data/cube#> .
rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
schema: <http://schema.org/> .
sh: <http://www.w3.org/ns/shacl#> .
skos: <http://www.w3.org/2004/02/skos/core#> .
skosthes: <http://purl.org/iso25964/skos-thes#> .
skosxl: <http://www.w3.org/2008/05/skos-xl#> .
this: <http://data.esante.gouv.fr/ansm/medicament/sparnatural-config/> .
xsd: <http://www.w3.org/2001/XMLSchema#> .
med:sparnatural-config a owl:Ontology;
dct:format <https://docs.google.com/spreadsheets/d/1ZkgVyfG1rnl3yZALOdxovj7ommoKDn7ieudi7jCwoYw/export?format=xlsx>,
<https://xls2rdf.sparna.fr/rest/convert?url=https%3A%2F%2Fdocs.google.com%2Fspreadsheets%2Fd%2F1ZkgVyfG1rnl3yZALOdxovj7ommoKDn7ieudi7jCwoYw%2Fexport%3Fformat%3Dxlsx&noPostProcessings=true>;
dct:source <https://docs.google.com/spreadsheets/d/1ZkgVyfG1rnl3yZALOdxovj7ommoKDn7ieudi7jCwoYw>;
owl:imports <http://data.sparna.fr/ontologies/sparnatural-config-core>, <http://data.sparna.fr/ontologies/sparnatural-config-datasources> .
med:Presentation a owl:Class;
core:defaultLabelProperty rdfs:label;
core:faIcon "fa-thin fa-box";
core:order 3;
rdfs:label "Présentation";
rdfs:subClassOf core:SparnaturalClass .
med:UniteCommuneDeDispensation a owl:Class;
core:defaultLabelProperty rdfs:label;
core:faIcon "fa-thin fa-capsules";
core:order 2;
rdfs:label "Unité de Dispensation";
rdfs:subClassOf core:SparnaturalClass .
med:SpecialitePharmaceutique a owl:Class;
core:defaultLabelProperty rdfs:label;
core:faIcon "fa-thin fa-mortar-pestle";
core:order 1;
rdfs:label "Spécialité pharmaceutique";
rdfs:subClassOf core:SparnaturalClass .
this:ATC a owl:Class;
core:defaultLabelProperty rdfs:label;
core:faIcon "fa-thin fa-folder-tree";
core:sparqlString "<http://data.esante.gouv.fr/whocc/atc/ATC>";
rdfs:label "Classification ATC";
rdfs:subClassOf core:SparnaturalClass .
med:Evenement a owl:Class;
core:defaultLabelProperty rdfs:label;
core:faIcon "fa-thin fa-calendar-exclamation";
core:order 5;
core:sparqlString "?classeEvenement . VALUES ?classeEvenement {<http://data.esante.gouv.fr/ansm/medicament/Evenement> <http://data.esante.gouv.fr/ansm/medicament/Autorisation> }";
core:tooltip "Un évènement réglementaire : Autorisation (AMM, enregistrement, AAC, AAP, ADP, AI), affectation des indications pour les accès dérogatoires, changement de statut";
rdfs:label "Événement";
rdfs:subClassOf core:SparnaturalClass .
med:Substance a owl:Class;
core:defaultLabelProperty rdfs:label;
core:faIcon "fa-thin fa-atom-simple";
core:order 4;
rdfs:label "Substance";
rdfs:subClassOf core:SparnaturalClass .
med:TypeEvenement a owl:Class;
core:defaultLabelProperty rdfs:label;
core:faIcon "fa-thin fa-window-restore";
rdfs:label "Type d'événement";
rdfs:subClassOf core:SparnaturalClass .
med:TypeProcedure a owl:Class;
core:defaultLabelProperty rdfs:label;
core:faIcon "fa-thin fa-list";
rdfs:label "Type de procédure";
rdfs:subClassOf core:SparnaturalClass .
this:Text a owl:Class;
core:faIcon "fa-thin fa-message-dots";
rdfs:label "Libellé";
rdfs:subClassOf rdfs:Literal .
this:Date a owl:Class;
core:faIcon "fa-thin fa-calendar-day";
rdfs:label "Date";
rdfs:subClassOf rdfs:Literal .
this:CIP a owl:Class;
core:faIcon "fa-thin fa-input-numeric";
rdfs:label "Code CIP";
rdfs:subClassOf rdfs:Literal .
this:UCD a owl:Class;
core:faIcon "fa-thin fa-input-numeric";
rdfs:label "Code UCD";
rdfs:subClassOf rdfs:Literal .
this:DateAMM a owl:Class;
core:faIcon "fa-thin fa-calendar-day";
rdfs:label "Date de 1re AMM";
rdfs:subClassOf rdfs:Literal .
this:DateFin a owl:Class;
core:faIcon "fa-thin fa-calendar-day";
rdfs:label "Date de fin";
rdfs:subClassOf rdfs:Literal .
this:DateEffet a owl:Class;
core:faIcon "fa-thin fa-calendar-day";
rdfs:label "Date d'effet";
rdfs:subClassOf rdfs:Literal .
this:DateNotification a owl:Class;
core:faIcon "fa-thin fa-calendar-day";
rdfs:label "Date de notification";
rdfs:subClassOf rdfs:Literal .
this:Label a owl:Class;
core:faIcon "fa-thin fa-message-dots";
rdfs:label "Libellé préférentiel";
rdfs:subClassOf rdfs:Literal .
this:AltLabel a owl:Class;
core:faIcon "fa-thin fa-message-dots";
rdfs:label "Libellé alternatif";
rdfs:subClassOf rdfs:Literal .
this:CodeUCD13 a owl:Class;
core:faIcon "fa-thin fa-input-numeric";
rdfs:label "Code UCD13";
rdfs:subClassOf rdfs:Literal .
this:CodeUCD7 a owl:Class;
core:faIcon "fa-thin fa-input-numeric";
rdfs:label "Code UCD7";
rdfs:subClassOf rdfs:Literal .
this:CIP13 a owl:Class;
core:faIcon "fa-thin fa-input-numeric";
rdfs:label "Code CIP13";
rdfs:subClassOf rdfs:Literal .
this:CIP7 a owl:Class;
core:faIcon "fa-thin fa-input-numeric";
rdfs:label "Code CIP7";
rdfs:subClassOf rdfs:Literal .
this:NombreUnites a owl:Class;
core:faIcon "fa-thin fa-ball-pile";
rdfs:label "Nombre d'unités de dispensation";
rdfs:subClassOf rdfs:Literal .
this:TypeDispositif a owl:Class;
core:faIcon "fa-thin fa-syringe";
rdfs:label "Dispositif d'administration";
rdfs:subClassOf rdfs:Literal .
this:CIS a owl:Class;
core:faIcon "fa-thin fa-barcode";
rdfs:label "Code ID de Spécialité";
rdfs:subClassOf rdfs:Literal .
this:Actif a owl:Class;
core:faIcon "fa-thin fa-circle-check";
rdfs:label "Active";
rdfs:subClassOf rdfs:Literal .
this:CodeATC a owl:Class;
core:faIcon "fa-thin fa-input-numeric";
rdfs:label "Code ATC";
rdfs:subClassOf rdfs:Literal .
med:StatutSpecialite a owl:Class;
core:faIcon "fa-thin fa-circle-info";
rdfs:label "Statut courant";
rdfs:subClassOf rdfs:Literal .
med:Element a owl:Class;
core:faIcon "fa-thin fa-pills";
rdfs:label "Élément";
rdfs:subClassOf rdfs:Literal .
this:IDSubstance a owl:Class;
core:faIcon "fa-thin fa-barcode";
rdfs:label "ID Substance";
rdfs:subClassOf rdfs:Literal .
this:CodeSMS a owl:Class;
core:faIcon "fa-thin fa-input-numeric";
rdfs:label "Code Substances SMS";
rdfs:subClassOf rdfs:Literal .
rdfs:label a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf;
rdfs:domain med:Presentation, med:SpecialitePharmaceutique, med:Substance, med:UniteCommuneDeDispensation;
rdfs:label "a pour désignation";
rdfs:range this:Text;
rdfs:subPropertyOf core:SearchProperty .
skos:altLabel a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf, this:search_rdfslabel_contains_rdfssubClassOf;
rdfs:domain med:Presentation, med:Substance;
rdfs:label "autre dénomination";
rdfs:range this:Text;
rdfs:subPropertyOf core:AutocompleteProperty, core:SearchProperty .
med:CIP13 a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf;
rdfs:domain med:Presentation;
rdfs:label "a pour CIP13";
rdfs:range this:CIP;
rdfs:subPropertyOf core:SearchProperty .
med:CIP7 a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf;
rdfs:domain med:Presentation;
rdfs:label "a pour CIP7";
rdfs:range this:CIP;
rdfs:subPropertyOf core:SearchProperty .
med:nombreUniteDeDispensation a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf;
rdfs:domain med:Presentation;
rdfs:label "contient";
rdfs:range this:NombreUnites;
rdfs:subPropertyOf core:SearchProperty .
med:typeDispositif a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf;
rdfs:domain med:Presentation;
rdfs:label "comprend";
rdfs:range this:TypeDispositif;
rdfs:subPropertyOf core:LiteralListProperty .
med:presente a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:search_rdfslabel_contains_rdfssubClassOf;
rdfs:domain med:Presentation;
rdfs:label "associée à";
rdfs:range med:SpecialitePharmaceutique;
rdfs:subPropertyOf core:AutocompleteProperty .
med:contientUniteDeDispensation a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:search_rdfslabel_cis_cip_ucd_contains_rdfssubClassOf;
rdfs:domain med:Presentation;
rdfs:label "associée à";
rdfs:range med:UniteCommuneDeDispensation;
rdfs:subPropertyOf core:AutocompleteProperty .
med:concernePar a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_rdfslabel_alpha_rdfssubClassOf_with_count;
rdfs:domain med:Presentation, med:SpecialitePharmaceutique;
rdfs:label "est concernée par";
rdfs:range med:Evenement;
rdfs:subPropertyOf core:NonSelectableProperty .
med:codeUCD13 a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf;
rdfs:domain med:UniteCommuneDeDispensation;
rdfs:label "a pour UCD 13";
rdfs:range this:UCD;
rdfs:subPropertyOf core:SearchProperty .
med:codeUCD7 a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf;
rdfs:domain med:UniteCommuneDeDispensation;
rdfs:label "a pour UCD 7";
rdfs:range this:UCD;
rdfs:subPropertyOf core:SearchProperty .
med:uniteDeDispensationDe a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:search_rdfslabel_contains_rdfssubClassOf;
rdfs:domain med:UniteCommuneDeDispensation;
rdfs:label "est UCD de";
rdfs:range med:SpecialitePharmaceutique;
rdfs:subPropertyOf core:AutocompleteProperty .
rdfs:subClassOf a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
rdfs:domain med:UniteCommuneDeDispensation;
rdfs:label "classement";
rdfs:subPropertyOf core:ListProperty .
med:presenteDans a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:search_rdfslabel_contains_rdfssubClassOf;
rdfs:domain med:UniteCommuneDeDispensation;
rdfs:label "est présentée dans";
rdfs:range med:Presentation;
rdfs:subPropertyOf core:AutocompleteProperty .
med:CIS a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf;
rdfs:domain med:SpecialitePharmaceutique;
rdfs:label "a pour CIS";
rdfs:range this:CIS;
rdfs:subPropertyOf core:SearchProperty .
med:actif a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf;
rdfs:domain med:SpecialitePharmaceutique;
rdfs:label "actif Vrai/Faux";
rdfs:range med:StatutSpecialite;
rdfs:subPropertyOf core:BooleanProperty .
med:dateDebut a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf;
rdfs:domain med:SpecialitePharmaceutique;
rdfs:label "mise sur le marché";
rdfs:range this:Date;
rdfs:subPropertyOf core:TimeProperty-Date .
med:dateFin a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf;
rdfs:domain med:SpecialitePharmaceutique;
rdfs:label "plus active depuis";
rdfs:range this:Date;
rdfs:subPropertyOf core:TimeProperty-Date .
med:classificationATC a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
core:sparqlString "<http://data.esante.gouv.fr/ansm/medicament/classificationATC>/<http://www.w3.org/2000/01/rdf-schema#subClassOf>*";
datasources:treeChildrenDatasource this:tree_atc_child;
datasources:treeRootsDatasource this:tree_atc_root;
rdfs:domain med:SpecialitePharmaceutique;
rdfs:label "est classée sous";
rdfs:range this:ATC;
rdfs:subPropertyOf core:TreeProperty .
med:codeATC a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:search_rdfslabel_contains_rdfssubClassOf;
rdfs:domain med:SpecialitePharmaceutique;
rdfs:label "a pour ATC";
rdfs:range this:CodeATC;
rdfs:subPropertyOf core:SearchProperty .
this:labelATC a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
core:sparqlString "<http://data.esante.gouv.fr/ansm/medicament/classificationATC>/<http://www.w3.org/2000/01/rdf-schema#label>";
datasources:datasource this:search_rdfslabel_contains_rdfssubClassOf;
rdfs:domain med:SpecialitePharmaceutique;
rdfs:label "libellé ATC";
rdfs:range this:CodeATC;
rdfs:subPropertyOf core:SearchProperty .
med:typeProcedureCourante a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_rdfslabel_alpha_rdfssubClassOf_with_count;
rdfs:domain med:SpecialitePharmaceutique;
rdfs:label "type de procédure courante";
rdfs:range med:TypeProcedure;
rdfs:subPropertyOf core:ListProperty .
med:statutCourant a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_rdfslabel_alpha_rdfssubClassOf_with_count;
rdfs:domain med:SpecialitePharmaceutique;
rdfs:label "a pour statut";
rdfs:range med:StatutSpecialite;
rdfs:subPropertyOf core:ListProperty .
med:substanceActive a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:search_rdfslabel_contains_rdfssubClassOf;
rdfs:domain med:SpecialitePharmaceutique;
rdfs:label "contient";
rdfs:range med:Substance;
rdfs:subPropertyOf core:AutocompleteProperty .
med:aPourUniteDeDispensation a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:search_rdfslabel_contains_rdfssubClassOf;
rdfs:domain med:SpecialitePharmaceutique;
rdfs:label "a pour UCD";
rdfs:range med:UniteCommuneDeDispensation;
rdfs:subPropertyOf core:AutocompleteProperty .
med:aPourPresentation a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:search_rdfslabel_contains_rdfssubClassOf;
rdfs:domain med:SpecialitePharmaceutique;
rdfs:label "est conditionnée sous";
rdfs:range med:Presentation;
rdfs:subPropertyOf core:AutocompleteProperty .
med:concerne a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:search_rdfslabel_contains_rdfssubClassOf;
rdfs:domain med:Evenement;
rdfs:label "concerne";
rdfs:range med:Presentation, med:SpecialitePharmaceutique;
rdfs:subPropertyOf core:AutocompleteProperty .
med:typeEvenement a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_rdfslabel_alpha_rdfssubClassOf_with_count;
rdfs:domain med:Evenement;
rdfs:label "est de type";
rdfs:range med:TypeEvenement;
rdfs:subPropertyOf core:ListProperty .
med:dateEffet a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
rdfs:domain med:Evenement;
rdfs:label "applicable depuis";
rdfs:range this:Date;
rdfs:subPropertyOf core:TimeProperty-Date .
dct:identifier a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf;
rdfs:domain med:Substance;
rdfs:label "a pour identifiant";
rdfs:range this:IDSubstance;
rdfs:subPropertyOf core:SearchProperty .
med:codeSMS a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
datasources:datasource this:list_literal_alpha_rdfssubClassOf;
rdfs:domain med:Substance;
rdfs:label "a pour SMS";
rdfs:range this:CodeSMS;
rdfs:subPropertyOf core:SearchProperty .
this:estSubstanceActiveDans a owl:ObjectProperty;
core:enableNegation true;
core:enableOptional true;
core:sparqlString "^<http://data.esante.gouv.fr/ansm/medicament/substanceActive>";
datasources:datasource this:search_rdfslabel_contains_rdfssubClassOf;
rdfs:domain med:Substance;
rdfs:label "active dans";
rdfs:range med:SpecialitePharmaceutique;
rdfs:subPropertyOf core:AutocompleteProperty .
this:list_rdfslabel_alpha_rdfssubClassOf_with_count a datasources:SparqlDatasource;
datasources:labelProperty rdfs:label;
datasources:queryTemplate this:query_list_label_subClassOfOf_alpha_with_count .
this:search_rdfslabel_contains_rdfssubClassOf a datasources:SparqlDatasource;
datasources:labelProperty rdfs:label;
datasources:queryTemplate this:query_search_med_subClassOf_contains .
this:search_rdfslabel_cis_cip_ucd_contains_rdfssubClassOf a datasources:SparqlDatasource;
datasources:labelPath "<http://www.w3.org/2000/01/rdf-schema#label>|<http://data.esante.gouv.fr/ansm/medicament/CIS>|<http://data.esante.gouv.fr/ansm/medicament/CIP13>|<http://data.esante.gouv.fr/ansm/medicament/codeUCD13>|<http://www.w3.org/2004/02/skos/core#altLabel>";
datasources:queryTemplate this:query_search_med_subClassOf_contains .
this:list_literal_alpha_rdfssubClassOf a datasources:SparqlDatasource;
datasources:labelProperty med:unite;
datasources:queryTemplate this:query_list_med_subClassOf_alpha .
this:tree_atc_root a datasources:SparqlDatasource;
datasources:queryString """PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?uri (CONCAT(?code, \" - \", STR(?rdfs_label)) AS ?label) (COUNT(?x) AS ?count)
WHERE {
?uri rdfs:subClassOf <http://data.esante.gouv.fr/whocc/atc/ATC> .
?uri rdfs:label ?rdfs_label .
?uri skos:notation ?code .
FILTER(lang(?rdfs_label) = $lang)
# Counts how many time the URI is used as value in the criteria build in Sparnatural
OPTIONAL {
?x $property ?uri .
}
}
GROUP BY ?uri ?code ?rdfs_label""" .
this:tree_atc_child a datasources:SparqlDatasource;
datasources:queryString """PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?uri (CONCAT(?code, \" - \", STR(?rdfs_label)) AS ?label) ?hasChildren (COUNT(?x) AS ?count)
WHERE {
?uri rdfs:subClassOf $node .
?uri rdfs:label ?rdfs_label .
?uri skos:notation ?code .
FILTER(lang(?rdfs_label) = $lang)
OPTIONAL { ?something rdfs:subClassOf ?uri }
BIND(bound(?something) AS ?hasChildren)
# Counts how many time the URI is used as value in the criteria build in Sparnatural
OPTIONAL {
?x $property ?uri .
}
}
GROUP BY ?uri ?code ?rdfs_label ?hasChildren""" .
this:query_list_label_subClassOfOf_alpha_with_count a "config-datatsources:SPARQLQuery";
datasources:queryString """PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX med:<http://data.esante.gouv.fr/ansm/medicament/>
SELECT DISTINCT ?uri ?count (CONCAT(STR(?theLabel), ' (', STR(?count), ')') AS ?label)
WHERE {
{
SELECT DISTINCT ?uri (COUNT(DISTINCT ?domain) AS ?count)
WHERE {
?domain rdfs:subClassOf $domain .
?domain $property ?uri .
FILTER(isIRI(?uri))
# Note how the range criteria is not used in this query
}
GROUP BY ?uri
}
OPTIONAL { ?uri $labelPath ?theLabelLang . FILTER(lang(?theLabelLang) = $lang) }
OPTIONAL { ?uri $labelPath ?theLabelNone . FILTER(lang(?theLabelNone) = \"\") }
BIND(COALESCE(?theLabelLang, ?theLabelNone, STR(?uri)) AS ?theLabel)
}
ORDER BY UCASE(?label)
LIMIT 500""" .
this:query_list_label_alpha_with_count_langfr a "config-datatsources:SPARQLQuery";
datasources:queryString """SELECT DISTINCT ?uri ?count (CONCAT(STR(?theLabel), ' (', STR(?count), ')') AS ?label)
WHERE {
{
SELECT DISTINCT ?uri (COUNT(?domain) AS ?count)
WHERE {
?domain a $domain .
?domain $property ?uri .
FILTER(isIRI(?uri))
# Note how the range criteria is not used in this query
}
GROUP BY ?uri
}
OPTIONAL { ?uri $labelPath ?theLabelLang . FILTER(lang(?theLabelLang) = $lang) }
OPTIONAL { ?uri $labelPath ?theLabelNone . FILTER(lang(?theLabelNone) = \"\") }
OPTIONAL { ?uri $labelPath ?theLabelFr . FILTER(lang(?theLabelFr) = \"fr\") }
BIND(COALESCE(?theLabelLang, ?theLabelNone, ?theLabelFr, STR(?uri)) AS ?theLabel)
}
ORDER BY UCASE(?label)
LIMIT 500""" .
this:query_list_label_count_langfr a "config-datatsources:SPARQLQuery";
datasources:queryString """SELECT ?uri ?count (CONCAT(STR(?theLabel), ' (', STR(?count), ')') AS ?label)
WHERE {
{
SELECT DISTINCT ?uri (COUNT(?domain) AS ?count)
WHERE {
?domain a $domain .
?domain $property ?uri .
FILTER(isIRI(?uri))
# Note how the range criteria is not used in this query
}
GROUP BY ?uri
}
OPTIONAL { ?uri $labelPath ?theLabelLang . FILTER(lang(?theLabelLang) = $lang) }
OPTIONAL { ?uri $labelPath ?theLabelNone . FILTER(lang(?theLabelNone) = \"\") }
OPTIONAL { ?uri $labelPath ?theLabelFr . FILTER(lang(?theLabelFr) = \"fr\") }
BIND(COALESCE(?theLabelLang, ?theLabelNone, ?theLabelFr) AS ?theLabel)
}
ORDER BY DESC(?count) UCASE(?label)
LIMIT 500""" .
this:query_list_label_alpha_langfr a "config-datatsources:SPARQLQuery";
datasources:queryString """SELECT DISTINCT ?uri ?label
WHERE {
?domain a $domain .
?domain $property ?uri .
# Note how the range criteria is not used in this query
FILTER(isIRI(?uri))
OPTIONAL { ?uri $labelPath ?theLabelLang . FILTER(lang(?theLabelLang) = $lang) }
OPTIONAL { ?uri $labelPath ?theLabelNone . FILTER(lang(?theLabelNone) = \"\") }
OPTIONAL { ?uri $labelPath ?theLabelFr . FILTER(lang(?theLabelFr) = \"fr\") }
BIND(COALESCE(?theLabelLang, ?theLabelNone, ?theLabelFr) AS ?label)
}
ORDER BY UCASE(?label)
LIMIT 500""" .
this:query_search_label_contains_langfr a "config-datatsources:SPARQLQuery";
datasources:queryString """SELECT DISTINCT ?uri ?label
WHERE {
?domain a $domain .
?domain $property ?uri .
?uri a $range .
?uri $labelPath ?label .
FILTER(isIRI(?uri))
FILTER(CONTAINS(LCASE(STR(?label)), LCASE(\"$key\")))
FILTER(lang(?label) = '' || lang(?label) = \"fr\")
}
ORDER BY UCASE(?label)
LIMIT 50""" .
this:query_list_med_subClassOf_alpha_with_count a "config-datatsources:SPARQLQuery";
datasources:queryString """PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX med:<http://data.esante.gouv.fr/ansm/medicament/>
SELECT DISTINCT ?value ?count (CONCAT(STR(?value), ' (', STR(?count), ')') AS ?label)
WHERE {
{
SELECT DISTINCT ?value (COUNT(DISTINCT ?domain) AS ?count)
WHERE {
?domain rdfs:subClassOf $domain .
?domain $property ?value .
# Note how the range criteria is not used in this query
}
GROUP BY ?value
}
OPTIONAL { ?uri $labelPath ?theLabelLang.}
}
ORDER BY UCASE(?label)
LIMIT 500""" .
this:query_list_med_subClassOf_alpha a "config-datatsources:SPARQLQuery";
datasources:queryString """PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX med:<http://data.esante.gouv.fr/ansm/medicament/>
SELECT DISTINCT ?value (STR(?value) AS ?label)
WHERE {
?domain rdfs:subClassOf $domain .
?domain $property ?value .
}
ORDER BY UCASE(?label)
LIMIT 500""" .
this:query_search_med_subClassOf_contains a "config-datatsources:SPARQLQuery";
datasources:queryString """PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX med:<http://data.esante.gouv.fr/ansm/medicament/>
SELECT DISTINCT ?uri ?label
WHERE {
?domain rdfs:subClassOf $domain .
?domain $property ?uri .
?uri rdfs:subClassOf $range .
?uri $labelPath ?label .
FILTER(isIRI(?uri))
FILTER(lang(?label) = '' || lang(?label) = $lang)
FILTER(CONTAINS(LCASE(STR(?label)), LCASE(\"$key\")))
}
ORDER BY UCASE(?label)
LIMIT 50""" .