Something like

(bind ?r (new java.io.StringReader (call ?*myclass* mymethod)))
(bind ?j (new jess.Jesp ?r (engine)))
(call ?j loadFacts)

would work, except that Jesp.loadFacts is package-protected. If you
made it public, the this would work. I don't see any strong reason why
this method shouldn't be public, so I'll make it public in 6.0a4.



I think Ryan Beckes wrote:
> Hello,
> I have a java method that returns a String with
> multiple facts in that String. I would like to call
> that method and parse the facts it returns and assert
> all of them, similar to load-facts, but without the
> file.
> Please let me know if you need me to clarify.
> 
> Thanks,
> Ryan
> 
> EXAMPLE------
> Here's my example, which will assert a single fact
> from mymethod, which is not acceptable since mymethod
> returns a single string with multiple facts.
> 
> (defglobal ?*myclass* = (new myclass))
> 
> (defrule initialize 
>   =>
>    (assert-string (call ?*myclass* mymethod
>                   )
>    )
> )
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail. 
> http://personal.mail.yahoo.com/
> 
> ---------------------------------------------------------------------
> 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]
> ---------------------------------------------------------------------
> 



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

---------------------------------------------------------------------
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]
---------------------------------------------------------------------

Reply via email to