Skip to content

Instantly share code, notes, and snippets.

@ashepherd
Created June 23, 2016 19:12
Show Gist options
  • Save ashepherd/7ce314e70e907a1ce03629c90efb8317 to your computer and use it in GitHub Desktop.
Save ashepherd/7ce314e70e907a1ce03629c90efb8317 to your computer and use it in GitHub Desktop.
PREFIX gl: <http://schema.geolink.org/1.0/base/main#>
SELECT DISTINCT ?cruise ?role ?person ?match ?id_value ?id_scheme ?id_uri ?person_full_name ?email_address
#?abstract ?cruise_track
WHERE {
{
?cruise a gl:Cruise .
?person ?role ?cruise .
?person a gl:Person .
{
SELECT DISTINCT ?cruise
WHERE {
{
?cruise owl:sameAs <http://data.rvdata.us/id/cruise/OC473> .
}
UNION {
<http://data.rvdata.us/id/cruise/OC473> owl:sameAs ?cruise .
}
UNION {
<http://data.rvdata.us/id/cruise/OC473> owl:sameAs ?match .
?match owl:sameAs ?cruise .
}
UNION {
<http://data.rvdata.us/id/cruise/OC473> owl:sameAs ?match .
?cruise owl:sameAs ?match .
}
UNION {
?cruise a gl:Cruise .
FILTER (?cruise = <http://data.rvdata.us/id/cruise/OC473>)
}
}
}
} UNION {
?cruise a gl:Cruise .
?cruise ?role ?person .
?person a gl:Person .
{
SELECT DISTINCT ?cruise
WHERE {
{
?cruise owl:sameAs <http://data.rvdata.us/id/cruise/OC473> .
}
UNION {
<http://data.rvdata.us/id/cruise/OC473> owl:sameAs ?cruise .
}
UNION {
<http://data.rvdata.us/id/cruise/OC473> owl:sameAs ?match .
?match owl:sameAs ?cruise .
}
UNION {
<http://data.rvdata.us/id/cruise/OC473> owl:sameAs ?match .
?cruise owl:sameAs ?match .
}
UNION {
?cruise a gl:Cruise
FILTER (?cruise = <http://data.rvdata.us/id/cruise/OC473>)
}
}
}
}
OPTIONAL {
?person gl:hasIdentifier ?identifier .
?identifier gl:hasIdentifierValue ?id_value .
OPTIONAL {
?identifier gl:hasIdentifierScheme ?id_scheme .
}
OPTIONAL {
?identifier gl:hasIdentifierResolveURI ?id_uri .
}
}
OPTIONAL {
?person owl:sameAs ?match .
?match a gl:Person .
}
OPTIONAL {
?person gl:hasFullName ?person_full_name .
}
OPTIONAL {
?person gl:hasEmailAddress ?email_address .
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment