|
From: <de...@us...> - 2003-12-18 00:21:32
|
Update of /cvsroot/pymerase/pymerase/examples/xmimof
In directory sc8-pr-cvs1:/tmp/cvs-serv23096
Added Files:
README createapi.py mof-1.4.xmi
Log Message:
add skeleton of an experiment for pymerase generating its own version of the MOF
--- NEW FILE: README ---
Can pymerase generate code for UML 1.4?
--- NEW FILE: createapi.py ---
#!/usr/bin/env python
import sys
import os
import pymerase
# NOTE: Jython can't use the python way to load modules based on their name
# NOTE: so we have to manually import the modules we're using
# NOTE: and pass them to pymerase.run
import pymerase.input.parseXMI
import pymerase.output.CreateDBAPI
if __name__ == "__main__":
schema = os.path.abspath("./mof-1.4.xmi")
outputPath = os.path.abspath("./mof")
#pymerase.run(schema, 'parseXMI', output, 'CreateDBAPI')
pymerase.run(schema, pymerase.input.parseXMI, outputPath, pymerase.output.CreateDBAPI)
--- NEW FILE: mof-1.4.xmi ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE XMI SYSTEM "Model.dtd">
<XMI xmlns:Model="org.omg.mof.Model" verified="false" xmi.version="1.1">
<XMI.header>
<XMI.documentation>
<XMI.contact>
Questions and discussion: mo...@om...;
Raising issues: http://www.omg.org/library/issuerpt.html
The OMG specification on which this is based:
http://www.omg.org/cgi-bin/doc?ad/2001-07-17
The official/latest version of this file:
omg.org/models/MOF1.4/XMI1.1/Model1.4/Model.xml
</XMI.contact>
<XMI.exporter>ModelXMIProducer (switches -C -E)</XMI.exporter>
<XMI.exporterVersion>
Generated by dMOF 1.1 'mof_1_3_transition' (switches -g 1dot4)
</XMI.exporterVersion>
<XMI.longDescription>
The MOF provides a set of modeling elements, including rules for
[...2410 lines suppressed...]
<Model:Classifier xmi.idref="a118"/>
</Model:TypedElement.type>
</Model:AssociationEnd>
<Model:AssociationEnd aggregation="none" annotation="" isChangeable="true" isNavigable="true" name="typedElements" xmi.id="a289">
<Model:AssociationEnd.multiplicity>
<XMI.field>0</XMI.field>
<XMI.field>-1</XMI.field>
<XMI.field>false</XMI.field>
<XMI.field>true</XMI.field>
</Model:AssociationEnd.multiplicity>
<Model:TypedElement.type>
<Model:Classifier xmi.idref="a113"/>
</Model:TypedElement.type>
</Model:AssociationEnd>
</Model:Namespace.contents>
</Model:Association>
</Model:Namespace.contents>
</Model:Package>
</XMI.content>
</XMI>
|