Um semantische Ressourcen abzufragen, greifen Sie auf die <a href="https://schema.gov.it/de/sparql/">Virtuoso SPARQL Endpunktseite</a> messo a disposizione da schema. Ti comparirà una schermata dove è possibile inserire una query da specificare utilizzando il <a href="https://www.w3.org/TR/sparql11-query/">SPARQL-Sprache</a>
<img class="alignnone wp-image-736" src="https://schema.gov.it/wp-content/uploads/2025/12/SPARQL-endpoint.png" alt="Beschreibendes Bild des Bildschirms, mit dem Sie eine SPARQL-Abfrage schreiben können" width="721" height="236" />
Sobald die Abfrage geschrieben ist, können Sie auswählen, in welchem Format die Ergebnisse zurückgegeben werden sollen. Mehrere Optionen sind möglich, darunter HTML, CSV, JSON und mehrere RDF-Serialisierungen wie RDF/Turtle, RDF/XML und N-Triples.
Wenn Sie auf die Schaltfläche „Abfrage ausführen“ klicken, können Sie die Abfrage ausführen, um die gewünschten Ergebnisse zu erhalten.
Um alles abzubrechen, was Sie eingegeben und als Ergebnis ausgewählt haben, können Sie die Schaltfläche Zurücksetzen verwenden.
<img class="alignnone wp-image-737" src="https://schema.gov.it/wp-content/uploads/2025/12/SPARQL-opzioni-riguardanti-i-risultati.jpg" alt="Beschreibung der Optionen in Bezug auf das Abfrageergebnisformat, die Abfrageausführung und die Abfragelöschung " width="719" height="70" />
Um die Definition der Abfrage zu erleichtern, wird vorgeschlagen, die verschiedenen semantischen Ressourcen, die derzeit im Schema veröffentlicht sind, über das Web zu durchsuchen. Die Ressourcen sind durch Software wie LODE und LodView navigierbar. Verwenden Sie dazu einfach die URI der Ressourcen selbst in Ihrem Browser.
Im Folgenden finden Sie einige Beispiele für Abfragen zu semantischen Schemaressourcen in natürlicher Sprache. Jede Abfrage entspricht einer SPARQL-Abfrage, die von Virtuoso wie oben beschrieben ausgeführt werden kann.
Im Folgenden finden Sie einige Beispiele für Abfragen zu semantischen Schemaressourcen in natürlicher Sprache. Jede Abfrage entspricht einer SPARQL-Abfrage, die von Virtuoso wie oben beschrieben ausgeführt werden kann.
<ul>
<li><strong>Quali sono i comuni italiani, con relativo codice belfiore, dell’archivio storico ad essere validi ad oggi?</strong>
<pre><code>PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX clv: <https://w3id.org/italia/onto/CLV/>
PREFIX ti: <https://w3id.org/italia/onto/TI/>
PREFIX l0: <https://w3id.org/italia/onto/l0/>
SELECT ?s ?ID ?idCadastral ?name ?starttime ?endTime
WHERE {?s a skos:Concept ;
skos:inScheme <https://w3id.org/italia/controlled-vocabulary/territorial-classifications/cities> ;
skos:notation ?ID ;
skos:prefLabel ?name ;
clv:hasSOValidity/ti:endTime ?endTime ;
clv:hasSOValidity/ti:startTime ?starttime ;
?identifier a clv:Identifier ;
clv:identifierType ?idType ;
l0:identifier ?idCadastral .
FILTER (str(?endTime)="9999-12-31")
FILTER (str(?idType) = "Codice Catastale")
FILTER (lang(?idType) = "it")
}</code></pre>
</li>
<li><strong>In quale risorsa semantica è definito il concetto di “Servizio Pubblico” e qual è la sua definizione?</strong>
<pre><code>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT ?URIResource ?titleResource ?URIConcept ?label ?definition
where {
?URIConcept rdfs:isDefinedBy ?URIResource ;
rdfs:label ?label ;
rdfs:comment ?definition .
?URIResource dct:title ?titleResource .
FILTER ((str(?label)="Servizio Pubblico"))
FILTER (lang(?label) = 'it')
FILTER (lang(?definition) = 'it')
FILTER (lang(?titleResource) = 'it')
}</code></pre>
</li>
<li><strong>Welche Lizenzen fallen unter den offenen Lizenztyp?</strong>
<pre><code>PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX clv: <https://w3id.org/italia/onto/CLV/>
SELECT ?s ?ID ?name ?nameOpen
WHERE {?s a skos:Concept ;
skos:inScheme <https://w3id.org/italia/controlled-vocabulary/licences> ;
clv:hasRankOrder "3" ;
skos:notation ?ID ;
skos:prefLabel ?name ;
skos:broader*/skos:prefLabel ?nameOpen .
FILTER (str(?nameOpen)="Licenza Aperta")
FILTER (lang(?nameOpen) = 'it')
FILTER (lang(?name) = 'it')
}</code></pre>
</li>
<li><strong>Welche italienischen Provinzen sind bis heute gültig und zu welcher Region gehören sie?</strong>
<pre><code>PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX clv: <https://w3id.org/italia/onto/CLV/>
SELECT ?s ?province ?name ?IDISTATProv ?IDISTATReg ?nameRegion
WHERE {
?s a skos:Concept ;
skos:inScheme <https://w3id.org/italia/controlled-vocabulary/territorial-classifications/provinces> ;
skos:notation ?IDISTATProv ;
skos:prefLabel ?name ;
clv:acronym ?province ;
skos:broader ?region .
?region a skos:Concept ;
skos:inScheme <https://w3id.org/italia/controlled-vocabulary/territorial-classifications/regions> ;
skos:notation ?IDISTATReg ;
skos:prefLabel ?nameRegion .
}</code></pre>
<strong>Quali sono invece le città metropolitane?</strong>
<pre><code>PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX clv: <https://w3id.org/italia/onto/CLV/>
PREFIX l0: <https://w3id.org/italia/onto/l0/>
SELECT ?s ?province ?name ?IDISTATProv ?IDISTATReg ?nameRegion ?identifier ?idMetropolitanCode
WHERE {
?s a skos:Concept ;
skos:inScheme <https://w3id.org/italia/controlled-vocabulary/territorial-classifications/provinces> ;
skos:notation ?IDISTATProv ;
skos:prefLabel ?name ;
clv:acronym ?province ;
clv:hasIdentifier ?identifier ;
skos:broader ?region .
?identifier a clv:Identifier ;
clv:identifierType ?idType ;
l0:identifier ?idMetropolitanCode .
?region a skos:Concept ;
skos:inScheme <https://w3id.org/italia/controlled-vocabulary/territorial-classifications/regions> ;
skos:notation ?IDISTATReg ;
skos:prefLabel ?nameRegion .
FILTER (str(?idType) = "Codice Città Metropolitana")
FILTER (lang(?idType) = 'it')
}</code></pre>
</li>
<li><strong>In quale risorsa semantica è definito il “Numero Civico”?</strong>
<pre><code>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT ?URIResource ?titleResource ?URIConcept ?label
where {
?URIConcept rdfs:isDefinedBy ?URIResource ;
rdfs:label ?label .
?URIResource dct:title ?titleResource .
FILTER ((str(?label)="Numero Civico"))
FILTER (lang(?label) = 'it')
FILTER (lang(?titleResource) = 'it')
}</code></pre>
</li>
</ul>