[Uml-devel] fun with standards

Andrew Sutton ansutton at kent.edu
Wed Feb 19 10:34:02 UTC 2003


i've basically finished a very topological XMI parser for XMI based metamodel 
specifications (yeah!). unfortunately, i ran into some problems with some of 
the XMI files containing the metamodel specifications.

1. apparently, you can have multiple top-level packages.
	- odd, but easily solveable - which is done
2. UML, CWM use XML attributes to reference other elements
	- this was actually pretty easy to accomodate in code
3. UML, CWM construct datatypes as components using CORBA typecodes
	- i've been replacing those datatypes with MOF-1.4 compatible versions. 
completely done with UML, 25% with CWM (there's alot there).
4. PrimitiveTypes is really part of MOF, but defined externally to the MOF 
specification (can't figure out why).
	- I merged the two into the same specification (now mof-1.4.xmi)
5. MOF uses href's to define types references to a nonexistent URL
	- i rewrote all the href's as xmi.idref's to correspond to xmi.id's of the 
PrimitiveTypes package

so, mmgen now parses the following major constructs that appear in XMI 
metamodel specifications:
	- packages (although not package inheritance yet)
	- primitive types
	- enumeration types
	- structure types
	- classes
	- attributes
	- references
	- operations, parameters
	- associations, association ends

i'm not worrying about the following:
	- tags
	- constraints
	- constants
	- exceptions (these only appear in MOF)
	- some other stuff probably

in its current form, mmgen will open an XMI file, parse it, create an object 
structure, then iterate that structure and dump the major constructs to 
stdout - no big deal. i think i have enough information to start generating 
code too. sweet.

has anybody else played with this yet? IMHO its nifty ;)

andy




More information about the umbrello-devel mailing list