Home

User Manual for Oclarity/XMI

image

Contents

1. ET framework uter you can If the N your comp website http www microsoft ndows XP or higher Microsoft NET framework version 4 0 Client Profile ET framework 4 or 0 4 0 Client Profile is not installed on download and install it from Microsoft s com download en details aspx id 24872 You should choose the appropriate language The install Due to the large variety in XMI ation requires administrator privileges formats Oclarity only sup E ports XMI files may increase in the futur would like to use an XMI format Oclarity probability that we will iles from selected tools The list of supported Please let us know if you that is not yet supported by The more votes a UML tool gets the higher is the add support for the tools XMI format Currently Oclarity supports XMI formats from these tools TOOL XMI Version Enterprise Architect 7 5 2l BO Del MagicDraw 15 0 16 9 17 0 2 1 File Export to UML XMI UML 2 5 Beta 1 Metamodel 2 2 Installation Load the current version of Oc arity from our website using this link http empowertec de assets Upl oads Oclarity OclaritySetup exe Th xecute the fil n If desired the suggested desti changed The installation requi nation directory can be res administrator privileges
2. 4 3 Removing an XMI file from a project E Removing an XMI file from the project does not delete the ac tual file it just removes the file from the project Make sure that the Project Explorer view is active Right click on the XMI file that you want to remove A context menu appears Select the remove entry You will be asked for a confirmation Oclarity Page 12 EmPowerTec After the XMI file has been removed you should reload the pro ject Oclarity asks you to reload the project automatically 4 4 Adding an existing OCL file to a project Make sure that the Project tab of the ribbon control is ac tivated either by clicking on its handle or by activating and clicking in the Project Explorer view To add an existing OCL file the Project tab of the Ribbon must be activated Then click on the button labeled Add OCL file A dialog appears that lets you choose an OCL file 4 5 Adding a new OCL file Make sure that the Project tab of the ribbon control is ac tivated either by clicking on its handle or by activating and clicking in the Project Explorer view To add a new OCL file the Project tab of the Ribbon must be activated Then click on the button labeled New OCL file A dialog will appear that lets you choose a directory and filename for the new OCL file 4 6 Removing an OCL file from
3. EmPowerTec User Manual Oclarity Version 2 5 EmPowerTec Copyright Notice O 2004 2013 EmPowerTec AG Taubenweg 20 85238 Petershausen Germany All rights reserved This product and related documentation are protected by copyright and are distributed under licenses restricting their use copying distribution and decompilation No part of this product or related documenta tion may be reproduced in any form by any means without prior written authorization of EmPowerTec AG and its licensors 1f any Third Party Website Reference EmPowerTec AG is not responsible for the availability of third party Web sites mentioned in this document EmPowerTec AG does not endorse and is not responsible or liable for any content advertising products or other material on or avail able from such sites or resources EmPowerTec AG will not be responsible or liable for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content goods or services that are available on or through any such sites or resources Trademarks EmPowerTec is a trademark of EmPowerTec AG Other brands and their products are trademarks of their re spective holders and should be noted as such Oclarity Page 2 EmPowerTec Ll AREEOAUCE TO teed cle dae ii o A A Suid
4. A A 4 2 Tnstal lato ictericia ote ele da 5 2L RequirementS ir csc cinssos se ae wee aca eee oe a wee es 5 Zee Installation aia neds 5 243 Updates oiiie dein ad da wie RUSE SS AERO HEN A ES a 6 2 4 Uninstalling ss sviacea cd cada sorna 6 205 Printing this Manual os icrs ek edaed cca saree ed as 6 200 Type MAPPINGS vans ee ee se eee de Rew Hed Qe Gad ew eee Ee sale He ws 6 2al Examples scernu b6iad whew e ad ia eas 7 3 iGUL Basis soi 4 ae wee AS A Re ID a 8 Sidi OVERVIEWS ia baat decd A is tbe dete Jd a E AE 8 3 2 Arranging Screen elementS o oco ooococoonononoononon 10 3 3 The Quick Access Toolbar ad dened amp 11 4 Understanding Oclarity projects eee ee ee ee ee ee ee 12 4 1 Creating a new project eee ce ee ee eee 12 4 2 Adding an XMI file to a project eee ee ee ee eee 12 4 3 Removing an XMI file from a project 12 4 4 Adding an existing OCL file to a project 13 4 5 Adding a new OCL Ellen soere e edra a 13 4 6 Removing an OCL file from a project 13 4 7 Organizing Your Projects s ee aenk wees a eee we EDA 13 5 Using the OGL edito er ee Pek ea ee Sees ale 14 Sad DWE OAUC TOT ess ws sites areas eh ah aes eee Ge Sie oe Se Gi arene magne 14 542 Editing OCL LTS ista secede ne aoe wh eal a e E ww 14 5 3 Error highlighting mece a ee ee eee ee a a 14 544 Pntellisense mt ea hoe ee ee Sle ee ate 15 5 4 1 Complete WO esaea aeaa e se ob Borin ln eh ae igs Bi t
5. Oclarity Page 5 EmPowerTec 2 3 Updates To install a new version simply download it from our website uninstall the old version and install the new version as de scribed in chapter 2 2 2 4 Uninstalling To uninstall this software you may simply choose the according menu entry in the start menu Alternatively you Can use the Windows control panel to remove the software 2 5 Printing this manual If you print the manual with Adobe Acrobat Reader with default print settings the pages are smaller than intended becaus Acrobat Reader scales the pages To get a printout in original size please uncheck all the scaling options in the Copies and Adjustments section of the Acrobat Reader print dialog box 2 6 Type mappings Often some type used in the model has the same semantics as an OCL builtin type but is syntactically different For example int could be treated like Integer However Oclarity does not know about this equivalence and thus treats int as un known type In such a case a type mapping may be used A type mapping is a pair of strings where the first string is the name of the type in the model and the second string is the name of the OCL builtin type Such a type mapping is created by adding an according entry to Oclaritys configuration file After installation this file is called oclarity etcfg This file is passed as parameter to the main program EmPowerTec
6. While editing an OCL file you can click on the Check file button in the Edit tab of the Ribbon to check the current OCL file 6 2 Checking all files in the project At any time you can click on the Check all files button in the Project tab to check all files defined in the project The Output tab of the Output window will display the status of the check and a short summary Output q Output Check results Checking ChapterDependency ocl 0 error s O message s Checking Appendix ocl 0 error s 0 message s Checking Bookpart ocl 0 error s 0 message s hd 6 File s checked O error s O message s Figure 7 Output tab after OCL check If errors have been detected during the check they are dis played in a list in the Check results tab Output A Output Check results File Error number Line number Column Error message a Tice ar mg ETE ae A rd AT ne ME Prependix ocl ocl_err_unknown 10 9 Unknown type Prependix in method definition v gt Unknown tvoe Prependix in method definition E ndix 0 Q i NKNOWN 9 Figure 8 Check results tab after an OCL check A Double click on an entry on this list positions the cursor on the offending token so you can immediately correct it 6 3 Package handling 6 3 1 Package names with spaces Most UML tools allow package names with spaces but this is not sup
7. Application Shell Here are some sample entries lt ApplicationPlugin name Oclarity assembly EmPowerTec Ocl Oclarity dll class EmPowerTec 0el Oclarity Oclarityelugin gt lt Option name typemapping value int Integer gt lt Option name typemapping value Int Integer gt lt Option name typemapping value string String gt lt Option name typemapping value boolean Boolean gt lt Option name typemapping value double Real gt lt ApplicationPlugin gt E In the default installation this file is found here C Program Files EmPowerTec AG Oclarity oclarity etcfg Oclarity Page 6 EmPowerTec 2 7 Examples The Oclarity distribution comes with various example projects The related project files are stored in the subfolder Exam ples of the Oclarity installation directory Oclarity Page 7 EmPowerTec 3 GUI Basics 3 1 Overview Oclarity uses the concept of the Ribbon control that was in troduced by Microsoft with their Office 2007 product line The idea of the Ribbon control is to organize related func tionality in dedicated Ribbon tabs and to selectively acti vate the Ribbon tab that is relevant to the current context Oclarity has two ribbon tabs The Project Ribbon tab is used to modify an Oclarity project see below for an introduction to the concept o
8. mouse cursor above a highlighted code fragment the error message is displayed in a tooltip fa The original file contained multiple uses of self membership which is wrong because the implicit rolename for association class membership must be lovercase This vas corrected in the whole file Andreas Avenius package RandL context LoyaltyProgram getServices Set Service body partners deliveredServices gt asSet context LoyaltyProgram getServices pp ProgramPartner Set Service body if partners gt includel pp then pp deliveredServices else Set Type Set ProgramPartner does not support a matching method for signature nclude in ProgramPart endif context LoyaltyProgram Figure 5 error highlighting in the OCL editor In the example above the method should be includes instead of include Oclarity Page 14 EmPowerTec 5 4 Intellisense Oclarity supports some advanced editing features e Complete Word e List Members e Parameter Info Please note that for technical reasons the Intellisens Features do not support the complete OCL language but just the most important requirements 5 4 1 Complete Word If you type ctrl j ctrl key and j key at the same time th OCL Editor will try to make an appropriate suggestion The suggestions are dependent of the context This feature can be used as part of an identifier or it can be u
9. upper border if the mouse button would be released On Odarity C Program Files EmPowerTecA ts Oclarity Examples Book BookModelodarity x Cut O Chapter ocl package Book C ChapterDependency ocl O Period acl context Period a Prependix ocl def getNrOfNonworkingDays Integer nrOfDays nrOfWor Epas Phrase Book E Ready Line 1 Column 1 C Figure 2 Arranging GUI elements Oclarity Page 10 EmPowerTec In a similar way multiple editing windows can be created For example in the following screenshot two editing windows are used e Oclarity C Program Files EmPowerTec AG pro ducts Oclarity Examples Book BookModel odarity 5 X Project Edit 9 DOHA LS am Cut copy Paste Save Saveall Es Search Replace Undo Redo _ Clipboard File Search _Undolredo _ Navigation E Prependix ocl Bookpart ocl Chapter ocl ChapterDependency ocl Period ocl dbx Project files E 5 l XMI files This file contains OCL expressions regarding Book Prependix Ey book xmi a CJ oct files File generated by Octopus on Thu Nov 27 18 25 36 GMT 01 00 2003 O Appendix ocl 2 Bookpart ocl a Chapter ocl C ChapterDependency ocl package Book O Period ocl O Prependix ocl context Prependix isFirstBookpart Boolean body prevPrep gt isEmpty H Appendix ocl dbx 1 This file contains OCL expressions regarding Book App
10. Set lt Service gt Thus your class definitions remain compatible with common pro gramming languages If you are modeling a PIM and thus remain independent from a concrete programming language we recommend using the standard OCL syntax Typel Type2 e g Set Service Oclarity Page 18 EmPowerTec The alternative spelling using lt and gt can be used any where in particular for operation return types and operation parameter types In the OCL code however the syntax must be used always as de fined by the OCL grammar Set Service Oclarity Page 19
11. a project Removing an OCL file from the project does not delete the ac tual file it just removes the file from the project Make sure that the Project Explorer view is active Right click on the OCL file that you want to remove A context menu appears Select the remove entry You will be asked for a confirmation 4 7 Organizing your projects Also this is technically not necessary we recommend putting a project file along with its OCL and XMI files in the same di rectory This way it is easy to move a project on disk just by copying the whole directory You may use subdirectories but the folder hierarchy is not reflected in the Project Explorer Oclarity Page 13 EmPowerTec 5 Using the OCL editor 5 1 Introduction The OCL code editor offers powerful features for editing OCL code This chapter introduces the various features You can activate the editor either by clicking on an edit win dow or by double clicking on an OCL file in the Project Ex plorer view 5 2 Editing OCL files The Edit tab of the Ribbon provides the standard editing functionality The button Check file in the File group can be clicked to check the OCL file that is currently edited 5 3 Error highlighting The editor highlights errors as you type After a delay in typing of 1 second the code is checked and any errors are highlighted If you move the
12. ee d ib betes 15 5 4 2 DUS MEMES ad aden tee Sesh wey Sk Re See ee 15 5 4 3 Parameter LOTO esa oe be ee eee abe See Hae Ee sie eee 16 6 Checking OCL 1168 Vi enaa eee ee eda eS eee Ge ES 17 641 Single file CHECK sio seco esse we eee wee bree Wee ah ot ds ares esha ae 17 6 2 Checking all files in the project 17 6 3 Package Handling sss ance wos as a a ee E hi Sees ee a 17 625 1 Package names with spaceS ee eee eee eee 17 OA Statistics 18 6 5 INStantiated PVPS ena alee ee ell ee Wh aw a eS ee Sr we a E 18 Oclarity Page 3 EmPowerTec 1 Introduction OCL is a formal language intended to phrase expressions in ob ject models in particular in UML models The purpose of OCL is to add precision to a model and complement the better known UML diagrams and use Cases If used properly adding OCL ex pressions to a UML model can significantly increase the preci sion and ultimately the value of a UML model Furthermore the communication between the persons working on a software pro ject is improved because all business logic described with OCL is available for all contributors to your project at any time OCL expressions Can be used with varying intentions Best known is the use as constraints Constraints state condi tions that must be true in certain points of time Other applications of OCL expressions are initialization ex pres
13. endix File generated by Octopus on Thu Nov 27 18 26 01 GMT 01 00 2003 E package Book ft Wrong original code misses the attribute type in the context specification cantextinnendiy tn Co Bo z El AIII Output a Output Y Check results Fie Error number Line number Column Error message 3 J Ready Line 8 Column 13 _ Figure 3 multiple editing window 3 3 The Quick Access Toolbar At the right side of the Application button there is a small handle that can be used to access the Ribbons Quick Access Toolbar QAT Most interfac lement on a Ribbon tab can be added to the QAT To add or remove command to or from the QAT click on the small handle at the right side of the QAT and click on the menu en try Customize Quick Access Toolbar 2 Project a i EME Place Quick Access Toolbar below the Ribbon e Oclarity C Program Files EmPowerTec AG common OclarityProject Lodarity TER Add XMI file Minimize the Ribbon Project 1 OCL check Figure 4 Modifying the Quick Access Toolbar Oclarity Page 11 EmPowerTec 4 Understanding Oclarity projects Oclarity reads a UML model from one or more XMI file s All OCL expressions are validated against the model defined in these XMI files OCL expressions are stored in text files An Oclarity project groups a single XMI file and a set o
14. f OCL files together Such a project is stored as text file on your computer You can create as many different projects as you like The Oclarity project file the XMI files and the OCL files re main distinct files 4 1 Creating a new project Use the application menus entry New project to create a new project Oclarity will give the project a default name You can use the application menus entry Save project as to save the project under another name and or directory 4 2 Adding an XMI file to a project Before OCL files can be checked one or more XMI files have to be added to the project To add an XMI file the Project tab of the Ribbon must be activated Then click on the button labeled Add XMI file A dialog appears that lets you choose a XMI file After the XMI file has been added you can inspect the Model Explorer view to see Oclarities view of the model defined in the XMI file Multiple XMI files can be added to a project It should be noted that Oclarity does not handle all elements contained in an XMI file This may lead to errors or warnings in the output window In addition the model could have inconsistencies which lead to inconsistencies in the XMI file In general Oclarity tries to extract as much information as possible from the model and just reports errors or inconsist encies
15. f an Oclarity project The Edit Ribbon tab is used to support editing OCL files Oclarity tries to activate the appropriate tab whenever the user clicks on a given element It is also possible to acti vate an inactive Ribbon tab by clicking on its handle The Ribbon tab is located at the top of the main window like a traditional menu Oclarity Page 8 EmPowerTec Project tab Appplicatio Edit tab menu inactive Oclarity C Program Files EmPowerTec AG products Oclarity Examples Book BookModel odarity roda Es AA Add XMI file New OCL file Add OCL file Check all files Project OCL check Navigation il Prependix ocl Appendix ocl Bookpart ocl Chapter ocl ChapterDependency ocl Period ocl Project files pe El XMI files B book xmi SiC oc files A Appendix ocl 3 Bookpart ocl 3 Chapter ocl a ChapterDependency ocl O Period ocl a Prependix ocl This file contains OCL expressions regarding Book Period File generated by Octopus on Thu Nov 27 18 26 17 GMT 01 00 2003 iz package Book context Period def getNrOfNonworkingDays Integer nrOfDays nrOfWorkingDays endpackage Book Figure 1 GUI overview The left side of the main window the Navigation window contains a set of views that can be used to manipulate and view various aspects of the projects e The
16. files that are part of the project e The packages and classes of the model if at least one XMI file has been added to the project e An overview of the OCL expressions grouped according to their context and expression type requires a prior check of at least one OCL file Only one of these views is active at a given time Click ona views tab to activate the view The lower right area of the main window contains the output window This window contains two tabs Oclarity Page 9 EmPowerTec e The Output tab contains information about the progress and status of an OCL check or other relevant messages e g errors or warnings during the loading of an XMI file e The Check result tab contains a tabular list of error which can be used to easily locate the error in the re lated OCL file If no errors have occurred during a check the error list in this tab is empty The rest of the main window is used as editing area for OCL files 3 2 Arranging Screen elements The Navigation area and the Output area can be attached to an arbitrary side of the main window by clicking in their ti tle bar and dragging the area to the desired position A visual indicator appears that signals where the area will be placed The following screenshot shows the Navigation area docked at the right border The Output area is currently moved and would be docked at the
17. ported by the OCL grammar As a workaround the spaces have to be escaped preceded by a backslash character in the OCL code For example if you want to reference a type named Customer in the package Logical View Business Objects the OCL code must use Business Objects Customer It is not possible to mix underscores and spaces in package names Our recommendation is not to use package names with spaces in your Rational Rose models Oclarity Page 17 EmPowerTec 6 4 States In this version of Oclarity state machines are not suported oclInState cannot check for valid states 6 5 Instantiated types An instantiated type is a type that is not used on its own but only in combination with another type This concept is called templates in C or generics in Java and C For example a container class Set may not be used on its own but only as container for specific contained elements e g instances of class Service In OCL the syntax to express such an instantiation is Typel Type2 e g Set Service Since this syntax deviates from the syntax of some widely used programming languages we decided to allow both notations in terchangeably This means if you are modeling a PSM Platform Specific Mod el and thus use concrete types from your target language this syntax can be used Typel lt Type2 gt e g
18. sed when th dit ing cursor is not directly placed after an identifier 5 4 2 List members When a dot character or an arrow gt is typed the OCL Editor tries to make an appropriate suggestion This usu ally means displaying a list of attributes associations or methods When two colons are typed the OCL Editor tries to sug gest sub packages static member or enumeration values package RandL context LoyaltyProgram getServices Set Service body partners deliveredServices gt asSet context LoyaltyProgram getServices pp ProgramPartner Set Service body if partners gt includes pp then pp heliveredServices endif 5 deliveredServices context LoyaltyP 7 getBurningTransactions def getServic 2 name levels gt sele 2 numberOfCustomers E oclasType context LoyaltyP f oclinstate inv knownServie tring Set Service availableServices gt asSet desAll merbership currentLevel Figure 6 Member completion 1 For technical reasons the support of these features is limited to some standard constructs Oclarity Page 15 EmPowerTec 5 4 3 Parameter Info If possible the OCL Editor tries to display the signature of a method that is used and also tries to highlight the current parameter Oclarity Page 16 EmPowerTec 6 Checking OCL files 6 1 Single file check
19. sions for attributes and associations derivation rules for additional auxiliary attributes and methods and the lan guage independent description of method implementations OCL is language independent and thus helps you to specify more knowledge at the abstract level of the UML model than without using OCL Instead of burying the business logic in complex programming language statements in software implementation files it is stored at the heart of your software system in your UML models It is beyond the scope of this document to provide an intro duction to OCL On our website http www empowertec de you can find links to OCL resources Most UML modeling tools do not provide significant support for OCL Oclarity adds comprehensive support for adding OCL ex pressions to a UML model e Syntax highlighting editor e Full syntactic and semantic checking of OCL expressions ensures consistency with the model e Capability to check all OCL expressions in a model at once This is particularly useful if properties of a model are changed e g class or attribute names meth od signatures and so on e Supports multiple modeling tools via XMI import e Tree like view of the underlying model and the OCL ex pressions Oclarity Page 4 EmPowerTec 2 Installation Ze Requirements Oclarity requires e Microsoft Wi the full NI

Download Pdf Manuals

image

Related Search

Related Contents

  PDF Manual  Manual Técnico - Federación Atlética de Chile  Samsung GT-N7000 Uporabniški priročnik(Ice Cream Sandwich)  ToneBug  Fujitsu STYLISTIC Q584 128GB 3G White  ARC Aurem User Manual  CS—4—Pi - Maison de la détection  MOTORCYCLE QUICK START  Printer Installation Guide  

Copyright © All rights reserved.
DMCA: DMCA_mwitty#outlook.com.