Model/Migration Generation from UML (XMI or similar format)

Hey,

I'm modelling some apps with 40+ models at the moment, using bouml for the uml.

What I hate about modelling is that I have to write the generator commands for the migrations or models by hand. So I have to write the whole bunch at least twice, once for the modelling once for the actual generation.

Since tools like bouml, dia and others support a lot of format for exporting the uml diagrams, I wondered if there is a way to generate either rails migrations, rails models or the proper generator commands automatically. Alhtough some of these tools support code generation for a variety of languages, I haven't found anything that I could use to generate something like the above.

My question now is, does anyone know a tool that can convert, either uml models, or interchange format into some predefined (templates) output? For example XMI into migrations using xslt or so ..

greetings and thanks, Christoph