Hard to say without more details. You may want to step through the code with a debugger to inspect the class2Query map. Rules attached to owl:Thing or rdfs:Resource count as global and should always be executed OK.
Make sure the OntModel handles the imports correctly (in particular SPIN namespaces). You could also add the OWL/RDFS vocabulary from org.topbraid.spin.util.SystemTriples Holger On Dec 18, 2009, at 8:34 AM, Schmitz, Jeffrey A wrote: > I've added the rule templates to the spin:rule predicate of owl:Thing in my > class model (an import of _baseModel below), but for some reason when I > create my OWL_MEM model: > > _ontSpec = new OntModelSpec(OntModelSpec.OWL_MEM); > _memModel = ModelFactory.createOntologyModel(_ontSpec, > _baseModel); > > Those rules aren't getting picked up in the resulting _memModel. Because of > this, when I call > > SPINInferences.run(_memModel, inferenceType, > this.spinInfModel, exp, stats, true, null); > > The rules tied to owl:Thing aren't getting fired. Any ideas what I need to > do to make sure those rules get picked up in my OWL_MEM OntModel that I feed > into SPINInerences.run? Do I need to explicitly import the > http://www.w3.org/2002/07/owl model perhaps? > > Note the import structure is _baseModel --> classModel(where rule triples > were added) --> http://www.w3.org/2002/07/owl (this is not explicitely > imported). > > Thanks, > Jeff > > > >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf >> Of Scott Henninger >> Sent: Friday, December 18, 2009 8:28 AM >> To: TopBraid Composer Users >> Subject: [tbc-users] Re: Auto add spin subclass inferences >> >> Jeff, if you add the following as a spin:rule for owl:Thing >> (or rdfs:Resource), it will be applied to all classes in your model. >> >> CONSTRUCT { >> ?x a ?c2 . >> } >> WHERE { >> ?c1 rdfs:subClassOf ?c2 . >> ?x a ?c1 . >> } >> >> This is the cax-sco rule from OWL 2 RL. It is defined as a >> template in owlrl.owl. So you can import that file (TopBraid >> library/Examples) and use Create from SPIN template to define >> a rule from the cax-sco template. >> >> owl:inverse is defined by prp-inv1 and prp-inv2. The >> definitions come from >> http://www.w3.org/TR/owl2-profiles/#Reasoning_in_OWL_2_RL_and_ >> RDF_Graphs_using_Rules. >> Each rules is defined as a template, named the same as in the >> standard, in owlrl.owl. >> >> -- Scott >> >> On Dec 18, 8:04 am, "Schmitz, Jeffrey A" >> <[email protected]> wrote: >>> Hello, >>> I was wondering if there might be an automated script or >> command built into TBC that would add spin subclassing rules >> to all of my class definitions in a model? Auto adding >> inverse rules would be nice too. >>> >>> Thanks, >>> Jeff >> >> -- >> >> You received this message because you are subscribed to the >> Google Groups "TopBraid Composer Users" group. >> To post to this group, send email to >> [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/topbraid-composer-users?hl=en. >> >> >> > > -- > > You received this message because you are subscribed to the Google Groups > "TopBraid Composer Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/topbraid-composer-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/topbraid-composer-users?hl=en.
