Using Protege and SWRL tab, I have the ontology mentioned hereinafter. It is composed of the Class Test
and the class Shadow
, where Test
has three individuals t1, t2, t3
. I was trying to define an SWRL rule that creates an individual of Shadow
class for each existing individual of Test
, the rule is
Test(?x) ^ swrlx:makeOWLThing(?new, ?x) -> Shadow(?new)
QUESTIONS:
- Only one individual of
Shadow
, namedfred
is created, instead of three (corresponding tot1, t2, t3
). How to control the naming of the resulting individual which is always named
fred
?Prefix(:=<http://www.semanticweb.org/hilal/ontologies/2016/5/untitled- ontology-58#>) Prefix(owl:=<http://www.w3.org/2002/07/owl#>) Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>) Prefix(xml:=<http://www.w3.org/XML/1998/namespace>) Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>) Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>) Ontology(<http://www.semanticweb.org/hilal/ontologies/2016/5/untitled- ontology-58> Declaration(Class(:Shadow)) Declaration(Class(:Test)) Declaration(NamedIndividual(:t1)) Declaration(NamedIndividual(:t2)) Declaration(NamedIndividual(:t3)) Declaration(AnnotationProperty(<http://swrl.stanford.edu/ontologies/3.3/swrla.owl#isRuleEnabled>)) ############################ # Named Individuals ############################ # Individual: :t1 (:t1) ClassAssertion(:Test :t1) # Individual: :t2 (:t2) ClassAssertion(:Test :t2) # Individual: :t3 (:t3) ClassAssertion(:Test :t3) DLSafeRule(Annotation(<http://swrl.stanford.edu/ontologies/3.3/swrla.owl#isRuleEnabled> "true"^^xsd:boolean) Annotation(rdfs:comment ""^^xsd:string) Annotation(rdfs:label "S1"^^xsd:string) Body(BuiltInAtom(<http://swrl.stanford.edu/ontologies/built-ins/3.3/swrlx.owl#makeOWLThing> Variable(<new>) Variable(<x>)) ClassAtom(:Test Variable(<x>)))Head(ClassAtom(:Shadow Variable(<new>)))) )