Holger,

Thanks for your reply.

The current (prototype) version of the app calls out to the SPARQL REST 
endpoint in TopBraid Live:
http://localhost:8083/tbl/sparql

If there is a better way I should do this, please point me to the right 
approach.

I don't know how to tell the sparql endpoint that it should execute SPIN 
rules. The SPIN rule declaration is stored in the ontology as part of the 
Class definition. Here is the Class definition, including the rule 
declaration:

spinTest:SpinTest
  rdf:type owl:Class ;
  spin:rule [
      rdf:type sp:Construct ;
      sp:templates (
          [
            sp:object "spin:rule OK" ;
            sp:predicate spinTest:testResult ;
            sp:subject [
                sp:varName "test" ;
              ] ;
          ]
        ) ;
      sp:where (
          [
            sp:object spinTest:SpinTest ;
            sp:predicate rdf:type ;
            sp:subject [
                sp:varName "test" ;
              ] ;
          ]
        ) ;
    ] ;
  rdfs:label "Spin test" ;
  rdfs:subClassOf owl:Thing ;
.

I have tested out this rule using "Run Inferences" in Composer, but I don't 
understand how to apply it on the server.

Thanks


On Thursday, February 16, 2017 at 11:40:58 PM UTC-5, Holger Knublauch wrote:

> Hi Russell,
>
> in your question you indicate that you have a Java app, so I assume this 
> code runs outside of the TBL server. Assuming you want to perform the 
> inferences in your code using the SPIN API, I guess there is no difference 
> between TBL or any 3rd party triple store - you can for example use the 
> SPARQL end point to retrieve the original triples. Everything else is under 
> full control of your application.
>
> Is this the scenario you are describing?
>
> Thanks,
> Holger
>
>
> On 17/02/2017 8:59, Russell Morrisey wrote:
>
> I have an ontology with a *spin:rule* that I've built and tested in 
> TopBraid Composer.
>
> I'd like to build an app that has the following flow: 
>
>    1. Load some graph data from a triple store 
>    2. Assert some triples from the client into a temporary graph 
>    (preferably a session-scoped graph) 
>    3. Run my spin:rules and store the new triples in the temporary graph 
>    4. Query the temporary graph and send the results back to the caller. 
>
> My app is a Java app which does not use SWP.
>
> How can I apply spin:rules this way when my ontology is deployed in 
> TopBraid Live?
> How can I apply spin:rules this way when my ontology is in a 3rd-party 
> triple store?
> Which 3rd-party triple stores support this?
>
> I am working on figuring out the answers to these questions. Any help 
> would be appreciated.
>
> -- 
> 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 [email protected] 
> <javascript:>
> --- 
> 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 [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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 [email protected]
--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to