Hi there.
I am communicating with the Jess engine using Java, and I've noticed
some altogether strange behaviour with Fact retractions (which I have no
doubt is my fault). I come to the mailing list as a last resort.
I am quite experienced with Jess/Java integration, which is why this problem
is very confusing to me.
Firstly, take the following retraction string, I run it in WinJess with no
problems :
(retract-string "
(PropertyValue
http://echo.iat.sfu.ca/owl/psychoacoustics.daml#hasDirectionality
http://echo.iat.sfu.ca/owl/psychoacoustics.daml#AShok
http://echo.iat.sfu.ca/owl/psychoacoustics.daml#DirectionalityPointSource)
")
But, the same string, generated from a rdf file :
<?xml version="1.0" encoding="ISO-8859-1"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
xmlns:ns1="http://echo.iat.sfu.ca/owl/psychoacoustics.daml#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd="http://www.w3.org/2000/10/XMLSchema#">
<rdf:Description
rdf:about="http://echo.iat.sfu.ca/owl/psychoacoustics.daml#AShok">
<ns1:hasDirectionality
</rdf:Description>
</rdf:RDF>
which looks exactly the same (here is my debug) window (does not work?):
[echoEdit] Retract String: (retract-string "
(PropertyValue
http://echo.iat.sfu.ca/owl/psychoacoustics.daml#hasDirectionality
http://echo.iat.sfu.ca/owl/psychoacoustics.daml#AShok
http://echo.iat.sfu.ca/owl/psychoacoustics.daml#DirectionalityPointSource)
")
when I do :
Value v = rete.executeCommand(retractString); // retractString is the above
string
System.out.println(v.toString());
prints FALSE!
PART 3 : The real wierdness :
I put together the following code:
Rete rete = myThread.getJessEngine();
Value v = rete.executeCommand("(retract-string
\"(PropertyValue
http://echo.iat.sfu.ca/owl/psychoacoustics.daml#hasDirectionality
http://echo.iat.sfu.ca/owl/psychoacoustics.daml#AShok
System.out.println("value v : " + v.toString());
// Prints out TRUE!
So, obviously something is wrong with the fact string that I am trying to
create from the RDF file. BUT -- IT'S EXACTLY THE SAME! So, why is this
happening?
Can anyone shed any light on this problem. I feel like I'm taking crazy
pills.
Thank you very much.
..Jordan Willms.
rdf:resource="http://echo.iat.sfu.ca/owl/psychoacoustics.daml#Directionality
PointSource" />
http://echo.iat.sfu.ca/owl/psychoacoustics.daml#DirectionalityPointSource)\"
)");
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------