Book a Demo

Author Topic: Editing Connector Transform Template  (Read 3492 times)

dannodj

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Editing Connector Transform Template
« on: January 28, 2010, 02:27:49 am »
Hi,
I am relatively new to the transform templates, and am trying to understand how to change the XSD Connector template.  I would like to use the Target Class Name instead of the Target Role Name when naming the associations in the PSM.  However I can't see how I  can set up the template to allow me to change the Name.  I can see how it is done in the DDL template, but when I try to copy the approach I get 'Unexpected Symbol on line xx'
My code is as follows:
Source
{
            %TRANSFORM_REFERENCE("XSDClass",connectorSourceElemGUID)%
                  name=%qt%%connectorSourceElemName%%qt%
                  multiplicity="0..1"
            %TRANSFORM_CURRENT("Source", "multiplicity", "name")%
                  
}

Thanks
Dan

sxie

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Editing Connector Transform Template
« Reply #1 on: January 28, 2010, 12:58:05 pm »
Hi, Dan,

I think if you'd like to change the name for the association connector, try to put the "name=%qt%%connectorSourceElemName%%qt%" before the Source{} part, like the following:

%connectorType%
%PI="\n  "%
{
%TRANSFORM_CURRENT("name")%
%TRANSFORM_REFERENCE("Connector",connectorGUID)%
name=%qt%%connectorSourceElemName%%qt%

Source
{
  %TRANSFORM_REFERENCE("XSDClass",connectorSourceElemGUID)%
  %TRANSFORM_CURRENT("Source", "role", "multiplicity")%
  
   multiplicity="0..1"

}
Target
{
  %TRANSFORM_REFERENCE("XSDClass",connectorDestElemGUID)%
  %TRANSFORM_CURRENT("Target")%
}
}


Hope this is what you are after.
sxie

dannodj

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Editing Connector Transform Template
« Reply #2 on: January 28, 2010, 08:36:13 pm »
Thanks,
that's great, now I can change the association name and the role name.  I couldn't see why the code for the DDL transform was changing the  'name' of the Source and Target, but when I tried doing the same in the XSD script it didn't work?  I guess I should just use 'role' instead.

How can I get a list of all the parameters / property names of the classes, attributes and associations?  In the help file it is not clear which ones apply to which object type.

Any help massively appreciated
Thanks
Dan