Jess can only pattern-match on Java Bean properties, which are pairs
of getX()/setX() member functions. It can't match on member
variables. Furthermore, it can't directly match the contents of a
Vector, although you could use function calls to extract and compare
the contents of a Vector. Do read the parts of the manual regarding
Java Beans to see what's possible, and look at the jess/examples/pumps
example.
I think Cleder Catherine wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
>
>
> Hello,
>
> I'm something like new in Jess programming and I have a question :
>
> I have a Java Class wich contains 3 attributes, a String, an Object from
> another Class and a Vector.
> How can I use it in Jess to create instance of this knowledge (for the
> initial knwoledge base)
>
> public class ObjectRE {
>
> private String name;
> private ActionA action ;
> private Vector knowledge;
>
> ...
> }
>
> and in Jess I try to use it like this :
>
> ; Defclass
> (defclass objectRE ObjectRE)
> (defclass actionA ActionA)
> (defclass knowledge Knowledge) ; for items to put in the Vector
>
> ; definitions d'instances
> (bind ?obj (new ObjectRE "lettre" (new ActionA "ind_finie"))
> (definstance objectRE ?obj dynamic)
> (call ?obj addConnaissance (new ConnaissanceRE "graphie" "savoir faire"
> "vide"))
>
>
> It seems to work in Jess but I'm not sure that is the most efficient way,
> and I don't really understand how I will access to elements of my Vector in
> the rules ?
>
> If anyone has some examples I will be very greatfull.
>
> Catherine CLEDER
> University of Clermont-Ferrand (France)
>
>
>
>
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------
>
>
> --------------------------------------------------------------------
> 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]
--------------------------------------------------------------------