Here's my SWRL rule. It states that if an operation exists and has an action, it needs to create a new variable h of type Hold, that hold the same action value as the operation:
Operation(?op) ^ hasAction(?op, ?action)^ makeOWLThing(?h, ?op)->Hold(?h)^hold_action(?h, ?action))
I use OWLapi to create owl individuals. Here's what I did so far:
for (int j=0; j < operations_true.size(); j++) {
OWLNamedIndividual hold = factory.getOWLNamedIndividual(IRI.create(ontologyIRI + "#hold"+ j));
hold_set.add(hold);
OWLAxiom hActionax = factory.getOWLObjectPropertyAssertionAxiom(hold_action, hold, actionTrue);
ontologyManager.addAxiom(ontology, hActionax);
}
actionTrue is an already defined variable with a defined value. I have trouble seeing how I could fetch the value of each action depending on each Operation.
Thank you in advance.
PS: the reason I do this is because Pellet (unlike SWRLApi) does not support "makeOWLThing", therefore I need to manually write a function that does the same job