This page presents some examples of HOW-TO access the LOD datasets and get some data in one of the available formats (JSON, CSV, RDF/XML, Turtle, etc.) exposed by our SPARQL endpoint. Data from Tessin and Lombardy regions are available, which are identified, respectively, by "TI_" and "IT_" prefix in the graph name.
On the https://gioconda.supsi.ch/sparql page you can fill in some input fields of a form to run a SPARQL query to the GIOCOnDa platform, as shown in the following image:
As a first step, on the https://gioconda.supsi.ch/sparql
you can run the default query with the "Run Query" button in order to see all the available dataset graphs
(Graph IRIs) which a query can be made to. The IRI is used to identify the dataset in a query, by filling in
the "Default Data Set Name (Graph IRI)" field at the top of the query page. IRIs that end with "_voc_{n}"
represent reference vocabularies that are used by some of the other graphs.
For example, the "http://gioconda.supsi.ch:8890/IT_hotel" graph identifies the dataset of all the Lombardy
hotels.
On the https://gioconda.supsi.ch/sparql page you can:
In the sparql query text some prefixes that identify specific ontologies should be included; they are defined according to the OntoPiA reference definition detailed on https://github.com/italia/daf-ontologie-vocabolari-controllati/
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix cis: <http://dati.beniculturali.it/cis/>
prefix clvapit: <https://w3id.org/italia/onto/CLV/>
prefix smapit: <https://w3id.org/italia/onto/SM/>
prefix acapit: <https://w3id.org/italia/onto/AccessCondition/>
prefix pot: <https://w3id.org/italia/onto/POT/>
prefix poiapit: <https://w3id.org/italia/onto/POI/>
prefix accoapit: <https://w3id.org/italia/onto/ACCO/>
prefix ti: <https://w3id.org/italia/onto/TI/>
prefix l0: <https://w3id.org/italia/onto/l0/>
prefix mu: <https://w3id.org/italia/onto/MU/>
This query returns the list of all the museums in Tessin from the TI_musei dataset described by some properties such as name, coordinates (lat, lon), etc.
select * where {
?a a cis:Museum .
optional{?a rdfs:label ?museum_name .}
optional{?a cis:institutionalName ?museum_istitutional_name .}
# site
optional{
?a cis:hasSite ?b .
# name
optional{?b rdfs:label ?site_name .}
# address
optional{
?b cis:siteAddress ?c .
?c clvapit:fulladdress ?full_address .
}
# geometry
optional{
?b clvapit:hasGeometry ?d .
optional{?d rdfs:label ?epsg .}
optional{?d clvapit:coordinateSystem ?coordinate .}
optional{?d clvapit:lat ?lat .}
optional{?d clvapit:long ?lon .}
}
}
# discipline
optional{
?a cis:hasDiscipline ?e .
?e rdfs:label ?discipline .
}
# online_contact_point
optional{
?a smapit:hasOnlineContactPoint ?f .
# email
optional{
?f smapit:hasEmail ?g .
?g smapit:emailAddress ?email .
}
# telephone
optional{
?f smapit:hasTelephoneNumber ?h .
?h smapit:telephoneNumber ?telephone .
}
# website
optional{
?f smapit:hasWebSite ?i .
?i smapit:URL ?website .
}
}
# access_condition
optional{
?a acapit:hasAccessCondition ?l .
# opening_closing_decription
optional{?l l0:description ?opening_closing_desccription .}
# closing_reason
optional{?l acapit:reasonClosure ?closing_reason .}
# admission_type notes
optional{
?l acapit:hasAdmissionType ?m .
?m l0:description ?admission_notes .
}
}
# offer
optional{
?a pot:hasTicket ?n .
# price_specification
optional{
?n pot:hasPriceSpecification ?o .
?o pot:hasCurrencyValue ?ticket_price .
}
# ticket
optional{
?n pot:includes ?p .
?p pot:name ?ticket_name .
}
}
# service
optional{
?a cis:providesService ?q .
?q cis:name ?service_name .
}
}
This query returns the list of all the hotels in Lombardy from the IT_hotel dataset described by some properties such as name, address, coordinates (lat, lon), etc.
select * where {
?a a accoapit:Accomodation .
optional{?a rdfs:label ?type_name .}
optional{?a poiapit:POIofficialName ?acco_name .}
optional{?a accoapit:hasAccommodationClassification ?acco_classification .}
optional{?a accoapit:hasAccommodationTypology ?acco_typology .}
# address
optional{
?a clvapit:hasAddress ?c .
?c clvapit:fulladdress ?full_address .
}
# geometry
optional{
?a clvapit:hasGeometry ?d .
optional{?d rdfs:label ?epsg .}
optional{?d clvapit:coordinateSystem ?coordinate .}
optional{?d clvapit:lat ?lat .}
optional{?d clvapit:long ?lon .}
}
# online_contact_point
optional{
?a smapit:hasOnlineContactPoint ?f .
# email
optional{
?f smapit:hasEmail ?g .
?g smapit:emailAddress ?email .
}
# telephone
optional{
?f smapit:hasTelephoneNumber ?h .
?h smapit:telephoneNumber ?telephone_fax .
}
# website
optional{
?f smapit:hasWebSite ?i .
?i smapit:URL ?website .
}
}
# offer
optional{
?a pot:hasOffer ?n .
# price_specification
optional{
?n pot:hasPriceSpecification ?o .
?o pot:hasCurrencyValue ?ticket_price .
?o pot:hasCurrency ?p .
?p rdfs:label ?currency
}
}
# image
optional{
?a smapit:hasImage ?q .
?q smapit:URL ?image_url .
}
} order by ?acco_name