Yr sbjt ws a bt hrd 2 udrstd, bt I wl try 2 ansr ur msg newa.

listDeftemplates() lists only deftemplates, no "facts" (although I
suspect you're just being imprecise in your language here.) It lists
not only the ones you explicitly define using (deftemplate) but also
ones you implicitly define by using ordered facts, and a few defined
automatically by Jess. I think you're probably asking whether you can
filter out only the explicitly defined ones. I think you can, by using
the following two pieces of information. Assume you have a Deftemplate
object "dt" in hand.

1) All internal-use deftemplates have names starting with "__", like
__clear and __fact. So you can discard any for which
dt.getName().startsWith("__"), as long as you follow the reasonable
convention of not starting any of your own template names with "__".

2) All of the templates created automatically for ordered facts have
"(Implied)" as their doc-comment. So you can also discard all the ones
for which dt.getDocstring().equals("(Implied)") is true, again
assuming that you don't use this String to document any of your own
deftemplates. 

I think Archana Raghavendra wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi,
>      I have a question about the Java Api  listDeftemplates(). This, apart from the 
>deftemplates,also gives out other facts which are asserted in the engine. Is there a 
>way to go arnd this?
> 
> 
> thanks,
> Archana
> 



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

Reply via email to