|
|
Re: Modifying the generated XML (model) from diagram [message #1005685 is a reply to message #1005644] |
Mon, 28 January 2013 09:18 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Jae,
Is the ID EAttribute marked with isID true in the Ecore model? If you
do that, it should be used for the reference. Also, if your references
can't ever be cross document and you don't want the "#" in the
reference, you should mark that EReference with isResolveProxies false.
On 28/01/2013 3:49 AM, Jae Lee wrote:
> Hi, so by using GMF, I made a diagram of software architecture.
> However, I want to modify the generated XML file so that it can comply
> to our model.. Currently, here is the file generated from the diagram:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <caparch:ComponentDiagram xmlns:caparch="caparch">
> <componentType ID="" name="DriveControllerType">
> <interfaceInstances interfaceTypeLink="#//@interfaceType.0"
> interfaceRoleLink="#//@interfaceType.0/@interfaceRoles.0"/>
> </componentType>
> <connectorType>
> <interfaceInstances interfaceTypeLink="#//@interfaceType.1"
> interfaceRoleLink="#//@interfaceType.1/@interfaceRoles.0"/>
> </connectorType>
> <componentInstance ID="IBTTYPE" name="DriveControllerInstance"
> componentTypeLink="#//@componentType.0">
> <interfaceInstanceLinks
> interfaceInstanceLinking="#//@componentType.0/@interfaceInstances.0"/>
> </componentInstance>
> <connectorInstance connectorTypeLink="#//@connectorType.0">
> <interfaceInstanceLinks
> interfaceInstanceLinking="#//@connectorType.0/@interfaceInstances.0"/>
> </connectorInstance>
> <domain name="DCritical" desc="The domain containing the critical
> components" componentInstanceLinking="#//@componentInstance.0"
> connectorInstanceLinking="#//@connectorInstance.0"/>
> <link connector="#//@connectorInstance.0/@interfaceInstanceLinks.0"
> component="#//@componentInstance.0/@interfaceInstanceLinks.0"/>
> </caparch:ComponentDiagram>
>
> As you can see it seems that when this XML refers to some other
> element, it seems that it already has set the own unique id for each
> element and referring to it rather. However, I want it to refer to the
> element's ID for example. if <componentInstance ID="IBTTYPE"
> name="DriveControllerInstance"
> componentTypeLink="#//@componentType.0"> (the id is IBTTYPE) then when
> this part componentInstanceLinking="#//@componentInstance.0"
> connectorInstanceLinking="#//@connectorInstance.0"/> refers to
> #//@componentInstance.0. Rather, I want this refer to it by using
> IBTTYPE. Would this be possible by somehow?
>
> Thank you very much.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04011 seconds