Model Driven Architecture
Karl Wettin <[email protected]> Sat, 11 Jun 2005 13:49:52 +0200
| Newsgroups | gmane.comp.java.ozone.user |
|---|---|
| Organization | snigel heavy industries |
| Message-ID | <[email protected]> |
Hello list,
it's been a year and half since my last try, so I thought it was about
time to give it another try: I want to add Ozone support to my MDA-tool
Silvertejp. It creates java code based on UML class diagrams. It already
support various POJO variants, Hibernate (ORM) and Compass (OSEM).
I've made an example diagram that use most of the supported elements,
> #load upl/java.upl
> #default class stereotype <<bound ozone>>
> #default package se.snigel.ozone
>
> [ /Human/
> name:String
> birth:Date
> death:Date
> abstract +getChildren():Set
> ]<|--+----[Man]-- {1} +father +child {0..*} --[Human]
> +--[Woman]-- {1} +mother +child {0..*} --[Human]
>
> [Company]<|--[Bank](accountNumber:String)<#>--- {0..1} -[BankAccount]
>
>
> [BankAccount
> +accountNumber:String
> +balance:float
> ]- {0..*} ---[Human]
>
>
> [Company]- {0..*} +employer | +employee {0..*} -[Human]
> |
> \--[Employment
> +salary:float
> ]-- +depositBankAccount ->[BankAccount]
and manually wrote the code that would be created by above diagram:
<http://wiki.snigel.net/se_2esnigel_2esilvertejp?action=AttachFile&do=g
et&target=human_ozone.tar.gz>
It would be great if someone could take a look at that code and tell me
if I do something strange. I know for sure that my non Ozone-aware Set:s
and Map:s are bad. There is no setter, just getter. What superclass
should I extend rather than java.util?
--
karl
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20