Skip to content

Commit

Permalink
docs: basic sequence & class diagram for sdk
Browse files Browse the repository at this point in the history
docs: added query service
  • Loading branch information
wouteraj authored and lem-onade committed Feb 11, 2021
1 parent a876f92 commit 7ec8af2
Show file tree
Hide file tree
Showing 2 changed files with 296 additions and 0 deletions.
153 changes: 153 additions & 0 deletions packages/semcom-core/docs/modules/sdk/images/class-diagram.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<mxfile host="65bd71144e" modified="2021-02-04T15:07:21.906Z" agent="5.0 (Macintosh; Intel Mac OS X 11_0_0) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.52.1 Chrome/83.0.4103.122 Electron/9.3.5 Safari/537.36" etag="IrW3DVwoXiVU43bqekQc" version="13.10.0" type="embed">
<diagram id="BmUuakXQ_GV8tHtZ7MqW" name="Page-1">
<mxGraphModel dx="1669" dy="613" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="11" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center&quot;&gt;&lt;i&gt;&amp;lt;&amp;lt;Interface&amp;gt;&amp;gt;&lt;/i&gt;&lt;br&gt;&lt;b&gt;SemComMetadata&lt;/b&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ uri: string&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ label: string&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ author: string&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ inputs: SemComIdentifier&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ version: string&lt;br&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ latest: boolean&lt;br&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;&lt;br&gt;&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="1" vertex="1">
<mxGeometry x="10" y="240" width="270" height="160" as="geometry"/>
</mxCell>
<mxCell id="12" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center&quot;&gt;&lt;i&gt;&amp;lt;&amp;lt;Class&amp;gt;&amp;gt;&lt;/i&gt;&lt;br&gt;&lt;b&gt;SemComService&lt;/b&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;- queryService: SemComQueryService&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&amp;nbsp;+ constructor(queryService: SemComQueryService)&lt;br&gt;&amp;nbsp;+ query(filter: Partial&amp;lt;SemComMetadata&amp;gt;): Promise&amp;lt;SemComMetadata[]&amp;gt;&lt;br&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ register&amp;lt;T extends SemCom&amp;gt;(metadata: SemComMetadata): Promise&amp;lt;T&amp;gt;&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;&lt;br&gt;&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="1" vertex="1">
<mxGeometry x="640" y="380" width="320" height="140" as="geometry"/>
</mxCell>
<mxCell id="14" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center&quot;&gt;&lt;i&gt;&amp;lt;&amp;lt;Interface&amp;gt;&amp;gt;&lt;/i&gt;&lt;br&gt;&lt;b&gt;SemCom&lt;/b&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ metadata: SemComMetadata&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ render&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="1" vertex="1">
<mxGeometry x="10" y="440" width="270" height="140" as="geometry"/>
</mxCell>
<mxCell id="15" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" source="14" target="11" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="330" y="350" as="sourcePoint"/>
<mxPoint x="490" y="350" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="16" value="0..*" style="edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;" parent="15" connectable="0" vertex="1">
<mxGeometry x="-1" relative="1" as="geometry"/>
</mxCell>
<mxCell id="17" value="1..1" style="edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;" parent="15" connectable="0" vertex="1">
<mxGeometry x="1" relative="1" as="geometry">
<mxPoint y="20" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="20" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center&quot;&gt;&lt;i&gt;&amp;lt;&amp;lt;Interface&amp;gt;&amp;gt;&lt;/i&gt;&lt;br&gt;&lt;b&gt;SemComIdentifier&lt;/b&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ uri: string&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;&lt;br&gt;&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="1" vertex="1">
<mxGeometry x="-800" y="250" width="270" height="140" as="geometry"/>
</mxCell>
<mxCell id="22" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center&quot;&gt;&lt;i&gt;&amp;lt;&amp;lt;Interface&amp;gt;&amp;gt;&lt;/i&gt;&lt;br&gt;&lt;b&gt;SemanticComponentShape&lt;/b&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ uri: string&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;&lt;br&gt;&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="1" vertex="1">
<mxGeometry x="-800" y="440" width="270" height="140" as="geometry"/>
</mxCell>
<mxCell id="23" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center&quot;&gt;&lt;i&gt;&amp;lt;&amp;lt;Interface&amp;gt;&amp;gt;&lt;/i&gt;&lt;br&gt;&lt;b&gt;SemanticComponentShapeTree&lt;/b&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ uri: string&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;&lt;br&gt;&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="1" vertex="1">
<mxGeometry x="-800" y="600" width="270" height="140" as="geometry"/>
</mxCell>
<mxCell id="24" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center&quot;&gt;&lt;i&gt;&amp;lt;&amp;lt;Interface&amp;gt;&amp;gt;&lt;/i&gt;&lt;br&gt;&lt;b&gt;SemanticComponentRDFClass&lt;/b&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ uri: string&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;&lt;br&gt;&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="1" vertex="1">
<mxGeometry x="-800" y="760" width="270" height="140" as="geometry"/>
</mxCell>
<mxCell id="25" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="20" target="28" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="-40" y="310" as="sourcePoint"/>
<mxPoint x="-320" y="290" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="26" value="0..*" style="edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;" parent="25" connectable="0" vertex="1">
<mxGeometry x="-1" relative="1" as="geometry"/>
</mxCell>
<mxCell id="27" value="0..*" style="edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;" parent="25" connectable="0" vertex="1">
<mxGeometry x="1" relative="1" as="geometry">
<mxPoint y="20" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="28" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center&quot;&gt;&lt;i&gt;&amp;lt;&amp;lt;Interface&amp;gt;&amp;gt;&lt;/i&gt;&lt;br&gt;&lt;b&gt;SemComInput&lt;/b&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+ identifier: SemanticComponentIdentifier&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;+&amp;nbsp;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;&lt;br&gt;&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" parent="1" vertex="1">
<mxGeometry x="-380" y="250" width="270" height="140" as="geometry"/>
</mxCell>
<mxCell id="29" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="550" y="730" width="240" height="390" as="geometry"/>
</mxCell>
<mxCell id="30" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="590" y="770" width="40" height="40" as="geometry"/>
</mxCell>
<mxCell id="31" value="John Bruce" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="650" y="770" width="110" height="20" as="geometry"/>
</mxCell>
<mxCell id="32" value="Private banking" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="650" y="790" width="110" height="20" as="geometry"/>
</mxCell>
<mxCell id="33" value="" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="1" vertex="1">
<mxGeometry x="590" y="850" width="160" height="60" as="geometry"/>
</mxCell>
<mxCell id="35" value="" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="1" vertex="1">
<mxGeometry x="590" y="930" width="160" height="60" as="geometry"/>
</mxCell>
<mxCell id="36" value="" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="1" vertex="1">
<mxGeometry x="590" y="1020" width="160" height="60" as="geometry"/>
</mxCell>
<mxCell id="37" value="+1000" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="700" y="870" width="40" height="20" as="geometry"/>
</mxCell>
<mxCell id="38" value="+1000" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="700" y="950" width="40" height="20" as="geometry"/>
</mxCell>
<mxCell id="39" value="+1000" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="700" y="1040" width="40" height="20" as="geometry"/>
</mxCell>
<mxCell id="40" value="{&lt;br&gt;profile: {&lt;br&gt;name: &quot;John Bruce&quot;&lt;br&gt;}&lt;br&gt;subscription: {&lt;br&gt;type: &quot;Private Banking&quot;&lt;br&gt;}&lt;br&gt;transactions:[&lt;br&gt;{&lt;br&gt;amount: 1000&lt;br&gt;}&lt;br&gt;]&lt;br&gt;}&lt;br&gt;&lt;br&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="310" y="780" width="170" height="210" as="geometry"/>
</mxCell>
<mxCell id="41" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center&quot;&gt;&lt;i&gt;&amp;lt;&amp;lt;Abstract Class&amp;gt;&amp;gt;&lt;/i&gt;&lt;br&gt;&lt;b&gt;SemComQueryService&lt;/b&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;&lt;br&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&amp;nbsp;+ abstract query(filter: Partial&amp;lt;SemComMetadata&amp;gt;): Promise&amp;lt;SemComMetadata[]&amp;gt;&lt;br&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;&lt;br&gt;&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" vertex="1" parent="1">
<mxGeometry x="1120" y="380" width="320" height="140" as="geometry"/>
</mxCell>
<mxCell id="42" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="41" target="12">
<mxGeometry relative="1" as="geometry">
<mxPoint x="125" y="270" as="sourcePoint"/>
<mxPoint x="970" y="450" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="48" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center&quot;&gt;&lt;i&gt;&amp;lt;&amp;lt;Class&amp;gt;&amp;gt;&lt;/i&gt;&lt;br&gt;&lt;b&gt;SemComQueryMockService&lt;/b&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;&lt;br&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&amp;nbsp;+ query(filter: Partial&amp;lt;SemComMetadata&amp;gt;): Promise&amp;lt;SemComMetadata[]&amp;gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;&lt;br&gt;&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" vertex="1" parent="1">
<mxGeometry x="880" y="680" width="320" height="140" as="geometry"/>
</mxCell>
<mxCell id="50" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center&quot;&gt;&lt;i&gt;&amp;lt;&amp;lt;Class&amp;gt;&amp;gt;&lt;/i&gt;&lt;br&gt;&lt;b&gt;SemComQueryNodesService&lt;/b&gt;&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;- repository: string&lt;/p&gt;&lt;hr size=&quot;1&quot;&gt;&amp;nbsp;+ constructor(repository: string)&lt;br&gt;&amp;nbsp;+ query(filter: Partial&amp;lt;SemComMetadata&amp;gt;): Promise&amp;lt;SemComMetadata[]&amp;gt;&lt;p style=&quot;margin: 0px ; margin-left: 4px&quot;&gt;&lt;br&gt;&lt;/p&gt;" style="verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;" vertex="1" parent="1">
<mxGeometry x="1360" y="680" width="320" height="140" as="geometry"/>
</mxCell>
<mxCell id="52" value="Extends" style="endArrow=block;endSize=16;endFill=0;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="48" target="41">
<mxGeometry width="160" relative="1" as="geometry">
<mxPoint x="1160" y="560" as="sourcePoint"/>
<mxPoint x="1320" y="560" as="targetPoint"/>
<Array as="points">
<mxPoint x="1040" y="600"/>
<mxPoint x="1280" y="600"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="53" value="Extends" style="endArrow=block;endSize=16;endFill=0;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="50" target="41">
<mxGeometry width="160" relative="1" as="geometry">
<mxPoint x="1050" y="689.9999999999998" as="sourcePoint"/>
<mxPoint x="1290" y="529.9999999999998" as="targetPoint"/>
<Array as="points">
<mxPoint x="1520" y="600"/>
<mxPoint x="1280" y="600"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="54" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="28" target="11">
<mxGeometry relative="1" as="geometry">
<mxPoint x="-520" y="320" as="sourcePoint"/>
<mxPoint x="-370" y="320" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="55" value="0..*" style="edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;" connectable="0" vertex="1" parent="54">
<mxGeometry x="-1" relative="1" as="geometry"/>
</mxCell>
<mxCell id="56" value="0..*" style="edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;" connectable="0" vertex="1" parent="54">
<mxGeometry x="1" relative="1" as="geometry">
<mxPoint y="20" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="57" value="«Interface»&lt;br&gt;&lt;b&gt;HTMLElement&lt;/b&gt;" style="html=1;" vertex="1" parent="1">
<mxGeometry x="10" y="640" width="270" height="50" as="geometry"/>
</mxCell>
<mxCell id="58" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="14" target="57">
<mxGeometry width="160" relative="1" as="geometry">
<mxPoint y="580" as="sourcePoint"/>
<mxPoint x="150" y="600" as="targetPoint"/>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Loading

0 comments on commit 7ec8af2

Please sign in to comment.