Skip to content

Commit

Permalink
learning
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoqi Zhao committed Oct 4, 2024
1 parent 1e7389a commit 8d130a5
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/ex122.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# filename: ex122.ttl

@prefix ab: <http://learningsparql.com/ns/addressbook#> .
@prefix d: <http://learningsparql.com/ns/data#> .

# People

d:i5433 ab:firstName "Katherine" ;
ab:lastName "Duncan" ;
ab:email "katherine.duncan@elpaso.com" .

d:i2194 ab:firstName "Bradley" ;
ab:lastName "Perry" ;
ab:email "bradley.perry@corning.com" .
9 changes: 9 additions & 0 deletions test/ex125.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# filename: ex125.ttl

@prefix ab: <http://learningsparql.com/ns/addressbook#> .
@prefix d: <http://learningsparql.com/ns/data#> .

# Courses

d:course42 ab:courseTitle "Combining Public and Private RDF Data" .
d:course24 ab:courseTitle "Using Name Graphs" .
23 changes: 23 additions & 0 deletions test/ex178.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ex178.rq

PREFIX cat: <http://dbpedia.org/resource/Category:>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX gp: <http://wifo5-04.informatik.uni-mannheim.de/gutendata/resource/people/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2024/02/skos/core#>

# SELECT ?dbpProperty ?dbpValue ?gutenProperty ?gutenValue
CONSTRUCT {
<http://dbpedia.org/resource/Joseph_Hocking> ?dbpProperty ?dbpValue .
gp:Hocking_Joseph ?gutenProperty ?gutenValue .
}
WHERE {
SERVICE <http://DBpedia.org/sparql> {
<http://dbpedia.org/resource/Joseph_Hocking> ?dbpProperty ?dbpValue .
}
SERVICE <http://wifo5-04.informatik.uni-mannheim.de/gutendata/sparql> {
gp:Hocking_Joseph ?gutenProperty ?gutenValue .
}
}
13 changes: 13 additions & 0 deletions test/ex180.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
PREFIX ab: <http://learningsparql.com/ns/addressbook#>

# CONSTRUCT {
# ?course ab:courseTitle ?courseName .
# }
SELECT *
# FROM NAMED <ex122.ttl>
FROM NAMED <ex125.ttl>
WHERE {
GRAPH <ex125.ttl> {
?course ab:courseTitle ?courseName
}
}

0 comments on commit 8d130a5

Please sign in to comment.