Thank you Martin,
I already know that getSQWRLResult() will return the result if any. My problem is
after the code I wrote in the firt post
"
> OWLModel owlmodel = ProtegeOWL.createJenaOWLModelFromURI(uri);
> OWLNamedClass patientClass = owlmodel.getOWLNamedClass("Patient");
> RDFIndividual patientIndividual =patientClass.createRDFIndividual(patientObj.getPatientName());
"
How can I run all rules (beside 2) that are already defined in the ontology for this specific instance the RDFIndividual patientIndivindual.
What I do is:
SQWRLQueryEngine queryEngine = SQWRLQueryEngineFactory.create(owlmodel);
SQWRLResult sqwrlResult = queryEngine.getSQWRLResult(query_name);
where owlmodel is my OWLModel and query_name is
the name of one single query already in the ontology.
1)How can I use MORE THAN ONE query(rule)?
2)How can I run these rules ONLY for patientIndividual?
Thank you!
Martin O'Connor wrote:
If you use the SQWRLQueryAPI you can execute SQWRL queries and SWRL
rules without persisting any inferences. You can then use getSQWRLResult
to get specific results of SQWRL queries.
Martin
[1]
http://protege.cim3.net/cgi-bin/wiki.pl?SQWRLQueryAPIMyrrdin wrote:
> Helo everyone.
>
> I create an instance of one of my OWL Class Patient. I do not save the
> instance that is I simply write
>
> OWLModel owlmodel = ProtegeOWL.createJenaOWLModelFromURI(uri);
> OWLNamedClass patientClass = owlmodel.getOWLNamedClass("Patient");
> RDFIndividual patientIndividual =
> patientClass.createRDFIndividual(patientObj.getPatientName());
>
>
> The instance exists but is not saved in the OWL file and I DO NOT WANT THAT
>
> What I need is to execute all SWRL and SQWRL rules in the OWL file(apart
> from 2 rules) for this specific instance and then get the relative result. I
> guess with getSQWRLResult() function. Any ideas? Any example that I missed
> on the web?
>
> Thank you.
>
_______________________________________________
protege-owl mailing list
protege-owl@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owlInstructions for unsubscribing:
http://protege.stanford.edu/doc/faq.html#01a.03