You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Jason van Zyl <jv...@zenplex.com> on 2001/11/08 01:17:50 UTC
[torque] commons digester & datamodel descriptor
Hi,
Would anyone be averse to the use of the commons digester for parsing the
torque datamodel descriptor?
We would than be able to remove the mapping of XML attributes and elements
from the model classes and be left with just the clean Java objects. The
digester would do all the mapping in a secondary class. This would also
break the dependency on xerces. If the model ends up being used during
runtime (which I can see happening) and the datamodel is packaged up in a
JAR than it will be known to be valid and something like MinML can be used
which is very fast.
The other advantage to using the digester would be that the digester we use
for this could be used for all turbine related needs using a new type of
mapper that Robert Burrell Donkin has been working on that would allow XML
files formatted in a certain way to be mapped to standard beans.
To use this tool the datamodel descriptor would have to change so that there
are no attributes used an elements are used for everything. So we would
have something like:
<database>
<name>bookstore</name>
<defaultIdMethod>idbroker</defaultIdBroker>
...
</database>
And so on.
But I believe using this format we can use a single digester class for all
our XML mapping requirements. Turbine configuration files, Torque/Fulcrum
configuration files, XML persistence stores or whatever.
Thoughts?
--
jvz.
Jason van Zyl
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [torque] commons digester & datamodel descriptor
Posted by Daniel Rall <dl...@finemaltcoding.com>.
Jason van Zyl <jv...@zenplex.com> writes:
> On 11/9/01 6:54 AM, "Daniel Rall" <dl...@finemaltcoding.com> wrote:
>
>> Jason van Zyl <jv...@zenplex.com> writes:
>>
>>> Thoughts?
>>
>> I'm not very familiar w/ the digester, but what I have heard of it
>> sounds good. Would it be possible to see a very rough sample on this
>> list?
>
> Sure, here's what the SourceTransformer users in the TDK. Realize that I'm
> working with Robert Burell to make this even simpler so even this example
> below is longer than it could be:
>
> http://cvs.apache.org/viewcvs/jakarta-turbine-tdk/src/tdk/task/org/apache/td
> k/transformer/TransformationsDigester.java?rev=1.2&content-type=text/vnd.vie
> wcvs-markup
>
> I would like to be able to use a single call in the Digester to map
> everything in an XML to a Java object. Nested elements and all.
That's exceptional -- I'm looking forward to using it.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [torque] commons digester & datamodel descriptor
Posted by Jason van Zyl <jv...@zenplex.com>.
On 11/9/01 6:54 AM, "Daniel Rall" <dl...@finemaltcoding.com> wrote:
> Jason van Zyl <jv...@zenplex.com> writes:
>
>> Thoughts?
>
> I'm not very familiar w/ the digester, but what I have heard of it
> sounds good. Would it be possible to see a very rough sample on this
> list?
Sure, here's what the SourceTransformer users in the TDK. Realize that I'm
working with Robert Burell to make this even simpler so even this example
below is longer than it could be:
http://cvs.apache.org/viewcvs/jakarta-turbine-tdk/src/tdk/task/org/apache/td
k/transformer/TransformationsDigester.java?rev=1.2&content-type=text/vnd.vie
wcvs-markup
I would like to be able to use a single call in the Digester to map
everything in an XML to a Java object. Nested elements and all.
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
jvz.
Jason van Zyl
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [torque] commons digester & datamodel descriptor
Posted by Daniel Rall <dl...@finemaltcoding.com>.
Jason van Zyl <jv...@zenplex.com> writes:
> Thoughts?
I'm not very familiar w/ the digester, but what I have heard of it
sounds good. Would it be possible to see a very rough sample on this
list?
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>