JUDELOGO
JUDE changes to astah*
Product List
System Design Tool - JUDE/Professional
UML Modeling Tool - JUDE/Community
JUDE/Share
Spec Table
System Requirements
Compatibility
Mind Map
JUDE API
XMI Input/Output
JUDE/Server
JUDE API Sample Applications
Change Vision, Inc.
JUDE API
JUDE API enables you to obtain JUDE model elements and use them on applications software. The reference of Mind Maps, model elements used in Class Diagrams, UseCase Diagrams, Activity Diagrams, Sequence Diagrams, Statemachine Diagrams, Flowcharts, ER Diagrams, Data Flow Diagrams are currently supported. We are planning to support more reference of model, view elements used in other Diagrams and also the editing feature for all the model elements and view elements in the future.
* JaveDoc and Sample Applications are equipped with Installer.
* JUDE API Sample Applications
* JUDE API User Guide / Javadoc (Current version: 5.5)

To see past versions of JUDE API Guide / Javadoc, access the URL below directly with the version number you want.
   http://jude.change-vision.com/javadoc/jude-api/Version number/api/ja/doc/index.html
   i.e.) To open JUDE API User Guide / Javadoc for ver 5.4.1
   http://jude.change-vision.com/javadoc/jude-api/5_4_1/api/ja/doc/index.html

How to get a Model of project accessor

All model information in JUDE Project file is stored under the model of project accessor (Project model) in a tree structure. First, get the ProjectAccessor objec and open JUDE project file, then get the Project Model (IModel Class object).
ClassDefinitionBuilder.java
//Open project file and get project model
ProjectAccessor prjAccessor = ProjectAccessorFactory.getProjectAccessor();
prjAccessor.open(inputFile);
IModel iModel = prjAccessor.getProject();

How to get packages under Package recursively

It is defined that Package we call here would include Subsystems and Models that inherit IPackage. You can get all model elements directly under the package (IPackage) in an array by calling getOwnedElements() and get only packages abstracted from them. By doing so, you can get all packages recursively.
ClassDefinitionBuilder.java
/**
* Get packages under Package recursively.
*
* @param iPackage
* Selected Package
* @param iPackages
* The list of all stored packages
* @return The list of all stored packages
*/
private List getPackages(IPackage iPackage, List iPackages) {
INamedElement[] iNamedElements = iPackage.getOwnedElements();
for (int i = 0; i < iNamedElements.length; i++) {
INamedElement iNamedElement = iNamedElements[i];
if (iNamedElement instanceof IPackage) {
iPackages.add(iNamedElement);
getPackages((IPackage)iNamedElement, iPackages);
}
}
return iPackages;
}

How to get Full Path Name of class

You can get the name of class by calling getName() in case they are subclasses of INamedElement (i.g. IClass). In addition, by calling getOwner() that obtains the owned model elements, you can get the Full Path name from the project model.
ClassDefinitionBuilder.java
/**
* Get the class name with Full Path
*
* @param iClass
* Class
* @return Class name iFull Pathj
*/
private String getFullName(IClass iClass) {
StringBuffer sb = new StringBuffer();
IElement owner = iClass.getOwner();
while (owner != null && owner instanceof INamedElement && owner.getOwner() != null) {
sb.insert(0, ((INamedElement) owner).getName() + "::");
owner = owner.getOwner();
}
sb.append(iClass.getName());
return sb.toString();
}

About us    ChangeVision Members Agreement   Copyright(C) 2006-2010 Change Vision, Inc. All rights reserved.