OWLModel is something from the OWL API (as used in Protege) I think, not
part of Jena. Nor does Jena support SWRL. So there's limits to how we
can help I'm afraid.
I suspect you have two options:
1. Take the Model you have got back from SDB and create an OWLModel from
it. My guess is that would involve copying the data, not live access to
the database, which may or may not be acceptable for you depending on
data sizes and requirements. For advice on all that you would need to
ask the OWL API folks.
2. Use Jena's OntModel support and plug in an external reasoner that
supports SWRL. I believe Pellet is still available as a plugin and I
believe it supports SWRL but you would need to ask the Pellet folks for
help with that. While that would work over the database it will be slow
and no more scalable so copying the data into memory before giving it to
Pellet would be worth considering.
Dave
On 25/02/16 15:30, Taher Labidi wrote:
Hi all,
I create OWLModel from my ontology, i apply SWRL rule in this model and i
store it in MySql using jena SDB :
"dataset.getDefaultModel().add(owlModel.getJenaModel());".
However, when i load my ontology from MySql, i load it in "Model" type (i
dont know if i can load it in "OWLModel" type or can i convert from Model
to OWLModel).
Any ideas please ? My SWRL rules are applying in OWLModel type. I would not
change my code to apply SWRL in Model type (i don't know either it is
applicable or not ?)
--------------------------------------------------------------------------------------------------------------
Taher LABIDI
- Doctorant en Informatique - laboratoire MIRACL, université de Sfax,
Tunisie
- Assistant contractuel en Informatique - ENET'COM, Tunisie
--------------------------------------------------------------------------------------------------------------