abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <dan.diepho...@mulesource.com>
Subject Re: Entity/DTO serialization in entry.content
Date Fri, 07 Mar 2008 07:42:07 GMT
I've been thinking about this some more today. I'd really like to write 
some code like this:

Entry entry = ....;
entry.addElement(new JAXBElement(myJaxbPojo));

Then when the entry is serialized, it would call out to JAXB and marshal 
the "myJaxbPojo" object using an XMLStreamWriter. Anyone have any 
pointers as to how to actually achieve this?

Dan

Dan Diephouse wrote:
> I've been meaning to write a JAXB plugin for this purpose, but time 
> hasn't quite allowed me. What I *really* want though is an XHTML 
> databinding framework... Frameworks fix everything! :-)
>
> http://netzooid.com/blog/2007/12/11/lazyweb-microformat-databinding/
>
> Dan
>
> Remy Gendron wrote:
>> After looking at this a bit more, XMLEncoder would be a better fit.
>>
>> R.
>>
>> -----Original Message-----
>> From: Remy Gendron [mailto:remy@arrova.ca] Sent: February 28, 2008 12:13
>> To: abdera-user@incubator.apache.org
>> Subject: Entity/DTO serialization in entry.content
>>
>> Hello all,
>>
>>  
>>
>> My entries are backed by simple entity pojos.
>>
>>  
>>
>> To prevent business rules from being implemented outside my service 
>> layer,
>> the service APIs use interfaces on these pojos. The interface make only
>> certain fields available to the caller, and some of those fields are 
>> only
>> readable (only a getter is available in the interface). So, no DTOs. 
>> Only my
>> entities wrapped by interfaces.
>>
>>  
>>
>> I was looking for a way to automate (when appropriate) the serialization
>> (both ways) of a backing entity in the entry.content atom field.
>>
>>  
>>
>> Any recommendations?
>>
>>  
>>
>> I was thinking of using something like XStream… Does Abdera provides
>> internal support for this, something working hand in hand with FOMEntry?
>>
>>  
>>
>> Thanks!
>>
>>  
>>
>> Remy
>>
>>
>> No virus found in this outgoing message.
>> Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 
>> 269.21.1/1302 - Release Date: 2008.02.27
>> 16:34
>>  
>>
>> No virus found in this incoming message.
>> Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 
>> 269.21.1/1302 - Release Date: 2008.02.27
>> 16:34
>>  
>>
>> No virus found in this outgoing message.
>> Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 
>> 269.21.1/1302 - Release Date: 2008.02.27
>> 16:34
>>  
>>
>>   
>
>


-- 
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com 


Mime
View raw message