Hi, I have a question about accomplishing the above.

1. How do I make my graph not a "read-only" graph?
[image: image.png]
I have set "Enable SPARQL updates" to true in Server Configuration.
The graph in question is the focus graph in my local EDG.
I have ensured Administrator is listed as both Manager and Editor for the
graph in EDG Permissions Management.
I am using the default settings in Rights Management

Here's the code I'm trying to run in the Script Editor:
graph.update(`DELETE {
?qk qudt:applicableUnit ?unit .
}
INSERT {
?newqk qudt:applicableUnit ?newunit .
}
WHERE {
{
?qk a qudt:QuantityKind .
?qk qudt:applicableUnit ?unit .
}
UNION
{
?newqk a qudt:QuantityKind .
?newqk qudt:inferredApplicableUnit ?newunit .
} .
} `)

I get the same error when invoking the service from a web browser:

http://localhost:8083/tbl/service/qudt_quantitykind/qudt/refreshApplicableUnits

yields:

Cannot evaluate Script:org.topbraid.core.servlet.HttpErrorException:
Failed service request /qudt_quantitykind/qudt/refreshApplicableUnits:
Attempt to change a read-only graph rejected


Here's my service definition code:

qudt:refreshApplicableUnits
  rdf:type dash:GraphService ;
  dash:js """graph.update(`
DELETE {
    ?qk qudt:applicableUnit ?unit .
}
INSERT {
    ?newqk qudt:applicableUnit ?newunit .
}
WHERE {
{
    ?qk a qudt:QuantityKind .
    ?qk qudt:applicableUnit ?unit .
}
UNION
{
    ?newqk a qudt:QuantityKind .
    ?newqk qudt:inferredApplicableUnit ?newunit .
} .
}
`)
""" ;
  dash:responseContentType "void" ;
  rdfs:label "Refresh the applicableUnits property" ;
.


There must be a setting I'm missing!
Thanks in advance for your help.

Steve

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/CAGUep84svBqwK9G7545srJ5FziguTvK3JhUuUN8ztVgi5ZOkug%40mail.gmail.com.

Reply via email to