Created
January 4, 2010 16:10
-
-
Save kendall/268616 to your computer and use it in GitHub Desktop.
This file contains 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
# | |
# To query for all individuals that have an age between 18 and 37 (exclusive) | |
# in Pellet 2.0, you have to write (ignoring PREFIXes for now): | |
# | |
SELECT ?x | |
WHERE | |
{ ?x a [ a owl:Restriction ; | |
owl:onProperty :age ; | |
owl:someValuesFrom [ | |
a rdfs:Datatype ; | |
owl:onDatatype xsd:integer ; | |
owl:withRestrictions ( [ xsd:minExclusive 18 ] | |
[ xsd:maxExclusive 37 ] ) | |
] | |
} | |
# | |
# In Pellet 2.1, you can just write: | |
# | |
SELECT ?x | |
WHERE { | |
?x a :age some xsd:integer [ > 18 , < 37 ] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment