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
## Query classes with their entities | |
SELECT DISTINCT ?class (COUNT(DISTINCT ?x) as ?entities) | |
where {?x a ?class. ?class a owl:Class. filter (?class != owl:Thing)} GROUP BY ?class HAVING (COUNT(?x)) ORDER BY DESC(?entities) |
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
## listing al the properties in an endpoint | |
select distinct ?s ?label where { {?s a owl:ObjectProperty; rdfs:label ?label} union {?s a owl:DatatypeProperty; rdfs:label ?label} union {?s a rdf:Property; rdfs:label ?label} }order by desc(?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
select distinct ?resource ?date where {{?resource ?p ?date. ?p a owl:DatatypeProperty; rdfs:range ?range. filter (?range= xsd:date || ?range= xsd:dateTime )} union {?resource ?p ?o. ?p a rdf:Property; rdfs:range ?range. filter (?range= xsd:date || ?range= xsd:dateTime)}} limit 1000 | |
###equivalent ASK query ###### | |
ASK where {{ ?p a owl:DatatypeProperty; rdfs:range ?range. filter (?range= xsd:date || ?range= xsd:dateTime )} union { ?p a rdf:Property; rdfs:range ?range. filter (?range= xsd:date || ?range= xsd:dateTime)}} |
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
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> | |
PREFIX voaf:<http://purl.org/vocommons/voaf#> | |
SELECT ?vocabURI (count(?dataset) as ?numberDataset) | |
WHERE{ | |
?vocabURI a voaf:Vocabulary . | |
?vocabURI voaf:usageInDataset ?usage. | |
?usage voaf:inDataset ?dataset. | |
?dataset rdfs:label ?datasetLabel. |
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
## 1- version for virtuoso endpoints | |
PREFIX geo-ont: <http://www.geonames.org/ontology#> | |
SELECT DISTINCT count(?s) | |
WHERE { | |
?s a geo-ont:Feature. | |
filter (contains(str(?s), "sws.geonames.org")) | |
} | |
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
PREFIX gn: <http://www.geonames.org/ontology#> | |
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> | |
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
PREFIX gsp: <http://www.opengis.net/ont/geosparql#> | |
CONSTRUCT { | |
?s a gn:Feature ; gn:countryCode ?code . | |
?s gn:name ?name ; gn:featureCode ?fcode ; gn:featureClass ?class . | |
?s rdfs:isDefinedBy ?def. | |
?s geo:lat ?lat. |
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
#metadata### | |
##cas données de la région 01 ## | |
@prefix dcat: <http://www.w3.org/ns/dcat#> . | |
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | |
@prefix dcterms: <http://purl.org/dc/terms/> . | |
<http://www.openstreetmap.fr/bano/data/> a dcat:Catalog ; | |
dcterms:title "Données des adresses du projet Bano en RDF"@fr ; |
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
## Q1: Converting PATH (route file) into RDF | |
## using CONSTRUCT query | |
PREFIX topo: <http://data.ign.fr/def/topo#> | |
prefix geom: <http://data.ign.fr/def/geometrie#> | |
prefix ignfr: <http://data.ign.fr/id/ignf/systCoord/> | |
prefix gsp: <http://www.opengis.net/ont/geosparql#> | |
prefix skos: <http://www.w3.org/2004/02/skos/core#> | |
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | |
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
# Second level administrative units in France | |
# in FactForge between Eurecom and Eiffel Tower total 36 | |
# using omgeo:within ( ) | |
PREFIX omgeo: <http://www.ontotext.com/owlim/geo#> | |
PREFIX geo-ont: <http://www.geonames.org/ontology#> | |
SELECT DISTINCT ?link ?m | |
WHERE { | |
?link geo-ont:name ?m. | |
?link geo-ont:featureCode geo-ont:A.ADM2 . |
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
PREFIX dcterms: <http://purl.org/dc/terms/> | |
CONSTRUCT { | |
?classURI a owl:Class, rdfs:Class. | |
?classURI rdfs:label ?level1label. | |
?level2URI a owl:Class, rdfs:Class; rdfs:subClassOf ?classURI; | |
rdfs:label ?level2label. | |
?level3URI a owl:Class, rdfs:Class; rdfs:subClassOf ?level2URI; | |
rdfs:label ?level3label. | |
?level4URI a owl:Class, rdfs:Class; rdfs:subClassOf ?level3URI; | |
rdfs:label ?level4label. |
OlderNewer