Return-Path: Delivered-To: apmail-incubator-abdera-dev-archive@locus.apache.org Received: (qmail 39932 invoked from network); 30 Jul 2007 23:04:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2007 23:04:07 -0000 Received: (qmail 59776 invoked by uid 500); 30 Jul 2007 23:04:07 -0000 Delivered-To: apmail-incubator-abdera-dev-archive@incubator.apache.org Received: (qmail 59753 invoked by uid 500); 30 Jul 2007 23:04:06 -0000 Mailing-List: contact abdera-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-dev@incubator.apache.org Delivered-To: mailing list abdera-dev@incubator.apache.org Received: (qmail 59744 invoked by uid 99); 30 Jul 2007 23:04:06 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 16:04:06 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jasnell@gmail.com designates 66.249.82.229 as permitted sender) Received: from [66.249.82.229] (HELO wx-out-0506.google.com) (66.249.82.229) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 23:04:01 +0000 Received: by wx-out-0506.google.com with SMTP id h30so1430892wxd for ; Mon, 30 Jul 2007 16:03:40 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=aNpdzCFUbV/qiQMrxr168VExaWcuMJ/rwYWERl8ptGN9qOy9XvmtzKaZ8Xk0SlNMr4i946zww4Q6J/FEGxS8d7Kd63ZGM1tr3QlNeE59hwXgMDgfkg3zcIQ9vPSBzPuIIOJAm1EfLlv8MVDUO1fsB/J3yXTlMrwC81yAw9hwMIQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=CbAcZjBlRSr+4gyhgE4wvDCqdArM+NCL9XUHXkCCtQQqtWO2X+8Eqz2qslDh2CnlCWv6mSfszD3Kk7waroidIE/qwGg2QSlLW874WdkrHh/TQPSfv9a1EG/yVaZvq5+pD1QmUslwjg3TnnjLSMftCbd8vpLajEPT8IHZkqHBmNU= Received: by 10.70.52.1 with SMTP id z1mr10767718wxz.1185836620599; Mon, 30 Jul 2007 16:03:40 -0700 (PDT) Received: from ?192.168.1.106? ( [67.181.218.96]) by mx.google.com with ESMTPS id g9sm4242350wra.2007.07.30.16.03.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 30 Jul 2007 16:03:39 -0700 (PDT) Message-ID: <46AE6E4A.1050907@gmail.com> Date: Mon, 30 Jul 2007 16:03:38 -0700 From: James M Snell User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: abdera-dev@incubator.apache.org Subject: Re: Annotations References: <46AE4F43.3050608@gmail.com> <29a761a00707301456t1ccfb117xa98aee9c48e02e8@mail.gmail.com> In-Reply-To: <29a761a00707301456t1ccfb117xa98aee9c48e02e8@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org We could easily do something like... @AtomEntry @AtomConverter(impl="com.example.foo.MyConverter") public class Foo { ... } Under the covers, this would lead to a call like: Converter converter = new MyConverter() Entry entry = converter.convert(foo); Where the converter is defined as: public class MyConverter implements Converter{ public static Entry convert(Object annotatedObject) { ... } } public interface Converter { T convert(Object annotatedObject); } Anyway, yeah, it's definitely possible. - James Brian Moseley wrote: > On 7/30/07, James M Snell wrote: > >> The main question I have is whether or not this would be useful enough >> to go through the trouble of implementing it. Thoughts? > > i can certainly imagine this mechanism being useful. > > you'd need to account for the fact that sometimes (often?) the > conversion of a bean to an entry requires calculation of element > values in collaboration with objects that aren't directly associated > with the bean itself. for instance, imagine a converter that uses a > ResourceLocator to serialize a bean into an entry with IRIs calculated > based on the state of the ResourceLocator. one way to handle this > would be to let converters be pluggable. >