Source links
Currently there are a number of source files needed to get a complete view of the AAI schema information:
- .xsd file in correct version: https://gerrit.onap.org/r/gitweb?p=aai/schema-service.git;a=tree;f=aai-schema/src/main/resources/onap/aai_schema;hb=d4f97e683cb971ceb7107beaaca628926156a4f6
- DB edge rules (.json) in correct version: https://gerrit.onap.org/r/gitweb?p=aai/schema-service.git;a=tree;f=aai-schema/src/main/resources/onap/dbedgerules;hb=3501e74711a2e91ce84d0b4cbc989738f96e0891
- Possibly also traversal information (.json): https://gerrit.onap.org/r/gitweb?p=aai/traversal.git;a=tree;f=aai-traversal/src/main/resources/schema/onap/query;hb=600abffda37ce3aba83024162dc7178d90b84c26
Next step is to combine these source files into a single XML schema file, probably using an XSLT script – this step is still TBD
This single XML schema file can then be imported into Eclipse/Papyrus using the Ecore modeling framework.
Step-by-step to generate UML from XSD file
NOTE: These instructions assume that Eclipse has first been started in Modeling perspective and that Papyrus is installed.
1) From the File menu, create a new general Eclipse project using the project wizard. Only required input is a project name.
2) From the File menu, choose Import... in order to import the .xsd into the project using the import wizard.
2a) Choose import from file system.
2b) Select the From directory first and then the .xsd file. Import into the project folder.
3) In the Model Explorer, open the project. Right-click on the .xsd and create a new EMF Generator Model (select "New" and "Other..." to enter the wizard).
3a)
3b) Select the project folder as the parent folder and choose the XML Schema model importer. "Model URI" should already be filled in with the .xsd file URI.
4) Right-click on the generated model and export the model to UML (select "Export Model...").
4a)
4b) Choose to reference Ecore models rather than export them. (TBD: assumed this will create smaller files, however haven't checked this yet)
5) Right-click on the exported UML model and create a new Papyrus model (select "New" and "Other..." to enter the wizard).
6) Switch to Papyrus perspective. From Model Explorer, create a new class diagram and drag-and-drop the wanted model elements onto it.