From 4ec3a8f8f0edccae0c9357f10939b0b74abea753 Mon Sep 17 00:00:00 2001 From: Jim Amsden Date: Tue, 2 Apr 2024 11:13:24 -0400 Subject: [PATCH] Changes required to publish PSD01 Includes oslc_am inherited oslc:properties in the sysml-shapes.ttl. --- specs/sysml/Resources/getclasses.ipynb | 55 +- specs/sysml/sysml-shapes.html | 13 +- specs/sysml/sysml-shapes.ttl | 5468 +++++++++++++++++++----- specs/sysml/sysml-spec.html | 13 +- specs/sysml/sysml-vocab.html | 5 +- specs/sysml/sysml-vocab.ttl | 18 +- 6 files changed, 4540 insertions(+), 1032 deletions(-) diff --git a/specs/sysml/Resources/getclasses.ipynb b/specs/sysml/Resources/getclasses.ipynb index 9a5dbb3..cbf1707 100644 --- a/specs/sysml/Resources/getclasses.ipynb +++ b/specs/sysml/Resources/getclasses.ipynb @@ -17,7 +17,7 @@ { "data": { "text/plain": [ - ")>" + ")>" ] }, "execution_count": 1, @@ -151,6 +151,59 @@ "g.serialize(destination='../sysml-vocab.ttl')" ] }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + ")>" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Add the ResourceShape Properties that should be inherited from oslc_am\n", + "\n", + "sysml_shapes = Namespace(\"http://open-services.net/ns/sysml/shapes/2.0/#\")\n", + "\n", + "g = Graph()\n", + "g.parse('../sysml-shapes.ttl')\n", + "\n", + "# get a list of the classes\n", + "shapes = g.subjects(rdf.type, oslc.ResourceShape)\n", + "\n", + "# and now create the shapeToSpec div for each class\n", + "for c in shapes:\n", + " g.add((c, oslc.property, sysml_shapes.type))\n", + " g.add((c, oslc.property, sysml_shapes.dctype))\n", + " g.add((c, oslc.property, sysml_shapes.identifier))\n", + " g.add((c, oslc.property, sysml_shapes.title))\n", + " g.add((c, oslc.property, sysml_shapes.shortTitle))\n", + " g.add((c, oslc.property, sysml_shapes.description))\n", + " g.add((c, oslc.property, sysml_shapes.source))\n", + " g.add((c, oslc.property, sysml_shapes.creator))\n", + " g.add((c, oslc.property, sysml_shapes.created))\n", + " g.add((c, oslc.property, sysml_shapes.contributor))\n", + " g.add((c, oslc.property, sysml_shapes.modified))\n", + " g.add((c, oslc.property, sysml_shapes.serviceProvider))\n", + " g.add((c, oslc.property, sysml_shapes.instanceShape))\n", + " g.add((c, oslc.property, sysml_shapes.derives))\n", + " g.add((c, oslc.property, sysml_shapes.elaborates))\n", + " g.add((c, oslc.property, sysml_shapes.refine))\n", + " g.add((c, oslc.property, sysml_shapes.external))\n", + " g.add((c, oslc.property, sysml_shapes.satisfy))\n", + " g.add((c, oslc.property, sysml_shapes.trace))\n", + "\n", + "\n", + "g.serialize(destination='../sysml-shapes2.ttl')" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/specs/sysml/sysml-shapes.html b/specs/sysml/sysml-shapes.html index fd5a020..9730ed1 100644 --- a/specs/sysml/sysml-shapes.html +++ b/specs/sysml/sysml-shapes.html @@ -14,11 +14,11 @@ class="remove" >