Book a Demo

Author Topic: Determineing Connector Source and Target Elements  (Read 3874 times)

Elvior

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Determineing Connector Source and Target Elements
« on: January 22, 2013, 01:29:44 am »
Hello I am using the Java API to create and interface by which Enterprise Architect state machines can be read into a 3rd party tool.

Everything has been quite easy with the exception of ascertaining which elements the connectors are connecting.

I can list all the elements and all the connectors, but I cannot find a way to determine which elements are the sources and targets of which connectors. Any help is appreciated.

Elvior

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Determineing Connector Source and Target Eleme
« Reply #1 on: January 22, 2013, 01:55:30 am »
Well, I have answered my own question finally. I guess taking a break to make this thread sort of helped clear my mind.

For future reference if anyone cares:
Connectors have GetClientID() and GetSupplierID() methods.
Which can then be combined with Repository.GetElementById(int id) to get the required info.

I must say, as a professional Java developer, the SDK for Enterprise Architect, while functional seems to not have been written by anyone who knows much about Java. It does not follow java coding practices and has no JavaDocs or Java API whatsoever.

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Determineing Connector Source and Target Eleme
« Reply #2 on: January 22, 2013, 05:37:43 am »
Quote
I must say, as a professional Java developer, the SDK for Enterprise Architect, while functional seems to not have been written by anyone who knows much about Java. It does not follow java coding practices and has no JavaDocs or Java API whatsoever.

It's simply a COM API wrapper I guess (didn't ever use it with java). For me the programming with C# works well, but making additional abstractions helps a lot.

Best regards,
Günther
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/

Elvior

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Determineing Connector Source and Target Eleme
« Reply #3 on: January 22, 2013, 06:46:19 pm »
I bet it is better in C# unfortunately I have no choice of language for this particular task.

Its just a wrapper mapping Java getter and setter methods to their counterparts in what I guess is native C#(?)

Its just a bit frustrating because the documentation found here does not really match up with the Java version, and the Java methods have no JavaDocs.