I'm sure it's something simple, but I've beaten my head against the wall 
long enough that I'm going to ask for some help.  I'll explain the scenario 
first in case my approach is fundamentally wrong.

For a proof of concept, I need to be able to get data and create data 
easily (hopefully via a restful web service).  To query data, I've had a 
lot of success with the SPIN select templates.  Those are awesome, easy to 
create and consume for a client.  Now I need to be able to easily insert 
data.  I did not see a way to do that with SPIN Templates, but if that is 
possible, I would love to know how to do that.  Instead, I thought a 
SPARQLMotion web service might be the best approach.  

I'm playing around with a simple script to insert a name with the vCard 
ontology.  I have two variables, first and last name.  Then I send that to 
an Apply Construct module.  Then I send that to a Perform Update.


<https://lh5.googleusercontent.com/-DOZD0UWjHAc/U6ylE_1ZwbI/AAAAAAAAC0I/sPbx7LaeIWk/s1600/SparqlMotionGraph.PNG>

Inside the Apply Construct module, I have the following statement:

CONSTRUCT {

    ?nameUri a ns:Individual .

    ?nameUri ns:given-name ?firstName .

    ?nameUri ns:family-name ?lastName .

}

WHERE {

    BIND (URI(CONCAT("http://names.example.com/";, ?lastName, "_", 
?firstName)) AS ?nameUri) .

}

And Inside the Perform Update, I have the following statement:

INSERT {

    ?s ?p ?o .

}

WHERE {

    ?s ?p ?o .

}
I figured that would insert all the triples generated by the apply 
construct.  When I hit the perform update, the graph contains the correct 
triples, but upon stepping into the perform update module, I get a 
nullPointerException.  I'm figuring the module doesn't know where to insert 
the triples, but I don't know how to fix that if it is the issue.  Any help 
would be much appreciated.

Bart

-- 
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, 
SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
--- 
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