# astah* API User Guide

March 22, 2012
Change Vision, Inc.

## [What's astah* API]

astah* API is a Java Interface Group for developing applications software using astah* model data.
This document explains how to develop applications using astah* API.

## [Permission to Use]

- Redistribution of astah-api.jar (.jar format file of astah* API) is not allowed.
- By using astah* API, you are agreeing to be bound by the terms of [astah* END-USER LICENSE AGREEMENT].

## [astah* API System Requirements]

In order to run applications created by using astah* API, you need to have the system environments that enable astah* to run.

- Ensure that an appropriate version of Java is installed to run astah*
- astah* software needs to be installed
  - astah-api.jar is required for application compilation
  - Both of astah-api.jar and astah-pro.jar (astah-uml.jar, astah-community.jar) are required for execution of applications
  - Optional JAVA VM memory management setup is needed when the size of your astah* project file is large
    (Example of set up for VM Startup Option as initial heap size 16MB and maximum heap size 256MB)
    -Xms16m -Xmx256m
- Supported astah* API features
  - astah* community supports reference function of astah* API
  - astah* UML, professional support reference, create and edit functions of astah* API

## [How to use astah* API and Samples]

1. How to handle projects
2. How to get Model Information
3. How to create models
4. How to edit models
5. Presentation overview
6. How to obtain presentation information
7. DiagramEditor
8. Creating/Deleting diagrams
9. Creating/Deleting Presentation
10. Editing presentations
11. Transaction operation
12. Programming Language Information for Project
13. Import/Export XMI
14. Add, Update and Delete Reference Project
15. Easy Merge
16. Sample Applications
17. Supported Models

Please refer to astah* API JavaDoc for details.

## [Features]

astah* API enables you to get, create, modify and delete astah* models and use them on applications software.

[Model]

- Referencing of models is available for following diagrams:
  Class Diagram, UseCase Diagram, Statemachine Diagram, Activity Diagram, Sequence Diagram, Flowchart, DataFlow Diagram(DFD), ER Diagram and Requirement Diagram.
- Creating/Modifying/Deleting of models are available for following diagrams:
  Class Diagram, UseCase Diagram, Statemachine Diagram, Composite Structure Diagram, ER Diagram and Requirement Diagram

- | Reference | Create* | Modify* | Delete*
Class Diagram | Yes | Yes | Yes | Yes
UseCase Diagram | Yes | Yes | Yes | Yes
Statemachine Diagram | Yes | Yes | Yes | Yes
Activity Diagram | Yes | N/A | N/A | N/A
Sequence Diagram | Yes | N/A | N/A | N/A
Communication Diagram | Yes | N/A | N/A | N/A
Component Diagram | N/A | N/A | N/A | N/A
Deployment Diagram | N/A | N/A | N/A | N/A
Composite Structure Diagram | Yes | Yes | Yes | Yes
Flowchart | Yes | N/A | N/A | N/A
DataFlow Diagram(DFD) | Yes | N/A | N/A | N/A
ER Diagram | Yes | Yes(professional only) | Yes(professional only) | Yes(professional only)
CRUD | N/A | N/A | N/A | N/A
Mind Map | N/A | N/A | N/A | N/A
Requirement Table | N/A | N/A | N/A | N/A
Requirement Diagram | Yes | Yes(professional only) | Yes(professional only) | Yes(professional only)
Traceability Map | N/A | N/A | N/A | N/A

*astah* UML, professional only.

[Diagram]

- Reference/deleting of diagrams are available for all diagrams
- Creating/Modifying of diagrams are available for following diagrams:
  Class Diagram, UseCase Diagram, Statemachine Diagram, Composite Structure Diagram, ER Diagram, Mind Map and Requirement Diagram

- | Reference | Create* | Modify* | Delete*
Class Diagram | Yes | Yes | Yes | Yes
UseCase Diagram | Yes | Yes | Yes | Yes
Statemachin Diagram | Yes | Yes | Yes | Yes
Activity Diagram | Yes | N/A | N/A | Yes
Sequence Diagram | Yes | N/A | N/A | Yes
Communication Diagram | Yes | N/A | N/A | Yes
Component Diagram | Yes | N/A | N/A | Yes
Deployment Diagram | Yes | N/A | N/A | Yes
Composite Structure Diagram | Yes | Yes | Yes | Yes
Flowchart | Yes | N/A | N/A | Yes(professional only)
Data Flow Diagram(DFD) | Yes | N/A | N/A | Yes(professional only)
ER Diagram | Yes | Yes(professional only) | Yes(professional only) | Yes(professional only)
CRUD | Yes | N/A | N/A | Yes(professional only)
Mind Map | Yes | Yes | Yes | Yes
Requirement Table | N/A | N/A | N/A | N/A
Requirement Diagram | Yes | Yes(professional only) | Yes(professional only) | Yes(professional only)
Traceability Map | N/A | N/A | N/A | N/A

*astah* UML, professional only.

[Presentation]

- Reference of presentations is available for following diagrams:
  Class Diagram, UseCase Diagram, Statemachine Diagram, Activity Diagram, Sequence Diagram, Flowchart, DataFlow Diagram(DFD), ER Diagram, CRUD, Mind Map and Requirement Diagram.
- Creating/Modifying/Deleting of presentations are available for following diagrams:
  Class Diagram, UseCase Diagram, Statemachine Diagram, Composite Structure Diagram, ER Diagram, Mind Map and Requirement Diagram

- | Reference | Create* | Modify* | Delete*
Class Diagram | Yes | Yes | Yes | Yes
UseCase Diagram | Yes | Yes | Yes | Yes
Statemachine Diagram | Yes | Yes | Yes | Yes
Activity Diagram | Yes | N/A | N/A | N/A
Sequence Diagram | Yes | N/A | N/A | N/A
Communication Diagram | Yes | N/A | N/A | N/A
Component Diagram | N/A | N/A | N/A | N/A
Deployment Diagram | N/A | N/A | N/A | N/A
Composite Structure Diagram | Yes | Yes | Yes | Yes
Flowchart | Yes* | N/A | N/A | N/A
Data Flow Diagram(DFD) | Yes* | N/A | N/A | N/A
ER Diagram | Yes* | Yes(professional only) | Yes(professional only) | Yes(professional only)
CRUD | Yes* | N/A | N/A | N/A
Mind Map | Yes* | Yes | Yes | Yes
Requirement Table | N/A | N/A | N/A | N/A
Requirement Diagram | Yes* | Yes(professional only) | Yes(professional only) | Yes(professional only)
Traceability Map | N/A | N/A | N/A | N/A

*astah* UML, professional only.

## [Notes]

- Multi-threading of astah* API is not supported
- When opening a project file by astah* API (ProjectAccessor.open(String projectName)), an error may occur due to the file lock. In this case, please close the project file which may be opened in astah*, and then try reopening it by astah* API. Or, you can specify the method to open a project file in read-only mode. (Set true to allowReadOnly).
  ProjectAccessor.open(String projectName, boolean isIgnoreModelVersion, boolean lockMode, boolean allowReadOnly)

## [Additional information about Model elements]

#### What is the difference between UML metamodel and astah* API?

A part of the class structure of astah* API is different from the one of UML metamodel. astah* API has a simplified structure. Some of abstract model elements in the UML metamodel inheritance structure are eliminated because they would not be instantiated as model elements.

#### Class elements which contain Icon Notations

There are some elements that can be shown as normal class notations such as Actor, Interface, Boundary, Entity, Control, and these are classes that have stereotypes. For example, Actor is a class that has a stereotype of "Actor", and Interface is a class that has a stereotype of "Interface".

#### About TaggedValue(ITaggedValue)

astah* uses TaggedValus for derived information of Attributes and Role names, and expressions about UseCase descriptions.

Copyright(C) 2010 Change Vision, Inc. All rights reserved.