commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: Betwixt use question..
Date Wed, 05 Jun 2002 10:12:28 GMT
Hi Martin

I've just patched the HyphenatedNameMapper to allow it to be configured to
support the name mapping in your example. So

    NameMapper mapper = new HyphenatedNameMapper(true, "_");

will create a name mapper to create UPPER_CASE_NAMES_WITH_UNDERSCORE from
your bean types and property names.

So configuring the XMLIntrospector with this stategy should all just work I
think. Do you want to send me your beans and a sample XML file and I'll add
it to betwixt as a test case?

James
----- Original Message -----
From: "Martin van den Bemt" <mllist@mvdb.net>
To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
Sent: Tuesday, June 04, 2002 9:37 PM
Subject: Betwixt use question..


> Hi everyone,
>
> This is more of a user question probably, but I have to use dev, since
> there is not user list for commons ;)
> I have a simple (in real life a little bit more complex btw) xml file,
> which looks like this :
>
> <PHYSICAL_SCHEMA autocreate="yes">
>   <DBMS kind="ODBC">
>      <DBID>
>         <DB_DATA_TYPE name="VARCHAR"/>
>      </DBID>
>   </DBMS>
> </PHYSICAL_SCHEMA>
>
> I removed a lot from the about 60 kb xml file, but this is the one I use
> to test on, so I can limit debugging output.
>
> Via the use of the NameMapper I tried to map the classnames to the
> correct element names
> I want PHYSICAL_SCHEMA mapped to PhysicalSchema, etc,etc, which my
> custom NameMapper handles fine.
> The problem is that it is not working (also played around with .betwixt
> files, which made it more confusing).
>
> Can someone give me some guideline in how I can use this xml file, the
> way I had in mind (with readable "normal" classnames, my attributes also
> set in the classes I mention (setAutocreate is eg never called during
> the parse).  Especially digester is complaining a lot that it cannot
> find any rules for the PHYSICAL_SCHEMA/DBMS (and deeper), even though I
> created the classes and added addXXXX and getXXX methods to the
> PhysicalSchema class.
>
> Am I using the wrong tool here, or just missing something ?
> (if I am using the wrong tool, please let me know).
>
> For completeness, I attached the dtd. Since this is needed for a (long
> lasting) migration to complete javacode and real database independency,
> I don't have "the power" yet, to make the xml and dtd better and have to
> deal with these nasty things.
>
> Another thing : isn't there a way to generate an object structure from
> the xml in betwixt and is that something that is interesting enough to
> be added as a tool ?
>
> Hope someone can help ;)
>
> Mvgr,
> Martin
>
>


----------------------------------------------------------------------------
----


> --
> To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.org>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message