Re: JESS: [EXTERNAL] Creating an eLearning system following TekMart example

"Rejaul Barbhuiya" <[email protected]> Wed, 26 Jun 2013 15:52:27 +0530
Newsgroups gmane.comp.java.jess
Message-ID <CA+SntFou3pYg4q5EpCyZrJbaEQA=-0RUCXpv4SEh+AqRmAU4PA@mail.gmail.com>
--047d7b676e1cbdda5a04e00c05da
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
 charset=iso-8859-1

Thanks Ernest.

In my program, I was using runQuery(arg0, arg1) and storing the result in a
Iterator as shown below. Then I am storing the result in token and from
token to fact.

            Iterator sno = engine.runQuery("session-number",new
ValueVector().add(sidValue));
            if (sno.hasNext()) {
            Token token = (Token) sno.next();
            Fact fact = token.fact(1);

Now, I want to use runQueryStar(). But I don't know how to read the Query
Result.

QueryResult sno = engine.runQueryStar("session-number",new
ValueVector().add(sidValue));
if (sno.next()) {
Token token = (Token) sno.*????*;  *what function should I use here?*
Fact fact = token.fact(1);




On Mon, Jun 24, 2013 at 11:06 PM, Friedman-Hill, Ernest
<[email protected]>wrote:

> You can use a query to easily find your facts; see
> http://www.jessrules.com/jess/docs/71/queries.html and in particular,
> http://www.jessrules.com/jess/docs/71/queries.html#in_java
>
>
>
>
> --------------------------------------------------------------------
> 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].
> --------------------------------------------------------------------
>
>


-- 
*Rejaul Karim Barbhuiya*
Senior Research Fellow

Department of Computer Science
Jamia Millia Islamia
New Delhi, India
Phone: +91-9891430568

--047d7b676e1cbdda5a04e00c05da
Content-Type: text/html;
 charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thanks Ernest.<div><br></div><div style>In my program, I w=
as using runQuery(arg0, arg1) and storing the result in a Iterator as shown=
 below. Then I am storing the result in token and from token to fact.</div>
<div><br></div><div><div>=A0 =A0 =A0 =A0 =A0 =A0 Iterator sno =3D engine.ru=
nQuery(&quot;session-number&quot;,new ValueVector().add(sidValue));</div><d=
iv>=A0 =A0 =A0 =A0 =A0 =A0 if (sno.hasNext()) {</div><div>=A0 =A0 =A0 =A0 =
=A0 =A0 Token token =3D (Token) sno.next();</div>
<div>=A0 =A0 =A0 =A0 =A0 =A0 Fact fact =3D token.fact(1);</div></div><div><=
br></div><div style>Now, I want to use runQueryStar(). But I don&#39;t know=
 how to read the Query Result.</div><div><br></div><div>QueryResult sno =3D=
 engine.runQueryStar(&quot;session-number&quot;,new ValueVector().add(sidVa=
lue));<br>
</div><div><div>if (sno.next()) {</div><div>Token token =3D (Token) sno.<b>=
<font color=3D"#cc0000">??</font><font style=3D"background-color:rgb(255,25=
5,255)" color=3D"#cc0000">??</font></b>; =A0<font color=3D"#ff00ff"><b>what=
 function should I use here?</b></font></div>
<div>Fact fact =3D token.fact(1);</div></div><div><br></div><div><br></div>=
</div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Mon,=
 Jun 24, 2013 at 11:06 PM, Friedman-Hill, Ernest <span dir=3D"ltr">&lt;<a h=
ref=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&=
gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">You can use a query to easily find your fact=
s; see <a href=3D"http://www.jessrules.com/jess/docs/71/queries.html" targe=
t=3D"_blank">http://www.jessrules.com/jess/docs/71/queries.html</a> and in =
particular,<br>

<a href=3D"http://www.jessrules.com/jess/docs/71/queries.html#in_java" targ=
et=3D"_blank">http://www.jessrules.com/jess/docs/71/queries.html#in_java</a=
><br>
<br>
<br>
<br>
<br>
--------------------------------------------------------------------<br>
To unsubscribe, send the words &#39;unsubscribe jess-users <a href=3D"mailt=
o:[email protected]">[email protected]</a>&#39;<br>
in the BODY of a message to <a href=3D"mailto:[email protected]">majordo=
[email protected]</a>, NOT to the list<br>
(use your own address!) List problems? Notify <a href=3D"mailto:owner-jess-=
[email protected]">[email protected]</a>.<br>
--------------------------------------------------------------------<br>
<br>
</blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><b style=3D"=
color:rgb(204,102,204)"><span style=3D"font-family:georgia,serif">Rejaul Ka=
rim Barbhuiya</span></b><br style=3D"color:rgb(204,51,204)"><font style=3D"=
color:rgb(0,153,0)" size=3D"1"><span style=3D"font-family:georgia,serif">Se=
nior Research Fellow</span><br style=3D"font-family:georgia,serif">
<span style=3D"font-family:georgia,serif;color:rgb(153,0,0)"><br>Department=
 of Computer Science</span><br style=3D"font-family:georgia,serif;color:rgb=
(153,0,0)"><span style=3D"font-family:georgia,serif;color:rgb(153,0,0)">Jam=
ia Millia Islamia</span><br style=3D"font-family:georgia,serif;color:rgb(15=
3,0,0)">
<span style=3D"font-family:georgia,serif;color:rgb(153,0,0)">New Delhi, Ind=
ia</span><br style=3D"font-family:georgia,serif;color:rgb(153,0,0)"><span s=
tyle=3D"font-family:georgia,serif;color:rgb(153,0,0)">Phone: +91-9891430568=
</span></font><br>

</div>

--047d7b676e1cbdda5a04e00c05da--