Usefullness of SPIN for my Use Case

35 views
Skip to first unread message

Richard Reuter

unread,
Jul 27, 2016, 3:22:59 PM7/27/16
to TopBraid Suite Users
Hi guys, 
i created a process Ontology in Protege. Now i read about spin and TBC. I installed the free version of tbc and tried to use SPIN. I imported my Ontology, but i couldnt use spin in the imported Ontology. Only when i create a new Ontology with RDF/SPIN it showed me the option to use spin rules. But i dont want to recreate the Ontology in the .spin.ttl manually from scratch. Further i need to use some upate queries. What i mean i need to apply some rules and when a expression is true, i need to add 2 object properties to all of my individuals that are from a special type of object property. The querry is not from importance here. I also created a mapping in protege(e.g equivalentTo) . In addation to that mapping i want to use the spin rules. I read that i can include them into my Ontology. By applying my mapping and spin rules i want to create another Ontology that includes the missing object properties when a condition is true. To execute that spin rule to write this 2 object properties into my Ontology, do i need to start TBC everytime? Can i use TBC for that or do i need the to do it in JAVA and import spin? How to use TBC with an imported Ontology and SPIN? Is TBC the right approach?

My aim is to open Ontology A in the jena model, apply my mapping and spin rules, generate a new Ontology. Do i need a reasoner in java to execute that?

Sorry for so many questions, im relative new to this topic.

best regards
Richy


Irene Polikoff

unread,
Jul 27, 2016, 5:49:43 PM7/27/16
to topbrai...@googlegroups.com
Richard,

You do not need need to recreate your ontology. 

In order to use SPIN with your model, you should import into it the SPIN namespace – simply drag and drop the file into the Import tab of your ontology. The file to import is under TopBraid/SPIN directory – spl.spin.ttl. This will make it possible for you to add SPIN rules into your model.

You can also create a new SPIN/RDF file (take a look at all the import options in the wizard to figure out what you need to add) and then drag and drop your ontology into it as an import. This way the new file will contain only the SPIN rules and your underlying file will remain unchanged.

It is up to you which approach to take.

Once you have SPIN rules, you can run them. Inferred triples are placed in the runtime inference graph. You will see all of them in the Inference tab. You can then assert them into the file you have opened or you can use Export>TopBraid Composer>Export/Merge/Convert RDF Graphs and save the inferred triples as a separate graph.

Running such inferencing can be automated as a web service, but this would require a TopBraid Live server or, at minimum, TopBraid Composer Maestro Edition. And, yes, the server would need to be running to execute the process.

Regards,

Irene Polikoff


--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include the TopBraid Suite family of products and its base technologies such as SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbrai...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard Reuter

unread,
Jul 28, 2016, 4:20:54 AM7/28/16
to TopBraid Suite Users
Thank you Irene for your quick response!

implying i use the upate function of spin, and spin will write 2 object properties into my Ontology with a spin rule i can only execute the mapping with a webserive or Topbraid? I cant afford to pay 2000 euros as a student :(. Cant i invoke it with java, once i have my mapping and spin rule? cant i use something else? 

The result should be like this: Ontology A ----> apply my mapping + spin rule ---> generate Ontology B

best regards
Richy




Irene Polikoff

unread,
Jul 28, 2016, 11:41:43 AM7/28/16
to topbrai...@googlegroups.com
Richard,

You can run SPIN with your edition of TBC. To do so you will need to open the model with TBC, run SPIN, then select the inferred statements and assert them into your model and click Save or, alternatively, export everything or only the inferred statements into another model. It is easy to automate these steps as a web service, but, as I explained, you need a different product.

You could also probably write your own Java program to do this processing. This would be outside of TBC and you would use Java SPIN APIs.

Irene Polikoff


From: 'Richard Reuter' via TopBraid Suite Users <topbrai...@googlegroups.com>
Reply-To: <topbrai...@googlegroups.com>
Date: Thursday, July 28, 2016 at 4:20 AM
To: TopBraid Suite Users <topbrai...@googlegroups.com>

Richard Reuter

unread,
Jul 29, 2016, 12:33:29 PM7/29/16
to TopBraid Suite Users
Thank you Irene,

after i made my spin rule i can attach it to my ontology right? Do you have any example how to exectue the spin rule automaticly in java with the spin api? This is really crucial for my purposes. 

best regards
Richy

Irene Polikoff

unread,
Jul 29, 2016, 1:42:58 PM7/29/16
to topbrai...@googlegroups.com
Richy,

Take a look at http://topbraid.org/spin/api/. Maven distribution includes example. Since this is a free version of SPIN API, you should not expect much of handholding and would have to do most of the figuring out yourself. TQ staff does questions on the use of the API only  when/if time permits. You may also be able to take advantage of the advise of our users who subscribe to the list.

Regards,


Irene Polikoff

From: 'Richard Reuter' via TopBraid Suite Users <topbrai...@googlegroups.com>
Reply-To: <topbrai...@googlegroups.com>
Date: Friday, July 29, 2016 at 12:33 PM
To: TopBraid Suite Users <topbrai...@googlegroups.com>
Subject: [topbraid-users] Re: Usefullness of SPIN for my Use Case

--

Richard Reuter

unread,
Jul 30, 2016, 1:01:12 PM7/30/16
to TopBraid Suite Users
Thank you Irene,

well maybe Holger Knoblauch can answer this question if he finds time (watched some videos from him). If not i can fully understand it. You are a company and support free products is not what pays you at the end :P. Thats what the university thought us in the buisness courses haha.

Anyways thanks for your help and offering and supporting free software solutions as TBC free version and owl api. Maybe one day this advertisement pays off and i buy it, when i have acutally some money.

best regards
Richy
Reply all
Reply to author
Forward
0 new messages