Search Mailing List Archives
[protege-owl] Possible to use Protege's SWRL syntax via SWRLFactory API?
martin.oconnor at stanford.edu
Fri Mar 27 11:47:37 PDT 2009
Michael Lodemann wrote:
>is it yet possible to build SWRL rules programatically with the API
>using a string like this:
>SWRLImp imp = factory.createImp("Person(?p) ^ hasAge(?p, ?age) ^ swrlb:greaterThan(?age, 17) -> Adult(?p)");
Yes. See: http://protege.cim3.net/cgi-bin/wiki.pl?SWRLFactoryFAQ#nid9FA
>... and at the opposite: How do I retrieve this underlying syntax-string
>out of a DefaultSWRLImp object?
>And another question: how can I use the
>programatical rule validation mechanism? DefaultSWRLImp.isValid() seems
>to be obsolete.
I'm not even sure what this is. The createImp will throw an exception if
an invalid rule is supplied.
>btw: Has the JavaDoc location moved? For example
>results in a 404 error.
I need to fix the links for the new 3.4 release. Should be fixed early
More information about the protege-owl