Jim; There's a few things here that may be helpful, but it's difficult
to say without knowing the version you are working on and how you are
running the script.  For example, re you running it from the script
graph view or from a Web service?

On the script itself, I'd suggest importing your Project_Instances,
not the sms file.  Keep the script separate from your data.  The
ImportRDFFromWorkspace will bring in the data necessary for the script
to execute.

I do not know what the CommitInstanceUpdate module is, but I don't
think it is necessary.  The PerformUpdate will execute the query and
change the data in the specified graph.

Also, if you declare the type of your arguments (spl:valueType) to be
rdfs:Resource, then the system will convert them automatically.  Then
you can use the query:

WITH <http://woo2theha.org/project_instances>
DELETE { ?arg2 ?arg1 ?object . }
INSERT { ?arg2 ?arg1 ?arg3 . }
WHERE { ?arg2 ?arg1 ?object .}

...and in a script or Web service, it is a good idea to name the
arguments something that indicates its use.  A convention we often use
is to create a subproperty of sp:arg in the arg: namespace.  Such as
arg:subject, arg:predicate, and arg:newValue.

Beyond that the only advice I can offer is to check in the debugger
that the {?arg2 ?arg1 ?object } triple pattern returns results.

-- Scott

On Oct 15, 12:19 pm, Jim <[email protected]> wrote:
> Well I broke something and I don’t understand how.
>
> I have this updateQuery where I take in 3 args and pull in an rdf.  I have
> tested the update via a get request from a browser and the script returns a
> confirmation that it ran correctly.  I even held it once in dubug to verify
> it was querying correctly (which it did).  However, the script never
> updates the rdf.
>
> Here is my setup:
>
> I have 4 owl files in my workspace. Common.owl – which holds common
> classes. Project_Classes.owl – which imports Common.owl and defines classes
> that are unique to this project. Project_Instances.owl – which imports
> Project_Classes.owl (and thus Common.owl) and holds only instances of
> classes. Then finally my sms.owl which imports the Project_Instances.owl
> and is where I define my scripts.
>
> Prefix
>
> Namespace Uri
>
> cmn
>
> http://woo2theha.org/common#
>
> sms
>
> http://woo2theha.org/sms#
>
> pc
>
> http://woo2theha.org/project_classes#
>
> pi
>
> http://woo2theha.org/project_instances#
>
> So in the script (pictured below) my ImportRDFFromWorkspace points to my
> sms.owl
>
> The args look like arg1=cmn:hasLocation, arg2=pi:Doughnuts_Operation,
> arg3=pi:GarderDr
>
> The query looks like:
>
> WITH <http://woo2theha.org/project_instances>
>
> DELETE  {
>
>     ?subject ?property ?object .
>
> }
>
> INSERT  {
>
>     ?subject ?property ?newValue .
>
> }
>
> WHERE {
>
>     ?subject ?property ?object .
>
>     BIND (spif:buildURI(?arg1) AS ?property) .
>
>     BIND (spif:buildURI(?arg2) AS ?subject) .
>
>     BIND (spif:buildURI(?arg3) AS ?newValue) .
>
> }
>
> <https://lh4.googleusercontent.com/-GLFjJrBcyAs/UHxDiF2XIyI/AAAAAAAABR...>
>
> If anyone has any ideas of what I may be doing wrong, or just where to look
> in TB for the next clue as why this script will run correctly but doesn't
> change the rdf that would be great.
> Thanks
>
> Jim

-- 
-- 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 Ensemble, 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


Reply via email to