Open NAVEENKUMARSKPN opened 3 years ago
@NAVEENKUMARSKPN , when I create a SADL model exactly as you have shared it and run inference I get these results:
Inference of '/home/camfe/andy/ws/sadl/runtime-EclipseApplication2/GH-706/UpdateTests.sadl' requested. Reasoner family: Jena-Based (com.ge.research.sadl.jena.reasoner.JenaReasonerPlugin), version date 12 April 2021. Query: select ?s ?p where {?s ?p http://sadl.org/UpdateTests.sadl#Fido} "s","p" "George","loves" "George","owns" Update: delete {?x http://sadl.org/UpdateTests.sadl#owns http://sadl.org/UpdateTests.sadl#Fido . ?x http://sadl.org/UpdateTests.sadl#loves http://sadl.org/UpdateTests.sadl#Fido} insert {http://sadl.org/UpdateTests.sadl#John http://sadl.org/UpdateTests.sadl#owns http://sadl.org/UpdateTests.sadl#Fido} where {?x http://sadl.org/UpdateTests.sadl#owns http://sadl.org/UpdateTests.sadl#Fido . ?x http://sadl.org/UpdateTests.sadl#name "George"} Query: select ?s ?p where {?s ?p http://sadl.org/UpdateTests.sadl#Fido} "s","p" "John","loves" "John","owns"
That seems to me what I would expect.
WRT your questions:
Thanks Crapo
With Print: Model I were able to get the file in Temp Folder
But while translating it actually generates the owl for builtinsadl's also
Is there any way to restrict while translating?
"Print: Model." puts all triples in the current model into the file so that you can see all triples available to the reasoner. It would be an easy enhancement to have an option to print only the base model (this model but not any imports). Using current functionality you might be able to write a SPARQL construct query that would filter results by namespace to get only what you want. I'm envisioning an enhancement like "Print: Base Model."
@NAVEENKUMARSKPN , I was taking a closer look at this and realized that I don't apparently understand the issue. In the IDE, an implementation of "Print: Base Model." would print to a file the same model that is already created in the OwlModels folder when you save a SADL model. So it would have no purpose. What is it exactly that you would like to do?
@NAVEENKUMARSKPN , I'm trying to clean up old issues. Can you please take a look at this and let me know if there is something that you think could/should be done to address what you wish to accomplish?
Hi Team I am trying to use update query but i couldnt find the syntax is there any example that would help me to move forward
Model is `uri "http://sadl.org/UpdateTests.sadl" alias UpdateTests.
Person is a class described by name with values of type string, described by owns with values of type Thing, described by loves with values of type Thing. Thing is a class. George is a Person with name "George". Fido is a Thing. George owns Fido.
John is a Person with name "Johnny".
Rule LoveWhatYouOwn: if x owns y then x loves y.
Ask Ownership (note "This query is a select."): select s,p where s p Fido. // Update: "delete {?person . ?person }
// insert { }
// where {?person . ?person 'George'}".
Update UpdateToJohn: delete x owns Fido and x loves Fido
insert John owns Fido
where x owns Fido and x has name "George"
.
Ask: Ownership.
Update UpdateToJohn.`
when we try executing the UpdateToJohn the query is executed but it didnt updated
Thanks