Book a Demo

Author Topic: New Code Generation Language (Microstrategy)  (Read 3166 times)

Matthew Sanchez

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
New Code Generation Language (Microstrategy)
« on: October 31, 2012, 06:55:30 am »
Hi everyone.  New to the forum here but I've been using EA for a few years now.  I am now getting into some new areas.  I am now using EA for modeling some Business intelligence tools like Microstrategy and Cognos.  I would like some help getting started with getting code generation working for these new languages.  I have added Microstrategy as a new language and added a data type to get it to show up.  Now I am totally overwhelmed when I go into the code generation area.  

I want to create the first sample with some help.  I believe if I can get this command written I can do most of the things needed in the project.  If people can help me through this first one I will be happy to post the results of all of my work through the languages I would be adding.  I need to turn a class with a stereotype of "attribute" in EA into this line of code.

CREATE ATTRIBUTE "Day" DESCRIPTION "Duplicate of Day Attribute from folder \Time" IN FOLDER "\Schema Objects\Attributes" ATTRIBUTEFORM "ID" FORMDESC "Basic ID form" FORMTYPE TEXT SORT ASC EXPRESSION "[DAY_DATE]" LOOKUPTABLE "LU_DAY" FOR PROJECT "MicroStrategy Tutorial";

the hard parts are finding the class attribute who's stereotype is "ID" and looping through the classes dependencies and getting a comma delimited list of the targets.  See Below for the mapping.  


Where:
"DAY" is the name of the class
DESCRIPTION = Note
In Folder = Parent Project
ATTRIBUTEFORM = attribute stereotype for the attribute who's stereotype = "ID"
FORMDESC = attribute form for the attribute who's stereotype = "ID"
FORMTYPE = attribute datatype for the attribute who's stereotype = "ID"
EXPRESSION = attribute name for the attribute who's stereotype = "ID"
LookupTable = comma delimited list of the entities which this class has a dependency on and the stereo type of the dependency is "Lookup"
EXPSOURCETABLES = comma delimted list of the entities which this class has a dependency on and the stereotype of the dependency is "use"


g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: New Code Generation Language (Microstrategy)
« Reply #1 on: October 31, 2012, 07:08:02 am »
Not sure if I understood all of your requirements, but it looks like you need to create stereotype specialized templates (for <<ID>>).

HTH
Günther
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/