Jess derives the property names from Beans according to the Java Beans
standard, so these are the same names that any other tool would use
for the same properties. The java.beans.Introspector.decapitalize()
method describes this scheme:
Utility method to take a string and convert it to normal Java
variable name capitalization. This normally means converting the first
character from upper case to lower case, but in the (unusual) special
case when there is more than one character and both the first and
second characters are upper case, we leave it alone.
Thus "FooBah" becomes "fooBah" and "X" becomes "x", but "URL" stays
as "URL".
Therefore, yes, it turns out that Name can't be a Java Bean property
name; or perhaps more to the point, the method getName() implies a
property names "name," not "Name".
I think Thomas Gentsch wrote:
> Hello,
>
> quick question - it appears to me, that I cannot use a name like
> 'MySlot' (with a capital first letter) in a rule, e.g. (here 'Name'):
>
> (defrule warn-if-high
> (tank (Name ?name) (high TRUE) (intact TRUE))
> (not (warning high ?name))
> =>
> (assert (warning high ?name))
> (printout t "WARNING: TANK " ?name " IS HIGH!" crlf)
> )
>
> even if the Java bean's method is actually getName(). On the other hand,
> something like 'ID' or 'LCState' is OK. Why that? Any workaraound
> besides renaming it everywhere?
>
> Thanks a lot,
> tge
>
> --
> Thomas Gentsch
>
> --
> ................................................
> Thomas Gentsch
> --------------
> Phone: +49 711 486948 E-mail: [EMAIL PROTECTED]
> Mobil: +49 173 6620507
> Fax: +49 711 4687889 WWW: www.e-tge.de
> ................................................
>
>
>
> ---------------------------------------------------------------------
> 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]
---------------------------------------------------------------------