Created
November 2, 2011 19:49
-
-
Save shellac/1334684 to your computer and use it in GitHub Desktop.
Validate complete absence of bios
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Explanation: | |
# ASK returns 'true' if there are any results | |
# The inner query says: | |
# Get agents and (if there) bio:event | |
# Count agents and bios, and check if there are agents present, but no bios | |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> | |
PREFIX bio: <http://purl.org/vocab/bio/0.1/> | |
ASK { | |
SELECT (count(?x) as ?agents) (count(?y) as ?bios) | |
{ | |
?x a foaf:Agent | |
OPTIONAL { ?x bio:event ?y } | |
} HAVING (?agents > 0 && ?bios = 0) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment