;; On Sep 26, 2007, at 7:59 PM, Jacobs, Jay wrote: ;; Hi, ;; We're trying to use Pellet with an ontology class containing slots with ;; multiple cardinality. We want to match on slot value subsets. Using the ;; following example: ;; Foo hasFriends Bar ;; Foo hasFriends Mike ;; Jane hasFriends Foo ;; Jane hasFriends Bar ;; Jane hasFriends Mike ;; Jack hasFriends Mike ;; Jack hasFriends Jane ;; I haveFriend Foo ;; I haveFriend Bar ;; I haveFriend Jill ;; Foo, Jane, and Jack are individuals of a Person class which has a hasFriends ;; slot relation with a max cardinality of * and a range of Person. I is an ;; individual of class Myself which has a haveFriends slot relation with a max ;; cardinality of * and a range of Person. I'd like to ask pellet which Person ;; individuals have a subset of friends of Myself. In this example, it should ;; return a set of { Foo, Jane } but not Jack. I don't think this is possible ;; using SPARQL but am wondering if I can do this programmatically with the ;; pellet API. ;; Thanks! ;; --Jay ;; Pellet-users mailing list ;; Pellet-users@lists.owldl.com ;; http://lists.owldl.com/mailman/listinfo/pellet-users (with-ontology friends () ((object-property !hasFriends (range !Person)) (object-property !haveFriends (inverse-of !haveFriendsInverse) (range !Person)) (class !Person :partial) (class !Myself :partial) (individual !Foo (type !Person) (value !hasFriends !Bar) (value !hasFriends !Mike)) (individual !Jane (type !Person) (value !hasFriends !Foo) (value !hasFriends !Bar) (value !hasFriends !Mike)) (individual !Jack (type !Person) (value !hasFriends !Mike) (value !hasFriends !Jane)) (individual !I (type !Myself) (value !haveFriends !Foo) (value !haveFriends !Bar) (value !haveFriends !Jill)) (class !probe :complete (restriction !hasFriends (some-values-from (restriction !haveFriendsInverse (has-value !I))))) ) (print-db (instances (restriction !hasFriends (some-values-from (restriction !haveFriendsInverse (has-value !I)))))) (sparql '(:select (?person)() (?person :a !probe)) :trace t) (write-rdfxml friends) )