0

我正在与 Enterprise Architect 合作。可以将您的模型作为 MOF 1.4/XMI 1.2 导出到文件中。

<?xml version="1.0" encoding="windows-1252"?>
<XMI xmi.version="1.2" xmlns:Model="org.omg.xmi.namespace.Model" timestamp="2012-03-19 16:16:33">
<XMI.header>
    <XMI.documentation>
        <XMI.exporter>Enterprise Architect</XMI.exporter>
        <XMI.exporterVersion>5.1</XMI.exporterVersion>
    </XMI.documentation>
    <XMI.metamodel xmi.name="org.omg.mof.Model" xmi.version="1.4"/>
</XMI.header>
<XMI.content>
    <Model:Package name="MofModel" xmi.id="EAPK_E660ED7D_A77D_4721_B26B_E43EA754C0F1" isRoot="true" isLeaf="false" isAbstract="false" visibility="public_vis">
        <Model:Namespace.contents>
            <Model:Class name="Class2" xmi.id="EAID_425DBFFA_432F_4a43_B12B_DEF05643C5A3" isRoot="false" isLeaf="false" isAbstract="false" isSingleton="false" visibility="public_vis">
                <Model:GeneralizableElement.supertypes>
                    <Model:Class xmi.idref="EAID_E6FA2BB0_D81C_4b6c_86EF_9781887F5C26"/>
                </Model:GeneralizableElement.supertypes>
            </Model:Class>
            <Model:Package name="Package1" xmi.id="EAPK_F9D099B3_F646_4ca1_93CE_CBE09014C651" isRoot="true" isLeaf="false" isAbstract="false" visibility="public_vis">
                <Model:Namespace.contents>
                    <Model:Class name="Class1" xmi.id="EAID_E6FA2BB0_D81C_4b6c_86EF_9781887F5C26" isRoot="false" isLeaf="false" isAbstract="false" isSingleton="false" visibility="public_vis"/>
                </Model:Namespace.contents>
            </Model:Package>
        </Model:Namespace.contents>
    </Model:Package>
</XMI.content>
<XMI.extensions xmi.extender="Enterprise Architect 2.5"/>

完成此操作后,我想将其加载到 eclipse emf 中。直到现在,我发现没有可能做到这一点。Emf 支持 XMI 2.0 标准(不是 1.2)。有什么东西可以转换成这个版本吗?

4

1 回答 1

0

You can tell EA to export in a wide range of XMI versions and other formats.

In the export dialog, click the Publish button and you should see a list with some dozen different XMI options.

于 2012-03-20T05:56:36.707 回答