Hi Jody and Scott, Thanks for all of your help!
Jody-although your ontology was not exactly correct, the third query you suggested worked! Hopefully this will speed up execution time! Thanks again! Suzanne On Nov 12, 11:22 pm, Jody <[email protected]> wrote: > Trying to follow this... > Are these the ontologies we're talking about?: > > ont1:Person > a owl:Class ; > rdfs:label "Person"^^xsd:string ; > rdfs:subClassOf > [ a owl:Restriction ; > owl:cardinality "1"^^xsd:nonNegativeInteger ; > owl:onProperty ont1:profession > ] . > ont2:Professional > a owl:Class ; > rdfs:label "Professional"^^xsd:string ; > rdfs:subClassOf > [ a owl:Restriction ; > owl:onProperty ont2:profession ; > owl:someValuesFrom ont2:Professional > ] . > ont2:Profession > a owl:Class ; > rdfs:label "Profession"^^xsd:string ; > owl:oneOf (ont2:Engineer ont2:Teacher ont2:Doctor ont2:Lawyer) . > > And if so... > Does one of the queries in this file fit your requirement? > ------------------------- > # If ont1:profession objects are already using ont2 resources > CONSTRUCT { > ?entity ont2:profession ?value .} > > WHERE { > ?entity ont1:profession ?value . > ?value a ont2:Profession .} > > -------------------------- > # If ont1:profession objects are strings that are compared to ont2 > resources > CONSTRUCT { > ?entity ont2:profession ?enumValue .} > > WHERE { > ?entity ont1:profession ?value . > ?enumValue a ont2:Profession . > FILTER (afn:localname(?enumValue) = ?value) .} > > -------------------------- > # If ont1:profession objects are strings that are used to create ont2 > resources > CONSTRUCT { > ?entity ont2:profession ?ont2Value .} > > WHERE { > ?entity ont1:profession ?value . > LET (?ont2Value := smf:buildURI("ont2:{?value}")) .} > > -------------------------- > > On Nov 12, 3:51 pm, Scott Henninger <[email protected]> > wrote: > > > Hello Suzanne; I'm not sure this is clear yet. Are you describing > > class restrictions? I.e. something along the lines of: > > :Person rdfs:subClassOf [:hasProf some :profession] > > (Sorry for mixing Manchester and RDF syntax, but hopefully the intent > > is understandable.) > > > Or do you mean that there are instances of :Person with :profession's, > > such as: > > :Person :hasProf :engineer > > > ...or something else. I'm having difficulty understanding the > > relationship between your property (has_a or has_a_profession) and the > > owl:oneOf class definition. > > > In terms of SWRL, what rule processor was used to make the inference? > > > -- Scott > > > On Nov 12, 2:09 pm, Suzanne Collier <[email protected]> wrote: > > > > Holger, > > > > Thanks! > > > > Ok, so here is a sample ontology, which I hope clarifies things. > > > > Ontology1: > > > has a class person > > > each person has a profession > > > > Ontology2: > > > has a class professional > > > each professional has a profession > > > each profession is owl:oneOf {engineer, teacher, doctor, > > > lawyer...} > > > > The mapping that takes place is: > > > > ont1:profession -> ont2:profession > > > > In TopBraid this seems to require iterating through the owl:oneOf list > > > to pick the correct type. In the SWRL rule this is not necessary. We > > > wrote the SWRL rules by hand in the rdf/xml format. > > > > Thanks for your help! > > > > Suzanne > > > > On Nov 12, 11:46 am, Holger Knublauch <[email protected]> wrote: > > > > > > For my first question, I may have not been specific enough. I am > > > > > creating a function via an eclipse plug-in, which requires me to > > > > > extend AbstractFunction1, AbstractFunction2 or AbstractFunction3. > > > > > This is what is limiting the number of arguments. Is there a > > > > > workaround for this? > > > > > Ah, yes sure. Either implement the Jena interface Function directly, > > > > or subclass > > > > > org.topbraid.sparql.functions.AbstractFunction > > > > > > For my second question, here is the SWRL rule which corresponds to the > > > > > query: > > > > > > <ruleml:imp> > > > > > <ruleml:_body> > > > > > <swrlx:datavaluedPropertyAtom swrlx:property="&ont1;property"> > > > > > <ruleml:var>entity</ruleml:var> > > > > > <ruleml:var>value</ruleml:var> > > > > > </swrlx:datavaluedPropertyAtom> > > > > > </ruleml:_body> > > > > > <ruleml:_head> > > > > > <swrlx:individualPropertyAtom swrlx:property="&ont2;property"> > > > > > <ruleml:var>entity</ruleml:var> > > > > > <ruleml:var>value</ruleml:var> > > > > > </ruleml:_head> > > > > > </ruleml:imp> > > > > > > For some reason in SWRL it matches the URI without having to iterate > > > > > through the list. Let me know if you need anymore information. > > > > > Yes I guess we will need more information. What tool did you create > > > > the above rule with? Doesn't look like real SWRL to me. Also, you > > > > stated that you need to match against owl:oneOfs? I don't see how this > > > > is related. Could you provide the actual example ontology and some > > > > other clues? > > > > > Thanks > > > > Holger --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
