swrlapi icon indicating copy to clipboard operation
swrlapi copied to clipboard

Question

Open mrtnzagustin opened this issue 4 years ago • 3 comments

I am thinking of wrapping some of this useful library methods. I need to make some operations from node.js. Specifically i need create swr-rules on the fly, transform to ttl and insert in a graph database. There is a way to run some methods from CLI? for example: java -jar swrlapi.jar -"my swrl rule string" Also, is there any other project related similar to this library but written in javascript?

mrtnzagustin avatar Apr 24 '20 14:04 mrtnzagustin

I am not aware of many RDF- and OWL-related tools in JavaScript.

If you wanted to interactively invoke the SWRLAPI, you could adapt the following project:

https://github.com/protegeproject/swrlapi-example

Take a look at the main class:

https://github.com/protegeproject/swrlapi-example/blob/master/src/main/java/org/swrlapi/example/SWRLAPIExample.java

You could modify this code to take a SWRL rule or SQWRL query as a parameter and then execute it.

martinjoconnor avatar Apr 29 '20 18:04 martinjoconnor

@martinjoconnor , thanks!! do you know which method should i use to make this? :

String mySWRLString = "Class(?a) ^ hasSomething(?a, ?b) -> $ClassWithSomething(?a)";
String swrlRuleInTurtleOrOWLSyntax = methodWanted(mySWRLString);

regards!!

mrtnzagustin avatar Apr 30 '20 14:04 mrtnzagustin

I would post these more general questions to the Protege mailing list.

https://protege.stanford.edu/support.php

It's quite active and you may get a range of responses.

martinjoconnor avatar Apr 30 '20 20:04 martinjoconnor