Link to Heard Library SPARQL endpoint:
http://rdf.library.vanderbilt.edu/sparql?view
The FOAF vocabulary: http://rdf.library.vanderbilt.edu/swwg/foaf.rdf
FOAF in Turtle: https://gist.github.com/baskaufs/fefa1bfbff14a9efc174
The Dublin Core metadata terms vocabulary: http://rdf.library.vanderbilt.edu/swwg/dcterms.rdf
DC terms in Turtle: https://gist.github.com/baskaufs/6fdab74aaf2a755bd069
The Dublin Core type vocabulary: http://rdf.library.vanderbilt.edu/swwg/dctype.rdf
DC types in Turtle: https://gist.github.com/baskaufs/a56096c2ac1408b8ff10
SW Working Group metadata: http://rdf.library.vanderbilt.edu/swwg/sww-group.rdf
SW Working Group relationships: http://rdf.library.vanderbilt.edu/swwg/assertions.ttl
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@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 geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
foaf:Image a rdfs:Class;
rdfs:isDefinedBy foaf:;
rdfs:subClassOf foaf:Document.
foaf:Person a rdfs:Class;
rdfs:isDefinedBy foaf:;
rdfs:subClassOf geo:SpatialThing,
foaf:Agent;
owl:disjointWith foaf:Organization,
foaf:Project.
SELECT ?subclass ?class
FROM <http://rdf.library.vanderbilt.edu/swwg/foaf.rdf>
WHERE {
?subclass rdfs:subClassOf ?class.
}
<http://orcid.org/0000-0003-4365-3135> a prov:Person,
foaf:Person;
rdfs:label "Steven J. Baskauf";
foaf:familyName "Baskauf";
foaf:givenName "Steve";
foaf:name "Steven J. Baskauf";
foaf:page <http://bioimages.vanderbilt.edu/>,
<http://vanderbilt.edu/trees>,
<https://my.vanderbilt.edu/baskauf/>.
<http://orcid.org/0000-0003-2445-1511> a prov:Person,
foaf:Person;
rdfs:label "Edward Warga";
foaf:familyName "Warga";
foaf:givenName "Edward".
<http://orcid.org/0000-0003-0328-0792> a prov:Person,
foaf:Person;
rdfs:label "Clifford B. Anderson";
foaf:familyName "Anderson";
foaf:givenName "Clifford";
foaf:name "Clifford B. Anderson";
foaf:page <http://www.library.vanderbilt.edu/scholarly/>.
<http://orcid.org/0000-0002-2174-0484> a prov:Person,
foaf:Person;
rdfs:label "Suellen Stringer-Hye";
foaf:familyName "Stringer-Hye";
foaf:givenName "Suellen".
SELECT ?person ?label
FROM <http://rdf.library.vanderbilt.edu/swwg/foaf.rdf>
FROM <http://rdf.library.vanderbilt.edu/swwg/sww-group.rdf>
FROM <http://rdf.library.vanderbilt.edu/swwg/assertions.ttl>
WHERE {
?group foaf:name "Semantic Web Working Group".
?group foaf:member ?person.
?person a foaf:Person.
?person rdfs:label ?label.
}
CONSTRUCT {
?person a foaf:Agent.
}
FROM <http://rdf.library.vanderbilt.edu/swwg/foaf.rdf>
FROM <http://rdf.library.vanderbilt.edu/swwg/sww-group.rdf>
FROM <http://rdf.library.vanderbilt.edu/swwg/assertions.ttl>
WHERE {
?group foaf:name "Semantic Web Working Group".
?group foaf:member ?person.
?person a foaf:Person.
}
CONSTRUCT {?person a foaf:Agent.}FROM <http://rdf.library.vanderbilt.edu/swwg/foaf.rdf>FROM <http://rdf.library.vanderbilt.edu/swwg/sww-group.rdf>FROM <http://rdf.library.vanderbilt.edu/swwg/assertions.ttl>WHERE {?group foaf:name "Semantic Web Working Group".?group foaf:member ?person.?person a foaf:Person.}
CONSTRUCT%20%7B%3Fperson%20a%20foaf%3AAgent.%7DFROM%20%3Chttp%3A%2F%2Frdf.library.vanderbilt.edu%2Fswwg%2Ffoaf.rdf%3EFROM%20%3Chttp%3A%2F%2Frdf.library.vanderbilt.edu%2Fswwg%2Fsww-group.rdf%3EFROM%20%3Chttp%3A%2F%2Frdf.library.vanderbilt.edu%2Fswwg%2Fassertions.ttl%3EWHERE%20%7B%3Fgroup%20foaf%3Aname%20%22Semantic%20Web%20Working%20Group%22.%3Fgroup%20foaf%3Amember%20%3Fperson.%3Fperson%20a%20foaf%3APerson.%7D
http://rdf.library.vanderbilt.edu/sparql?query=
Use application/rdf+xml in Accept: header (Callimacus doesn't support text/turtle).
http://rdf.library.vanderbilt.edu/sparql?query=CONSTRUCT%20%7B%3Fperson%20a%20foaf%3AAgent.%7DFROM%20%3Chttp%3A%2F%2Frdf.library.vanderbilt.edu%2Fswwg%2Ffoaf.rdf%3EFROM%20%3Chttp%3A%2F%2Frdf.library.vanderbilt.edu%2Fswwg%2Fsww-group.rdf%3EFROM%20%3Chttp%3A%2F%2Frdf.library.vanderbilt.edu%2Fswwg%2Fassertions.ttl%3EWHERE%20%7B%3Fgroup%20foaf%3Aname%20%22Semantic%20Web%20Working%20Group%22.%3Fgroup%20foaf%3Amember%20%3Fperson.%3Fperson%20a%20foaf%3APerson.%7D
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="http://orcid.org/0000-0003-4365-3135">
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
</rdf:Description>
<rdf:Description rdf:about="http://orcid.org/0000-0002-2174-0484">
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
</rdf:Description>
<rdf:Description rdf:about="http://orcid.org/0000-0003-0328-0792">
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
</rdf:Description>
<rdf:Description rdf:about="http://orcid.org/0000-0003-2445-1511">
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
</rdf:Description>
</rdf:RDF>
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
<http://orcid.org/0000-0003-4365-3135> a foaf:Agent.
<http://orcid.org/0000-0002-2174-0484> a foaf:Agent.
<http://orcid.org/0000-0003-0328-0792> a foaf:Agent.
<http://orcid.org/0000-0003-2445-1511> a foaf:Agent.
SELECT ?person ?label
FROM <http://rdf.library.vanderbilt.edu/swwg/foaf.rdf>
FROM <http://rdf.library.vanderbilt.edu/swwg/sww-group.rdf>
FROM <http://rdf.library.vanderbilt.edu/swwg/assertions.ttl>
WHERE {
?group foaf:name "Semantic Web Working Group".
?group foaf:member ?person.
?person a foaf:Agent.
?person rdfs:label ?label.
}
Don't forget to add:
FROM <http://rdf.library.vanderbilt.edu/swwg/agents.ttl>
CONSTRUCT {
?person a foaf:Agent.
}
FROM <http://rdf.library.vanderbilt.edu/swwg/foaf.rdf>
FROM <http://rdf.library.vanderbilt.edu/swwg/sww-group.rdf>
FROM <http://rdf.library.vanderbilt.edu/swwg/assertions.ttl>
WHERE {
?person a foaf:Person.
}
SELECT ?thing ?subclass ?class
# CONSTRUCT {?thing a ?class.}
FROM <http://rdf.library.vanderbilt.edu/swwg/foaf.rdf>
FROM <http://rdf.library.vanderbilt.edu/swwg/sww-group.rdf>
# FROM <http://rdf.library.vanderbilt.edu/swwg/assertions.ttl>
WHERE {
?thing a ?subclass.
?subclass rdfs:subClassOf ?class.
}
SELECT ?thing ?subclass ?class
# CONSTRUCT {?thing a ?class.}
FROM <http://rdf.library.vanderbilt.edu/swwg/foaf.rdf>
FROM <http://rdf.library.vanderbilt.edu/swwg/sww-group.rdf>
# FROM <http://rdf.library.vanderbilt.edu/swwg/assertions.ttl>
WHERE {
?thing a ?subclass.
?subclass rdfs:subClassOf+ ?class.
MINUS {?thing a ?class.}
}
Note: SPARQL 1.1 property paths are highly relevant to constructing reasoning queries and 1.1 was not complete when the book was written. See https://www.w3.org/TR/sparql11-query/#propertypaths
Recall "just in time inferencing": implementation never stores inferred triples; inferences computed at the last moment. Stardog does this.
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
foaf:Person rdfs:subClassOf foaf:Agent.
SELECT ?thing ?class
WHERE {
?thing a foaf:Person.
?thing a ?class.
}
- Upload the data.
- Query Stardog with inferencing off.
- In Admin Console, set Tbox graph.
- Upload the schema.
- Query Stardog with inferencing on.
The model tells us what should happen. It doesn't tell us how we should make it happen.