Yes, thanks, this kind of test works. This structure of nested java-beans is a consequence of using object properties in my OWL ontology (properties having OWL classes both as domain and as range). Do you think that "instanceof" tests could be a not so efficient pattern-matching technique from a computational point of view? (i.e. with some hundreds of "instanceof" tests)
Marco Ernest Friedman-Hill wrote: > > You mean like an "instanceof" test? > > (defrule do-if-jb2 > (JB1 (some-slot ?x&:(instanceof ?x com.whatever.JB2))) > => > ... > > > > On Jul 26, 2009, at 5:57 PM, [email protected] wrote: > >> Dear JESS users and devs, >> I have to write a group of rules dealing with nested >> java beans. The (simplified) scenario is the following: >> >> 1) let's suppose I >> have three Java beans: JB1, JB2 and JB3; both JB2 and JB3 can be >> slots of JB1; >> JB2 and JB3 have normal slots (with different data types but without >> other... > > --------------------------------------------------------- > Ernest Friedman-Hill > Informatics & Decision Sciences, Sandia National Laboratories > PO Box 969, MS 9012, Livermore, CA 94550 > http://www.jessrules.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]. > -------------------------------------------------------------------- > > > -- View this message in context: http://www.nabble.com/JESS%3A-Matching-Java-Objects-tp24680602p24681626.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]. --------------------------------------------------------------------
