The API provides a number of functions that enable you to add or modify Rhapsody properties. With these you can change how Rational Rhapsody operates. The Graphical properties control graphical elements in model diagrams. Accessing and Editing model properties using the Rhapsody API Graphical properties define the attributes of graphical elements in model diagrams. They are hidden from view (they do not appear in the user interface), but can be accessed using the getGraphicalProperty and setGraphicalProperty API methods. Diagram graphic elements consist of just three types: RPGraphNode, RPGraphEdge and RPGraphElement. These can be retrieved from diagrams in the form of a collection using the getGraphicalElements() method. Not all graphic elements can be matched to a UML model element. For example, Notes and Swimlane Frames do not represent a model element in the browser. These orphan graphic elements can contain null pointers so you must be careful when processing their properties. In the example below, you can see how a try...catch statement can be used to handle graphic elements with and without a matching model element. Example : IRPApplication app = RhapsodyAppServer.getActiveRhapsodyApplication(); IRPModelElement el = app.getSelectedElement(); if (el instanceof IRPDiagram) { IRPDiagram diagram = (IRPDiagram)el; System.out.println(diagram.getMetaClass()); List<IRPGraphElement> diagramElements = diagram.getGraphicalElements().toList(); for (IRPGraphElement graphElement : diagramElements) { List<IRPGraphicalProperty> graphicalPropeties = null; try { /// in case the diagram graphic has no corresponding model element System.out.println(graphElement.getModelObject().getMetaClass()); System.out.println("=========="); graphicalPropeties = graphElement.getAllGraphicalProperties().toList(); for (IRPGraphicalProperty graphProp : graphicalPropeties) { System.out.println(graphProp.getKey() + "\\t" + graphProp.getValue()); } } catch (Exception e) { // diagram graphic has no corresponding model element. // graphic element may contain a "Type" graphical property System.out.println("<Unknown> Model Element"); System.out.println("======================="); IRPCollection gps = graphElement.getAllGraphicalProperties(); for (int i=0; i < gps.getCount(); i++) { IRPGraphicalProperty gp = (IRPGraphicalProperty) gps.getItem(i); if (gp != null) // Null graphical properties may exist System.out.println(gp.getKey() + "\\t" + gp.getValue()); }
Document titled Rational Rhapsody Frameworks and Operating Systems Reference is about Software and s/w Development.
How do you edit Graphical Properties with the IBM Rational Rhapsody application programming interface (API)?
The User Manual explains how to use Rhapsody Gateway on your projects. properties onto those. In Rhapsody Gateway, the reference can be defined either in a.
Rhapsody Error 0. December 2, 2014. – Rhapsody is a woman. Basic Concepts 2 Properties Reference Manual Rhapsody Properties Properties are user-defined.
Rhapsody Properties Reference Manual IBM APOS A Constructivist Theory of Learning in Undergraduate PROGRAM NOTES George Gershwin Concerto in F for Piano and.
Rhapsody Properties Reference Manual IBM Basic Concepts 2 Properties Reference Manual Rhapsody are user defined tagged values that can be attached to any modeling element.
This document contains a collection of product documentation links for IBM Rational Rhapsody prior to the creation of its information center.
20 API Reference Manual Handling Properties Using the API Rhapsody model elements can have name/value pairs. 26 API Reference Manual Rational Rhapsody API Examples.
How to edit Model / Graphical Properties with the Rational Rhapsody API