Re: Easy assert-from-query using java api?

Thomas Russ <[email protected]> Thu, 30 Jun 2011 12:16:50 -0700
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
On Jun 30, 2011, at 5:24 AM, Pierre Grenon wrote:

> Hello,
> 
> I'm sorry if I'm missing the obvious but there seems to be no
> immediate way of making an assert-from-query using the Java API. I'm
> not proficient with Java (I'm using the PLM jars with Clojure) and my
> intuition is very limited here. I'm a bit concerned in particular if I
> have to go into the bowels of propositions, iterators and so on.
> 
> Is there any available document that I have missed? If none, would
> anybody have a hint?

Anything that is a COMMAND in PowerLoom can be accessed using the PLI.evaluate or PLI.sEvaluate method.  From Java I would imagine that PLI.sEvaluate would be the simplest method to use.  Something like

   PLI.sEvaluate("(assert-from-query (retrieve all (...)) :relation foo)", "MY-MODULE", null);

should work.