well, the data model is mapped via hibernate so it's not easily modifyable.
my current solution uses xmlbeans and takes what that generates and moves it
to the hibernate data model objects. it's a lot of code moving crap back and
forth (and xmlbeans is buggy) so i was hoping i could get get castor to sit
in the middle of what i have. i could see what castor generates and maybe
coerce that into something hibernate likes i guess

my big goal is to use castor underneath spring OXM, as i said. that is going
to slot in nicely to spring-batch, and my whole bulk loading processing may
end up being almost all configuration. that'd be so sweet.

by the way, after i posted i read a bit more and thought i'd found the
solution in container=false. but that isn't acting as i expected (meaning i
am feeling a bit thick right now)

thanks!

john

On Wed, Dec 3, 2008 at 7:05 AM, Werner Guttmann <[EMAIL PROTECTED]>wrote:

> Hi John,
>
> welcome .. :-). Yes, that combination is a nice one. Before trying to
> address your questions re: mapping, let me ask you one (important)
> question first. As you have XML schemas anyhow, why bother writing a
> mapping (file) at all ? Surely you could use the Castor XML code
> generator and generate Java (and descriptor) classes from your XML
> schema, and simply use them with Spring OXM.
>
> If that's not an option to you, I'd liek to know why.
>
> Regards
> Werner
>
> john guthrie wrote:
> > hi, came to castor by way of spring OXM and it looks like (exactly) what
> i
> > need.
> >
> > i am trying to use castor to map my current XML schema to my current data
> > model and am stuck trying to figure out how to map some of an elements
> > attributes to a child object of the, er, current object. an example would
> > be...
> >
> > XML:
> > <event type="FOO" created_by="user1"/>
> >
> > Java
> >
> > public class Event {
> >
> >   public Metadata metadata; // = new Metadata();
> >
> >   public String type;
> >
> > }
> >
> > public class Metadata {
> >
> >   public String createdBy;
> >
> > }
> >
> >
> > i don't think i can use a set-method of getMetadata().setCreatedBy() even
> if
> > i uncomment the initializer. do i need to write a handler?
> >
> > thanks.
> >
> > john
> >
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to