You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by h....@webfair.com on 2002/11/12 19:45:06 UTC

AW: [Betwixt] Support of user defined XMLBeanInfo?

Hi Robert,

I'm glad to hear that you are interested in pushing Betwixt on and embrace
new ideas. But before I start to come up with some of my ideas I would like
to know what your preferences are.

The ID/IDREFS is a good way to support references, when your data is kept
inside one single XML file. As long as you can make sure, that the beans
implement an equals method, it should be quite simple to provide an support
for the ID/IDREF stuff.

What I was talking about in my previous mail was the ability to support a
kind of XLink, which supports references between different XML documents.
Until now I am not really sure, if this is a subject to Betwixt at all,
because you will have to provide extra information or special objects for
those references. At the moment I did not think about how to keep this
flexible, if it is possible at all.

But anyway I would like to use Betwixt in a more flexible way (e.g. having
own XMLBeanInfos for some Beans).

Sadly my interest in supporting ID/IDREF is small, because it doesn't help
me on with my problem. In fact using ID/IDREF is just a way to keep your XML
files smaller.

But on the other hand, if you are interested in making the way beans are
written and read more flexible I would like to support you. For example what
is it about the .betwixt files? I could not further information about them.

BTW: I have posted this message to the user and the dev mailing list,
because I think we should move this topic to the dev list.

- Harald

> -----Ursprüngliche Nachricht-----
> Von: robert burrell donkin 
> [mailto:robertburrelldonkin@blueyonder.co.uk]
> Gesendet: Montag, 11. November 2002 22:44
> An: Jakarta Commons Users List
> Betreff: Re: [Betwixt] Support of user defined XMLBeanInfo?
> 
> 
> hi Harald
> 
> when i started working on the ID/IDREF stuff i did consider 
> this. i had an 
> idea that they might prove useful but didn't really have a 
> suitable itch 
> at that time.
> 
> there are a number of improvements that i've been wanting to 
> make in the 
> ID/IDREF area for a while now (i sort of lost heart for a 
> while when maven 
> developed a classloader problem that killed my validation 
> test cases) so 
> this has probably come up at a good time.
> 
> if you could come up with some example code or some ideas 
> about how you'd 
> see them working, then we might be able to come up with a good design.
> 
> - robert
> 
> On Saturday, November 9, 2002, at 05:26 PM, 
> h.dietrich@webfair.com wrote:
> 
> > Hi,
> >
> > I would like to use Betwixt for handling relations between 
> objects/beans.
> >  I
> > found out that I could do this using the ID and IDREF 
> attributes. This
> > should work, but it requires all XML data to be stored in 
> one XML file. 
> > For
> > a larger amount of data this could be a problem.
> > To avoid too large XML files I started to write a relation 
> bean, which
> > contains a reference to another XML file and the referenced 
> bean. The
> > referenced bean is only read, when it gets accessed via a 
> get method.
> > Now I have some problems to implement this using Betwixt. 
> The relation 
> > bean
> > cannot be written/read using the standard introspection. I 
> have to provide
> > some information, how to write/read the bean. Beacause of 
> this I created 
> > a
> > separate XMLBeanInfo. The XMLBeanInfo should have all 
> information required
> > for writing/reading the relation bean.
> > Now I am missing a method to provide a method to place a 
> XMLBeanInfo in 
> > the
> > XMLIntrospector, which seems to be something like a XMLBeanInfo 
> > repository,
> > when caching is turned on. I have used a work around for 
> doing this by
> > getting a XMLBeanInfo from the XMLIntrospector and 
> modifying it. When 
> > using
> > this using this XMLBeanInfo I get again problems using Betwixt.
> >
> > Before going on describing the problems, I would like to 
> know, if you are
> > interested in Betwixt being used this way at all, or if you 
> want to keep 
> > it
> > just to be used with "standard" Java Beans.
> >
> > So for now I just have to know, if you plan to provide user defined
> > XMLBeanInfos in Betwixt.
> >
> > Thanks,
> > Harald
> >
> > --
> > To unsubscribe, e-mail:   
> <mailto:commons-user-unsubscribe@jakarta.apache.
> > org>
> > For additional commands, e-mail: 
> <mailto:commons-user-help@jakarta.apache.
> > org>
> >
> 
> 
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Betwixt] XMLBeanInfo customization

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Sunday, November 17, 2002, at 09:36 PM, Stephen Colebourne wrote:

> From: "robert burrell donkin" <ro...@blueyonder.co.uk>
>> On Saturday, November 16, 2002, at 02:08 PM, Martin van den Bemt wrote:
>>>> since XMLBeanInfo's were supposed to correspond to 
>>>> java.beans.BeanInfo.
>>>> BeanInfo supports programmatic implementations. so if you had 
>>>> something
>>>> like xxx.yyy.zzz.FooBean then betwixt might look for a
>>>> xxx.yyy.zzz.FooBeanXMLBeanInfo class which would be a programmatic
>>>> XMLBeanInfo.
>>>>
>>>> i don't know if adding this feature would help you or not.
>>>
>>> This is already "kind of" supported, from a java.beans.Introspector
>>> perspective. Don't think it is an ellegant solution though that sun
>>> chose (with registring searchpaths)
>>
>> agreed :)
>>
>> i was thinking along the lines of allowing a custom programmatic
>> XMLBeanInfo implementation but insisting that the package and name match
>> exactly. so, for example, if you have a bean with full name
>> xxx.yyy.FooBean, betwixt would try to discover a class called
>> xxx.yyy.FooBarXMLBeanInfo.
>>
>> anyone have any improvements on this plan?
>
> I've lost track of the original request, but...
> [clazz] is intended to provide a pluggable replacement to Introspector,
> capable of pulling in data from XML files or specially coded classes.
> Ideally I would like to see [betwixt] use [clazz] once complete, thus 
> maybe
> the effort should go into [clazz] as a broader solution?

probably so. unfortunately the amount of effort that i had intended to 
devote to the above solution is probably too little to make a difference 
to [clazz] ;)

a pluggable introspection solution would be cool.

what i was talking about (above) is a little different since really it'd 
be an alternative to .betwixt files for custom mappings. when you're using 
a custom mapping then betwixt only makes limited use of the introspector 
(if at all).

- robert


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Betwixt] XMLBeanInfo customization

Posted by Stephen Colebourne <sc...@btopenworld.com>.
From: "robert burrell donkin" <ro...@blueyonder.co.uk>
> On Saturday, November 16, 2002, at 02:08 PM, Martin van den Bemt wrote:
> >> since XMLBeanInfo's were supposed to correspond to java.beans.BeanInfo.
> >> BeanInfo supports programmatic implementations. so if you had something
> >> like xxx.yyy.zzz.FooBean then betwixt might look for a
> >> xxx.yyy.zzz.FooBeanXMLBeanInfo class which would be a programmatic
> >> XMLBeanInfo.
> >>
> >> i don't know if adding this feature would help you or not.
> >
> > This is already "kind of" supported, from a java.beans.Introspector
> > perspective. Don't think it is an ellegant solution though that sun
> > chose (with registring searchpaths)
>
> agreed :)
>
> i was thinking along the lines of allowing a custom programmatic
> XMLBeanInfo implementation but insisting that the package and name match
> exactly. so, for example, if you have a bean with full name
> xxx.yyy.FooBean, betwixt would try to discover a class called
> xxx.yyy.FooBarXMLBeanInfo.
>
> anyone have any improvements on this plan?

I've lost track of the original request, but...
[clazz] is intended to provide a pluggable replacement to Introspector,
capable of pulling in data from XML files or specially coded classes.
Ideally I would like to see [betwixt] use [clazz] once complete, thus maybe
the effort should go into [clazz] as a broader solution?

Stephen



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Betwixt] XMLBeanInfo customization

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Saturday, November 16, 2002, at 02:08 PM, Martin van den Bemt wrote:

>
>> since XMLBeanInfo's were supposed to correspond to java.beans.BeanInfo.
>> BeanInfo supports programmatic implementations. so if you had something
>> like xxx.yyy.zzz.FooBean then betwixt might look for a
>> xxx.yyy.zzz.FooBeanXMLBeanInfo class which would be a programmatic
>> XMLBeanInfo.
>>
>> i don't know if adding this feature would help you or not.
>
> This is already "kind of" supported, from a java.beans.Introspector
> perspective. Don't think it is an ellegant solution though that sun
> chose (with registring searchpaths)

agreed :)

i was thinking along the lines of allowing a custom programmatic 
XMLBeanInfo implementation but insisting that the package and name match 
exactly. so, for example, if you have a bean with full name 
xxx.yyy.FooBean, betwixt would try to discover a class called 
xxx.yyy.FooBarXMLBeanInfo.

anyone have any improvements on this plan?

- robert


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Betwixt] XMLBeanInfo customization [WAS Re: AW: [Betwixt] Support of user defined XMLBeanInfo?]

Posted by Martin van den Bemt <ml...@mvdb.net>.
> since XMLBeanInfo's were supposed to correspond to java.beans.BeanInfo. 
> BeanInfo supports programmatic implementations. so if you had something 
> like xxx.yyy.zzz.FooBean then betwixt might look for a 
> xxx.yyy.zzz.FooBeanXMLBeanInfo class which would be a programmatic 
> XMLBeanInfo.
> 
> i don't know if adding this feature would help you or not.

This is already "kind of" supported, from a java.beans.Introspector
perspective. Don't think it is an ellegant solution though that sun
chose (with registring searchpaths)

Mvgr,
Martin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


[Betwixt] XMLBeanInfo customization [WAS Re: AW: [Betwixt] Support of user defined XMLBeanInfo?]

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Tuesday, November 12, 2002, at 06:45 PM, h.dietrich@webfair.com wrote:

> Hi Robert,

hi Harald

<snip>

> But anyway I would like to use Betwixt in a more flexible way (e.g. having
> own XMLBeanInfos for some Beans).

<snip>

> But on the other hand, if you are interested in making the way beans are
> written and read more flexible I would like to support you. For example 
> what
> is it about the .betwixt files? I could not further information about 
> them.

.betwixt files are the way that betwixt allows XMLBeanInfo's to be 
customized. you can do things such as deciding which properties are going 
to be mapped to xml etc. there is (some) documentation on them on the web 
site (http://jakarta.apache.org/commons/betwixt).

since XMLBeanInfo's were supposed to correspond to java.beans.BeanInfo. 
BeanInfo supports programmatic implementations. so if you had something 
like xxx.yyy.zzz.FooBean then betwixt might look for a 
xxx.yyy.zzz.FooBeanXMLBeanInfo class which would be a programmatic 
XMLBeanInfo.

i don't know if adding this feature would help you or not.

- robert


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


[Betwixt] linking multiple xml documents [WAS Re: AW: [Betwixt] Support of user defined XMLBeanInfo?]

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Tuesday, November 12, 2002, at 06:45 PM, h.dietrich@webfair.com wrote:

> Hi Robert,

hi Harald

(i'm going to divide up your different topics.)

<snip>

> What I was talking about in my previous mail was the ability to support a
> kind of XLink, which supports references between different XML documents.
> Until now I am not really sure, if this is a subject to Betwixt at all,
> because you will have to provide extra information or special objects for
> those references. At the moment I did not think about how to keep this
> flexible, if it is possible at all.

i don't know if it's possible or whether it's an appropriate subject for 
betwixt either. that's what makes it interesting :)

so, let's see if i've got it right. the idea would be that you want to 
process multiple xml files but create a single object model at the end. 
the idea is that the ID/IDREF would be used to match up a reference in one 
file with an object in another.

is this right?

- robert


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>