-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tom Morris
Sent: Thursday, December 30, 2004 12:47 AM
To: [email protected]
Subject: [Andromda-user] Modeling datatypes - builtin and custom?
Is there a good description anywhere of how to model both the built-in
datatypes as well as how to add custom datatypes and use them in models?
1. It appears that the built-in datatypes have moved from the root namespace
of the model where they were in 2.1.2 and, I think, earlier revs of 3.0 to
the 'datatype' namespace. Are there any other changes to be aware of in
this space?
[CB] In 2.1.2, AndroMDA used what ever language specific datatypes that were
in the model directly (no mapping involved except for SQL types), so if you
had java.lang.String in your model, that was used in the generated code.
With 3.x, we map these language independent datatype.* types to the language
specific ones for everything (Java, XML Schema, etc).
2. What is the minimal number of modifications required to introduce a
custom datatype? Say I want to model an 'Identifier' datatype that I want
modeled as a separate type, but for now I'm happy to have it just
implemented as a String. What would I need to do to set this up? Can I
just map it directly to java.lang.String in the mapping files or do I need
to actually implement a dummy class? Do have I have to modify all the
mapping files or do they cascade/inherit from each other in some fashion?
[CB]You'd just map it in the language mapping file. You can take out the
mapping file you want to customize from the maven-andromda-plugin, place it
in <your project>/mda/conf/mappings and point to that instead of the default
that it currently points to. For example:
This:
<languageMappingsUri>file:${basedir}/conf/mappings/JavaMappings.xml</languag
eMappingsUri>
Would replace the existing:
<languageMappingsUri>Java</languageMappingsUri>
I think I've got #1 sorted, but I'd like to make sure I haven't missed
anything. I've got a workaround for #2, but I'd like to figure out what the
"correct" solution is.
The good news is that I think I'm pretty close to having
ArgoUML->Poseidon->AndroMDA working again and I've got notes which I hope to
use to write up a mini HowTo.
Tom
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user