Skip to content

Instantly share code, notes, and snippets.

@fumi
Created September 8, 2015 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fumi/7316a63c64085074ad5d to your computer and use it in GitHub Desktop.
Save fumi/7316a63c64085074ad5d to your computer and use it in GitHub Desktop.
PREFIX : <http://example.org/ex/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT *
WHERE {
:taro ^foaf:knows+ / !(foaf:interest|foaf:knows) ?t .
}
@prefix : <http://example.org/ex/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
:hanako foaf:knows :taro .
:seiji foaf:knows :taro .
:jiro foaf:knows :hanako .
:saburo foaf:knows :seiji .
:saburo foaf:publications :pubA .
:jiro foaf:publications :pubB .
:seiji foaf:publications :pubC .
:hanako foaf:publications :pubA .
:jiro foaf:interest :intB .
:saburo foaf:interest :intA .
:a foaf:publications :pubX .
:b foaf:interest :intY .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment