Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-dev] Protege-API 3.5 - Help me please

Naruepon Panawong jnaruepon.p at gmail.com
Sun Feb 23 19:09:54 PST 2014


Thank you for your jar file (fixed)

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


2014-02-23 11:43 GMT+07:00 Naruepon Panawong <jnaruepon.p at gmail.com>:

> Thank you for your jar file (fixed)
>
> 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
>
>
> 2014-02-23 3:22 GMT+07:00 Martin O'Connor <martin at zippyrate.com>:
>
>
>> I think this may be a bug. I enclose a JAR with a fix. Copy it to your
>> Protege-OWL plugins directory (e.g., /Applications/Protege_3.5/plugins/edu.stanford.smi.protegex.owl)
>> and restert Protege.
>>
>> Let me know if this works.
>>
>> Martin
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-dev/attachments/20140224/12a01f40/attachment.html>


More information about the protege-dev mailing list