Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 58810 invoked from network); 9 May 2003 15:04:16 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 9 May 2003 15:04:16 -0000 Received: (qmail 848 invoked by uid 97); 9 May 2003 15:06:21 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 841 invoked from network); 9 May 2003 15:06:20 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 9 May 2003 15:06:20 -0000 Received: (qmail 58548 invoked by uid 500); 9 May 2003 15:04:12 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 58500 invoked from network); 9 May 2003 15:04:11 -0000 Received: from pcow057o.blueyonder.co.uk (HELO blueyonder.co.uk) (195.188.53.94) by daedalus.apache.org with SMTP; 9 May 2003 15:04:11 -0000 Received: from localhost ([80.194.24.21]) by blueyonder.co.uk with Microsoft SMTPSVC(5.5.1877.757.75); Fri, 9 May 2003 16:04:09 +0100 Date: Fri, 9 May 2003 16:05:03 +0100 Subject: Re: [Betwixt] Derived Class support Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) From: robert burrell donkin To: "Jakarta Commons Developers List" Content-Transfer-Encoding: 7bit In-Reply-To: <000001c310b6$da83f840$1db9c150@spiritsoft.com> Message-Id: <9C884A7C-822F-11D7-864F-003065DC754C@blueyonder.co.uk> X-Mailer: Apple Mail (2.482) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N hi ross that all sounds great! the best way is to do a cvs diff -u against CVS HEAD and either post it to the list or add it to bugzilla. - robert On Friday, May 2, 2003, at 03:26 PM, Ross Mason wrote: > Hi James/ Robert, > > > > Just to give you an update. I've got betwixt working with most of the > functionality needed for Derived class support - > > > > - Population of derived class attributes from the BeanReader now > works. > > - It also supports population of beans with common attributes. i. > e. > 'Person' has an attribute 'name' only, 'Consultant' and 'Hitman' extend > Person. They both have a attributes hourlyRate, but the attribute is not > derived. I needed this scenario supported in my code. Currently, only > primitive common attribute types are supported. > > - To demonstrate this I've written a new test case in the derived > package. This tests all the old and new functionality and also tests > round-tripping. > > - I haven't had time to write support in the .betwixt files to > specify whether the className attribute should be written for a bean or > made > the attribute name 'className' configurable (as James suggested) . I've > been > testing the code with a derived XMLIntrospector that checks to see if the > bean being introspected is of a certain base-class type and includes a > className attribute descriptor. Maybe we should let users register derived > classes with the XMLIntrospector and determine whether the attribute > should > be written automatically? > > - I've been running my project with this code for the past week > without any problems and all the existing test-cases work. > > > > The code I've written does the job but there may be better ways of doing > it > (especially the support for common attributes). Betwixt as it stands is > pretty hard to extend and it's apparent that certain areas need > re-factoring/ re-architecting. I would be keen to get involved with this, > but I'm pretty busy with other stuff for the next 6 weeks. > > > > Anyway, what now? How do you want me to get the code to you so you can > check > it over? > > > > > > Ross > > ------------------------------------------- > > Mobile: +44 (0) 7745 944 082 > > Work: +44 (0) 20 7503 4811 > > Fax: +44 (0) 20 7503 4811 > > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org