Skip to content

Instantly share code, notes, and snippets.

@RubenVerborgh
Last active August 29, 2015 14:21
Show Gist options
  • Save RubenVerborgh/89f8724e9fd144cfe025 to your computer and use it in GitHub Desktop.
Save RubenVerborgh/89f8724e9fd144cfe025 to your computer and use it in GitHub Desktop.
Example Triple Pattern Fragment
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dc: <http://purl.org/dc/terms/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc11: <http://purl.org/dc/elements/1.1/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX dbpedia: <http://dbpedia.org/resource/>
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
PREFIX dbpprop: <http://dbpedia.org/property/>
PREFIX hydra: <http://www.w3.org/ns/hydra/core#>
PREFIX void: <http://rdfs.org/ns/void#>
# METADATA AND CONTROLS (IN SEPARATE GRAPH)
<http://fragments.dbpedia.org/2014/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FMadrid#metadata> {
# Explicitly relate metadata and controls to fragment
<http://fragments.dbpedia.org/2014/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FMadrid#metadata> foaf:primaryTopic <http://fragments.dbpedia.org/2014/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FMadrid>.
# Describe hypermedia controls
<http://fragments.dbpedia.org/#dataset> hydra:member <http://fragments.dbpedia.org/2014/en#dataset>.
<http://fragments.dbpedia.org/2014/en#dataset> a void:Dataset, hydra:Collection;
void:subset <http://fragments.dbpedia.org/2014/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FMadrid>;
void:uriLookupEndpoint "http://fragments.dbpedia.org/2014/en{?subject,predicate,object}";
hydra:search _:triplePattern.
_:triplePattern hydra:template "http://fragments.dbpedia.org/2014/en{?subject,predicate,object}";
hydra:mapping _:subject, _:predicate, _:object.
_:subject hydra:variable "subject";
hydra:property rdf:subject.
_:predicate hydra:variable "predicate";
hydra:property rdf:predicate.
_:object hydra:variable "object";
hydra:property rdf:object.
# Describe fragment
<http://fragments.dbpedia.org/2014/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FMadrid> void:subset <http://fragments.dbpedia.org/2014/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FMadrid>;
a hydra:Collection, hydra:PagedCollection;
dcterms:title "Linked Data Fragment of DBpedia 2014"@en;
dcterms:description "Triple Pattern Fragment of the 'DBpedia 2014' dataset containing triples matching the pattern { <http://dbpedia.org/resource/Madrid> ?p ?o }."@en;
dcterms:source <http://fragments.dbpedia.org/2014/en#dataset>;
hydra:totalItems "409"^^xsd:integer;
void:triples "409"^^xsd:integer;
hydra:itemsPerPage "100"^^xsd:integer;
hydra:firstPage <http://fragments.dbpedia.org/2014/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FMadrid&page=1>;
hydra:nextPage <http://fragments.dbpedia.org/2014/en?subject=http%3A%2F%2Fdbpedia.org%2Fresource%2FMadrid&page=2>
}
# FRAGMENT DATA (IN DEFAULT GRAPH)
dbpedia:Madrid dbpedia-owl:abstract "Madrid (English /məˈdrɪd/, Spanish: [maˈðɾið]) is the capital of Spain and its largest city. The population of the city is roughly 3.3 million and the entire population of the Madrid metropolitan area is calculated to be around 6.5 million. It is the third-largest city in the European Union, after London and Berlin, and its metropolitan area is the third-largest in the European Union after London and Paris. The city spans a total of 604.3 km2 (233.3 sq mi).The city is located on the Manzanares River in the centre of both the country and the Community of Madrid (which comprises the city of Madrid, its conurbation and extended suburbs and villages); this community is bordered by the autonomous communities of Castile and León and Castile-La Mancha. As the capital city of Spain, seat of government, and residence of the Spanish monarch, Madrid is also the political, economic and cultural centre of Spain. The current mayor is Ana Botella from the People's Party (PP).The Madrid urban agglomeration has the third-largest GDP in the European Union and its influences in politics, education, entertainment, environment, media, fashion, science, culture, and the arts all contribute to its status as one of the world's major global cities. Due to its economic output, high standard of living, and market size, Madrid is considered the major financial centre of Southern Europe and the Iberian Peninsula; it hosts the head offices of the vast majority of the major Spanish companies, such as Telefónica, Iberia or Repsol. Madrid is the 10th most livable city in the world according to Monocle magazine, in its 2010 index.Madrid houses the headquarters of the World Tourism Organization (WTO), belonging to the United Nations Organization (UN), the SEGIB, the Organization of Ibero-American States (OEI), and the Public Interest Oversight Board (PIOB). It also hosts major international institutions regulators of Spanish: the Standing Committee of the Association of Spanish Language Academies, headquarters of the Royal Spanish Academy (RAE), the Cervantes Institute and the Foundation of Urgent Spanish (Fundéu BBVA). Madrid organizes fairs such as FITUR, ARCO, SIMO TCI and the Cibeles Madrid Fashion Week.While Madrid possesses a modern infrastructure, it has preserved the look and feel of many of its historic neighbourhoods and streets. Its landmarks include the Royal Palace of Madrid; the Royal Theatre with its restored 1850 Opera House; the Buen Retiro Park, founded in 1631; the 19th-century National Library building (founded in 1712) containing some of Spain's historical archives; a large number of National museums, and the Golden Triangle of Art, located along the Paseo del Prado and comprising three art museums: Prado Museum, the Reina Sofía Museum, a museum of modern art, and the Thyssen-Bornemisza Museum, which completes the shortcomings of the other two museums. Cibeles Palace and Fountain have become the monument symbol of the city."@en;
dbpedia-owl:individualisedGnd "1021984-5";
dbpedia-owl:wikiPageExternalLink <http://maps.google.es/?q=Est%3AMadrid%2C%20Cuatro%20Vientos%4040.3755555556%2C-3.7861111111&t=p&ll=40.3755555556%2C-3.7861111111&spn=0.182837%2C0.291824&z=11&output=embed>, <http://www.aena-aeropuertos.es/madrid-barajas/en>, <http://www.esmadrid.com/en/portal.do>, <http://www.ine.es/jaxi/menu.do?type=pcaxis&path=%2Ft20%2Fe260&file=inebase&L=1>, <http://www.madrid.es/>, <http://www.madrid.es/portales/munimadrid/en/Home?vgnextfmt=default&vgnextchannel=1ccd566813946010VgnVCM100000dc0ca8c0RCRD&idioma=en&idiomaPrevio=en&combo=1>, <http://www.metromadrid.es/en/index.html>, <http://www.spain.info/en/que-quieres/ciudades-pueblos/grandes-ciudades/madrid.html>, <http://www.wikimapia.org/#y=40420000&x=-3710000&z=11&l=1&m=a>;
dbpedia-owl:wikiPageID "41188263"^^xsd:integer;
dbpedia-owl:wikiPageRevisionID "606522096"^^xsd:integer;
dbpprop:aprHighC "17.5"^^xsd:double, "18"^^xsd:integer;
dbpprop:aprLowC "5.4"^^xsd:double, "6.2"^^xsd:double, "7.2"^^xsd:double;
dbpprop:aprMeanC "11.7"^^xsd:double, "11.8"^^xsd:double, "12.3"^^xsd:double;
dbpprop:aprPrecipitationDays "6"^^xsd:integer, "7"^^xsd:integer;
dbpprop:aprPrecipitationMm "39"^^xsd:integer, "47"^^xsd:integer, "48"^^xsd:integer;
dbpprop:aprRecordHighC "30.1"^^xsd:double;
dbpprop:aprRecordLowC "-1.6"^^xsd:double;
dbpprop:aprSun "219"^^xsd:integer, "223"^^xsd:integer, "231"^^xsd:integer;
dbpprop:augHighC "30.7"^^xsd:double, "31.7"^^xsd:double, "32.4"^^xsd:double;
dbpprop:augLowC "16"^^xsd:integer, "17.3"^^xsd:double, "18.2"^^xsd:double;
dbpprop:augMeanC "24.2"^^xsd:double, "24.4"^^xsd:double, "24.5"^^xsd:double;
dbpprop:augPrecipitationDays "2"^^xsd:integer;
dbpprop:augPrecipitationMm "10"^^xsd:integer, "12"^^xsd:integer, "14"^^xsd:integer;
dbpprop:augRecordHighC "40.6"^^xsd:double;
dbpprop:augRecordLowC "9.2"^^xsd:double;
dbpprop:augSun "328"^^xsd:integer, "332"^^xsd:integer, "335"^^xsd:integer;
dbpprop:centre "Madrid"@en;
dbpprop:collapsed "Y"@en;
dbpprop:commons "Madrid"@en;
dbpprop:d "Q2807"@en;
dbpprop:date "April 2013"@en, "August 2010"@en, "November 2011"@en;
dbpprop:decHighC "10.1"^^xsd:double, "10.6"^^xsd:double, "11"^^xsd:integer;
dbpprop:decLowC "1.8"^^xsd:double, "2.7"^^xsd:double, "3.8"^^xsd:double;
dbpprop:decMeanC "6.4"^^xsd:double, "6.7"^^xsd:double, "7"^^xsd:integer;
dbpprop:decPrecipitationDays "7"^^xsd:integer;
dbpprop:decPrecipitationMm "48"^^xsd:integer, "56"^^xsd:integer, "58"^^xsd:integer;
dbpprop:decRecordHighC "18.6"^^xsd:double;
dbpprop:decRecordLowC "-9.2"^^xsd:double;
dbpprop:decSun "115"^^xsd:integer, "124"^^xsd:integer, "127"^^xsd:integer;
dbpprop:east dbpedia:Valencia;
dbpprop:febHighC "12"^^xsd:integer, "12.4"^^xsd:double, "12.9"^^xsd:double;
dbpprop:febLowC "1.5"^^xsd:double, "2.7"^^xsd:double, "3.7"^^xsd:double;
dbpprop:febMeanC "7.2"^^xsd:double, "7.5"^^xsd:double, "7.9"^^xsd:double;
dbpprop:febPrecipitationDays "5"^^xsd:integer, "6"^^xsd:integer;
dbpprop:febPrecipitationMm "34"^^xsd:integer, "35"^^xsd:integer, "36"^^xsd:integer;
dbpprop:febRecordHighC "22"^^xsd:integer;
dbpprop:febRecordLowC "-9.1"^^xsd:double;
dbpprop:febSun "157"^^xsd:integer, "164"^^xsd:integer, "168"^^xsd:integer;
dbpprop:float "none"@en;
dbpprop:hasPhotoCollection <http://wifo5-03.informatik.uni-mannheim.de/flickrwrappr/photos/Madrid>;
dbpprop:janHighC "10.1"^^xsd:double, "10.6"^^xsd:double, "9.7"^^xsd:double;
dbpprop:janLowC "0.3"^^xsd:double.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment