I was actually just thinking about that Jeremy. The way I generate the files right now is by reproducing all the classes from the XSD file and simply marshalling them out. In any case, all the info and structure is there, it should not be that hard to get Castor to generate the information on the fly.
And, for the actual JDO instance, that is now (I believe), already completly buildable through code as is, so it would be a matter of supplying the information for that somewhere. -Nick On 7/13/05, Jeremy Haile <[EMAIL PROTECTED]> wrote: > It sounds like your annotations are used to generate a Castor mapping > XML file. JAXB actually works by reading the annotations at runtime - > meaning that no XML file would be required at all. This would require > Castor to be modified to support reading the annotations at runtime > rather than reading the XML mapping file. In fact, perhaps the Castor > introspection code could simply be modified to recognize the annotations > when figuring out how to map "unmapped" classes. > > The annotations used by JAXB have a one-to-one mapping to the mappings > provided by Castor for the most part, with only a few additions (which I > really like) For example, JAXB allows you to do something like the > following: > <autoDealership> > <vehicles> > <car make="Ford" model="Mustang" convertible="false"/> > <truck make="Nissan" model="Titan" fourWheelDrive="true"/> > </vehicles> > </autoDealership> > > I believe the only way this can be represented in Castor (correct me if > I'm wrong) is: > <autoDealership> > <vehicle xsi:type="car" .... /> > <vehicle xsi:type="truck" .... /> > </autoDealership> > > Obviously, the first example is much easier to read. And JAXB supports > mapping these type of mappings using annotations. (JAXB also supports > the second example as well) > > Jeremy > > On Tue, 12 Jul 2005 23:23:19 -0400, "Nick Stuart" <[EMAIL PROTECTED]> > said: > > No sorry, should have been more specific. I simply mean that the > > annotations are used to generate the mapping XML files. I dont have > > any experince/knowledge with JAXB and what it involves, although I > > think I'll read up on it tomorrow. :) > > > > The project is currently waiting for approval on java.net, and would > > be more then happy to expand its goal and purpose. Everythings got to > > start somewhere. > > > > -Nick > > > > p.s. Why is castor no where to be found on the front page of code > > haus? Found this really odd when I went looking for it there for some > > reason. > > > > On 7/12/05, Bruce Snyder <[EMAIL PROTECTED]> wrote: > > > On 7/11/05, Nick Stuart <[EMAIL PROTECTED]> wrote: > > > > > > > I have been meaning to set it up somewhere, but just haven't yet. Its > > > > basically a straight translation from the xml spec (used Castors own > > > > code generation to generate the classes from the descriptors and to > > > > write back out to the xml). I've also written a quick and dirty ant > > > > task to help with this as well. It's been working on a very small app > > > > I've been working on, but no promises. :) > > > > > > By XML spec, do you mean the JAXB 2.0 spec? If so, having this in > > > Castor would be fantastic! > > > > > > Bruce > > > -- > > > perl -e 'print unpack("u30","D0G)[EMAIL > > > PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*" > > > );' > > > > > > The Castor Project > > > http://www.castor.org/ > > > > > > Apache Geronimo > > > http://geronimo.apache.org/ > > > > > > > ------------------------------------------------- > > If you wish to unsubscribe from this list, please > > send an empty message to the following address: > > > > [EMAIL PROTECTED] > > ------------------------------------------------- > > > > ------------------------------------------------- > If you wish to unsubscribe from this list, please > send an empty message to the following address: > > [EMAIL PROTECTED] > ------------------------------------------------- > > ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------