From a8cbc86df3cbb9c04c53c1030126abc0bc77f63d Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Mon, 20 Nov 2017 19:58:45 +0100 Subject: [PATCH] Add new property + first SPARQL query --- data/abox.ttl | 3 +++ data/sparql.txt | 15 +++++++++++++++ data/tbox.ttl | 5 +++++ 3 files changed, 23 insertions(+) diff --git a/data/abox.ttl b/data/abox.ttl index cb626e9..bf9aa64 100644 --- a/data/abox.ttl +++ b/data/abox.ttl @@ -10,6 +10,7 @@ foaf:givenName "Tatsumi"^^xsd:string . :Wii rdf:type :GameConsole . +:Wii :madeBy :Nintendo . :Nintendo rdf:type foaf:Organization ; :ceo :Kimishima ; @@ -22,9 +23,11 @@ :numOfSupportedControllers 8 ; :predecessorOfConsole :Wii ; :releaseYear 2012 ; + :madeBy :Nintendo ; :successorOfConsole :Switch . :Switch rdf:type :PortableGameConsole . +:Switch :madeBy :Nintendo :Switch rev:hasReview :SwitchReviewByJPT . :JPT rdf:type foaf:Person ; diff --git a/data/sparql.txt b/data/sparql.txt index e69de29..b7e8fc0 100644 --- a/data/sparql.txt +++ b/data/sparql.txt @@ -0,0 +1,15 @@ +# Common prefixes across all queries +PREFIX : +PREFIX rdf: +PREFIX xsd: +PREFIX rdfs: +PREFIX foaf: +PREFIX rev: + +# How many consoles did nintendo produce? +SELECT COUNT(?console) AS ?numConsoles +WHERE { + ?console :madeBy ?organization . +} +GROUP BY ?organization + diff --git a/data/tbox.ttl b/data/tbox.ttl index 74a141d..e6fd303 100644 --- a/data/tbox.ttl +++ b/data/tbox.ttl @@ -42,6 +42,11 @@ rdfs:domain :GameConsole ; rdfs:range xsd:int . +:madeBy rdf:type rdf:Property ; + rdfs:domain :GameConsole ; + rdfs:range foaf:Organization . + + # rdfs:Datatype :PriceEur rdf:type rdfs:Datatype . :PriceEur rdfs:label "Preis in Euro"^^xsd:string .