SWRL rules with custom built-ins

33 views
Skip to first unread message

Maatary Okouya

unread,
Dec 10, 2013, 6:35:12 PM12/10/13
to sta...@clarkparsia.com
Hi, 

I'm currently working with Pellet and OWL ontology that SWRL rules with custom builtins. I wrote those custom builtins according to the Pellet custom builtins mechanism. Now that i ma trying to move to stardog, i was wondering if something similar or a workaround existed with Stardog. 

Many thanks, 

Maatary

Maatary Okouya

unread,
Dec 10, 2013, 6:37:32 PM12/10/13
to sta...@clarkparsia.com
Also i would like to know what would be the consequence if i store owl ontology with builtins that stardog do not understand, are those rules simply ignore or it might create a bug ?

Mike Grove

unread,
Dec 12, 2013, 9:31:09 AM12/12/13
to stardog
On Tue, Dec 10, 2013 at 6:37 PM, Maatary Okouya <maatar...@gmail.com> wrote:
Also i would like to know what would be the consequence if i store owl ontology with builtins that stardog do not understand, are those rules simply ignore or it might create a bug ?

The rules should be ignored.

It's possible to have your own custom built-ins; Stardog supports extension functions [1] as referenced in the SPARQL spec.  You need to create an implementation of the Function [2] interface and include it in the Stardog classpath so it's available to the JDK service loader.  Some brief instructions are mentioned in the javadocs.

Cheers,

Mike

 


On Wednesday, December 11, 2013 12:35:12 AM UTC+1, Maatary Okouya wrote:
Hi, 

I'm currently working with Pellet and OWL ontology that SWRL rules with custom builtins. I wrote those custom builtins according to the Pellet custom builtins mechanism. Now that i ma trying to move to stardog, i was wondering if something similar or a workaround existed with Stardog. 

Many thanks, 

Maatary

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Maatary Okouya

unread,
Jul 5, 2014, 1:59:10 PM7/5/14
to sta...@clarkparsia.com
Coming back to this old question. What i'm not sure to follow in your explanation is: 

can i use those custom function within SWRL rule or only within sparql (using stardog) ? did you mean that given that the function are global, they can be both used when evaluating custom fuction is a swrl rules as well as in a sparql rule ?

Evren Sirin

unread,
Jul 6, 2014, 9:01:56 AM7/6/14
to Stardog
Once you define your custom functions they can be used in both queries
and rules.

Best,
Evren

Maatary Okouya

unread,
Jul 6, 2014, 10:03:52 AM7/6/14
to sta...@clarkparsia.com
Many thanks Evern. 

Do you have any idea where i could find some example code, of function implementation ?

Mike Grove

unread,
Jul 7, 2014, 10:05:54 AM7/7/14
to stardog
On Sun, Jul 6, 2014 at 10:03 AM, Maatary Okouya <maatar...@gmail.com> wrote:
Many thanks Evern. 

Do you have any idea where i could find some example code, of function implementation ?

Not currently, no.  But we'll be adding an example to the distribution as soon as we can.

Cheers,

Mike

Maatary Okouya

unread,
Jul 7, 2014, 12:56:44 PM7/7/14
to sta...@clarkparsia.com
Ok, please keep me posted on that.
Reply all
Reply to author
Forward
0 new messages