...
Export to a Word Document
GenDoc is a tool plugin to Eclipse/Papyrus that enables you to output the model to a Word document. (See installation instructions on how to install for the GenDoc plug-in above.)
Updating the GenDoc Template
- A generic template is Generic GenDoc templates are provided in the ONAP model in the GenDoc folder of the ONAP model you cloned from Gerrit.The . Each template is a Word document itself that contains GenDoc instructions.
- The template commonly used for model output is called "ONAP GenDoc Template.docx".
- You can either open it the template directly in Eclipse by selecting right-clicking the template , or you can open it up directly in Word by finding it in the folder where your model is storedand choosing "Open With", and then the editor you want to use.
- To open the template in Word outside of the Eclipse environment, select "System Editor".
- There are 3 two things in this template that you need to update
- Output file - This will be a Word document where GenDoc will store the output.
- Diagram file - This is the model file where GenDoc will find the diagrams. Its' format is ".notation". The example below is going to output the diagrams in the Common sub-model
- Uml file - This is the model file where GenDoc will find the uml model artifacts. Its' format is ".uml". The example below is going to output all the Uml artifacts in the Common sub-mode
- before exporting the model:
- Find the key "model_name" and fill in the name of the model that you want to export. This needs to be changed whenever you export a different sub-model.
- Ex.<param key='model_name' value='Pnf'/><drop/>
- Find the key "user_path" and fill in the name of the directory of your workspace. This only needs to be changed when opening the model in a new workspace.
- Ex. <param key='user_path' value='D:\eclipse-workspace\ONAP_IM'/><drop/>
- Note: Don't "push" the updated GenDoc template which contains your specific information, unless you are also changing something in the body of the template itself
- Find the key "model_name" and fill in the name of the model that you want to export. This needs to be changed whenever you export a different sub-model.
Running the GenDoc template
- Once you have updated the GenDoc template, right-click on the ONAP GenDoc Template template file and select the option select "Generate documentation using Gendoc"
- The GenDoc utility is invoked and the template is run. Once it has completed, you can find your output in the Output file you specified in the template.
- Note: You do not want to "commit" to Gerrit the updated GenDoc template which contains your specific information.
- By default, the template creates a directory "GenDoc_output" in your workspace, if it doesn't already exist.
- It then creates a Word doc that contains the model name and the current date-time in its name.
To see the newly directory and file, select "File"→"Refresh".
- As an alternative:
- Create
- your own private folder for the Gendoc template by
- selecting "File"→"New"→"Folder". Give the folder a name.
- Then
- select "File
- "→"Import"→"File System" and import the Gendoc template from your "ONAP Information
- Model"/Gendoc directory .
- This imported file is now your own
- private
- copy. You can run the template using the same procedure described above.
Export to an Excel File
Creating tables
Papyrus provides the capability to export fragments of the model to tables.
Creating a table
- In the Model Explorer, rightRight-click on the folder containing the Uml UML artifacts you want to output , (for example , Common → ObjectClasses "Common"→"Root"→"RootObjectClasses") and select the an option under "New Table".
- Papyrus proposes different formats for
- your table
- , such as Class Tree Table, Generic Tree Table,
- as well as a configuration utility to create your own table format.
- For the purposes of this example,
- select "Class Tree Table".
- The table artifact will be stored in your ObjectClasses folder the folder you selected above, using the name you provided when you created the table.
- The "Class Tree Table" will be automatically opened up when it is created and will look like this:
- Now, in the model explorerModel Explorer, select all the classes you which to put in the table and "drag/drop" them into the table.
- Note: Another option to create a table is to first select the
- UML artifacts you wish to output, then right-click and select New Table.
- Select the table contents and right-click and select "Expand all for selection"Now, for Common object classes, the . The table will look something like this:
Putting a table into Excel
- You can then "copy/paste" your table to an Excel spreadsheet, or just keep the table in Papyrus for future reference.