swrlapi
swrlapi copied to clipboard
Question
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?
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 , 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!!
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.