Author Topic: [SOLVED] Java API. Method parameter multiplicty  (Read 5131 times)

gervais.b

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
[SOLVED] Java API. Method parameter multiplicty
« on: January 15, 2015, 01:44:01 am »
Hello,

I have a java application who use the EA bridge to generate a single file from a lot of diagrams.
Into the generated file I would like to write if a method parameter is required or not. For that, I want to read the parameter multiplicity (if lower bound is >0, it is required).
But At this time, I'm unable to read this information and cannot see anything about that from the documentation.

Could you, please, help me to read the paramtere multiplicity ?

Thanks a lot.

EA version 9.2.920
« Last Edit: January 15, 2015, 07:17:29 pm by gervais.b »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Java API. Method parameter multiplicty
« Reply #1 on: January 15, 2015, 03:25:48 am »
You need to query t_xref :(

Create an empty EAP with one operation that has multiplicity. Now you find an entry in t_xref with name CustomProperties. The Description contains the (a bit cryptic) information you need. The Client is the guid of the operation paramter.

q.

gervais.b

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Java API. Method parameter multiplicty
« Reply #2 on: January 15, 2015, 07:16:25 pm »
Thanks a lot.

For a more complete response, the "t_xref" contains a "Description" column.
The content of this column is a plain text who contains a markup where each tag start with "@+tagname=" and end with "@END+tagname;".

Reformatted sample :
Code: [Select]
@PROP=
  @NAME=lower@ENDNAME;
  @TYPE=Integer@ENDTYPE;
  @VALU=1@ENDVALU;
  @PRMT=@ENDPRMT;
@ENDPROP;
@PROP=
  @NAME=upper@ENDNAME;
  @TYPE=UnlimitedNatural@ENDTYPE;
  @VALU=1@ENDVALU;
  @PRMT=@ENDPRMT;
@ENDPROP;

In my case it is the property with "@NAME=[highlight]lower[/highlight]@ENDNAME;" who hold the requested "@VALU=[highlight]1[/highlight]@ENDVALU;"



In case you didn't know that before (like me), the ".eap" file can be opened by "Ms Access".
« Last Edit: January 15, 2015, 11:21:44 pm by gervais.b »