...
To traverse through a UML model, the primary project must be identified. The model data starts at revision level. Issuing GET to /revisions/{revisionId} shows the first-level object in the revision. UUIDs of the first-level object are listed in rootObjectIDs.
| Code Block | ||
|---|---|---|
| ||
{
"commitType": "NORMAL",
"branchID": "../..",
"resourceID": "../../..",
"@base": "http://127.0.0.1:8111/osmc/resources/4615e8fa-81e5-40e0-a51b-8496a48caf18/revisions/5/elements",
"author": "Administrator",
"@type":
[
"RDFSource",
"kerml:Revision"
],
"pickedRevision": -1,
"description": "Branch \"xx\" created",
"@context": "http://127.0.0.1:8111/osmc/schemas/revision",
"directParent": 3,
"dependencies": [],
"rootObjectIDs":
[
"429f969a-5c81-45f4-94af-8cf983f22950",
"ec6060a3-f3d9-482b-93a3-32af9e19202c",
"ca9a0235-f0f7-46b7-a142-e79a67c2d00d",
"f7c3ae92-af44-4dab-8163-a199ca05c006",
"ba3d0700-1062-4baf-a1df-a55a4f31ce54",
"0f14cd2d-2fd0-4523-950c-627d59e1a43d",
"7cd22dea-aaf8-4e08-bd67-5bd975c3f06a",
"af1042fa-8b1b-4cf2-bb7d-98dd1b881da3",
"6d24e5e7-cdff-4e9e-85b8-28b3088f85b6",
"243020e5-da6c-4896-b32a-fcba0e93ac8d",
"f7449238-5cd1-41eb-9025-040210b02d93",
"4d2459a1-49dc-4eb7-aa82-9bbb4a76b038",
"b242613d-957e-4aec-9333-e5938f50b2ab",
"9b953064-e422-4391-b7d9-43a2d4f14a32",
"fc997cfd-23c5-4d0b-9953-06667dcde0dd",
"29d9416b-ead5-4a9d-b530-b23de836f1b8",
"7af3f24b-2da9-4b31-94b3-a87f15747296"
],
"createdDate": "1533051367",
"ID": "",
"artifacts": "artifacts"
}, |
...
Specified from the elementId in /resources/{resourceId}/elements/{elementId}, this . This form is used in most cases, except from creating the first element in the project. The new element data type will be in the same namespace of this specified element.
Code Block language text { "@type": "uml:Class", "kerml:nsURI": "http://www.nomagic.com/magicdraw/UML/2.5.1", "kerml:esiData": { "owningPackage": { "@id": "757be712-f397-404d-a5ff-b97567eb240f" }, "name": "c3" } }- Specified from kerml:nsURI.
Specifying the whole Ecore in kerml:ecore. This mode is rarely used.
Code Block language text { "@type": "ikml:Container", "kerml:esiData": { "name": "txdhdhdhd", "uri": "http://www.chula.ac.th", }, "kerml:ecore": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ecore:EPackage xmi:version=\"2.0\" xmlns:xmi=\"http://www.omg.org/XMI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n xmlns:ecore=\"http://www.eclipse.org/emf/2002/Ecore\" name=\"ikml\" nsURI=\"http://www.nomagic.com/ikml/1.0\" nsPrefix=\"ikml\">\r\n <eClassifiers xsi:type=\"ecore:EClass\" name=\"Element\" abstract=\"true\"><\/eClassifiers>\r\n<\/ecore:EPackage>\r\n" }
...