Skip to content

Instantly share code, notes, and snippets.

@kendall
Created January 4, 2010 16:10
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 kendall/268616 to your computer and use it in GitHub Desktop.
Save kendall/268616 to your computer and use it in GitHub Desktop.
#
# 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