SPARQL

Esplora in TriplyDB →

 

Guida all'interrogazione SPARQL

1. Prefissi standard da usare

Prima di ogni query aggiungere i seguenti prefissi:

PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX schema: <http://schema.org/>
PREFIX sdo: <https://schema.org/>       
PREFIX fabio: <http://purl.org/spar/fabio/>
PREFIX frbr: <http://purl.org/vocab/frbr/core#>
PREFIX dbpedia: <http://dbpedia.org/ontology/>
PREFIX prism: <http://prismstandard.org/namespaces/basic/2.0/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX omeka: <http://omeka.org/s/vocabs/o#>

 

2. Tipi di entità principali

Tutte le classi (tipi RDF) sono interrogabili con:

?s a [tipo_di_entità] .

Le proprietà più usate sono: 

  • fabio:Manifestation  
  • fabio:Work  
  • frbr:Work  
  • frbr:Expression  
  • foaf:Person  
  • schema:Person  
  • omeka:item_set  
  • schema:MediaObject  
  • dcterms:BibliographicResource  

 

Query di esempio:

Per vedere tutte le persone nominate nel dataset

PREFIX frbr: <http://purl.org/vocab/frbr/core#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dcterms: <http://purl.org/dc/terms/> 
SELECT DISTINCT ?persona ?nome
WHERE {
  ?persona rdf:type frbr:Person ;
           dcterms:title ?nome .
  FILTER isLiteral(?nome)
}
ORDER BY ?nome
 

 

3. Proprietà chiave 

Proprietà Usata per
dcterms:title Titolo dell’opera
schema:author Autore (es. Fortini)
schema:datePublished Data di pubblicazione
fabio:isManifestationOf Collegamento a un’opera astratta
frbr:partOf Appartenenza a collezione o rivista
dcterms:contributor Collaboratori, curatori, prefatori
schema:inLanguage Lingua della pubblicazione ("it", ecc.)
prism:publicationDate Data alternativa (bibliografica)
omeka:source Fonte archivistica
< Previous page