What is an easy way to create multiple skolems without copying the rule multiple times?
[ AddingMother:
makeSkolem(?mother, "a mother")
->
(?mother rdf:title "mother") (?mother rdf:type _:Mother)
]
[ AddingChild:
(?mother rdf:type _:Mother) makeSkolem(?child, "a child")
->
(?child rdf:title "child") (?child rdf:type _:Child) (?child rdf:hasMother ?mother) (?mother rdf:hasChild ?child)
]
The output is:
OYJ0Aokli2TZDVAK4EQzVA== --{title}-> mother
OYJ0Aokli2TZDVAK4EQzVA== --{type}-> :Mother
OYJ0Aokli2TZDVAK4EQzVA== --{hasChild}-> 8xEXOwnWH/tgxFN+HBwNeg==
8xEXOwnWH/tgxFN+HBwNeg== --{title}-> child
8xEXOwnWH/tgxFN+HBwNeg== --{type}-> :Child
8xEXOwnWH/tgxFN+HBwNeg== --{hasMother}-> OYJ0Aokli2TZDVAK4EQzVA==
I want to have five childens. Is here counting possible? I am a bit lost here.
You can use as many arguments to the skolem as you want, so you can make the child dependent on the mother, too. E.g., this would get you one unique child per mother:
Based on this, if you could integrate some sort of counting, e.g., to produce an index, then you could generate a child per index per mother:
As an aside, you shouldn't use properties in the namespace that the standard doesn't define, such as in:
Some reasoners and RDF processors will complain.