Re: JESS: [EXTERNAL] Multislot and queries

"Friedman-Hill, Ernest" <[email protected]> Tue, 9 Apr 2013 21:28:59 +0000
Newsgroups gmane.comp.java.jess
Message-ID <CD8A002B.1B29F%[email protected]>
Use QueryResult.get("visites") and then call listValue() on the result.

On 4/8/13 1:05 PM, "mike donald" <[email protected]> wrote:

>hello,
>I am a beginner in jess, I'm stuck on my application since
>I have two deftemplates
>
>(deftemplate Individu
>         (slot age)
>	 (slot sexe)=20
>         (multislot visites (default (create$) ) )
>)
>
>(deftemplate Visite
>        (slot id_visite)
>        (slot nom)
>        (slot pr)
>)
>
>I have the following query:
>
>(defquery objetHistogramme
>       ?i <- (Individu {sexe !=3D F } (age ?ag) (sexe ?sex) (visites
>$?visites))
>)
>
>In my java program, I call my query as follows:
>
>QueryResult result =3D engine.runQueryStar("objetHistogramme", new
>ValueVector());
>   while (result.next()) {
>                int x  =3D result.getInt("ag");    //age
>               =20
>                Object v =3D result.getObject("visites");     //
>Erroorrrrrrrrrr is it
>
> }
>
>I get an error when I want to retrieve the elements of multislot "visit"
>to
>the display.
>How to recover the multislot?
>
>
>Mike
>
>
>
>
>--
>View this message in context:
>http://jess.2305737.n4.nabble.com/Multislot-and-queries-tp4654137.html
>Sent from the Jess mailing list archive at Nabble.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]=
v.
>--------------------------------------------------------------------



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