Main Menu
Login
SSL SecureMode
Username:
Password:  
Lost Password?
Register now!
ChangeVision Members Map
Search
Forum Index   -   Topic Index
   Astah API
     Read use case description with API

Threaded | Oldest First Previous Topic | Next Topic | Bottom
Poster Thread
bisnard
Posted on: 2010/10/22 21:20
Just popping in
Joined: 2010/9/7
From:
Posts: 8
Re: Read use case description with API
Thanks a lot for your answer. With getType() and a check on the class this is perfect
Cheers
benjamin
Joba
Posted on: 2010/10/22 3:26
Developer
Joined: 2006/6/6
From:
Posts: 969
Re: Read use case description with API
Hi Benjamin,

Let me show an example. So you have this association between Actor0 and UseCase0 as the figure below.










Quote:





























This returns as below:
Quote:




So by letting each association end have a name, you can identify the association ends with getName(). Without having association end names, (getType(), getTypeExpression(), getOwner(), getContainer()) and checking IAssociation from getAssociation() will do.
Quote:
How to check that one end of the IAssociation is a Use case?
See what getType() returns is an IUsecase's instance or not.

Hope it helps.

Cheers,
Satomi
bisnard
Posted on: 2010/10/20 18:57
Just popping in
Joined: 2010/9/7
From:
Posts: 8
Read use case description with API
Hello!

I would like to export all parts of the Use case object using the API. This is ok for taggedValues and for extensions/includes but for the relationships between UC and Actors I could not find a good way
- Is there another way of identifying the ends of an IAssociation (between Actor and UC) than using the IAttribute.getTypeExpression() value for each end of the association? How to check that one end of the IAssociation is a Use case?
Thanks a lot,
Benjamin
Threaded | Oldest First Previous Topic | Next Topic | Top