Protege-API 3.5 - Why rule not work?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Protege-API 3.5 - Why rule not work?

Naruepon Panawong
I still confuse about rule becase I write rule and Program show all Data in my Ontology.
I want to show Waterfall only. I test my rule in Protege Editor that it work.

Some code
                OWLNamedClass touristClass = owlModel.getOWLNamedClass("Tourist"); 
OWLObjectProperty ageProperty = owlModel.getOWLObjectProperty("hasAgeRank"); 
OWLIndividual individual1 = touristClass.createOWLIndividual("Naruepon.p");
individual1.setPropertyValue(ageProperty, "Age19-25");
SWRLFactory factory = new SWRLFactory(owlModel);
factory.enableAll();
SWRLImp imp = factory.createImp("Tourist(?x) ^ hasAgeRank(?x,Age19-25) ^ Waterfall(?a) -> hasAttraction(?x,?a)");
imp.enable();
ruleEngine.infer();

Thank you and Best Regards.
Naruepon.p

_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev