Skip to content

Commit

Permalink
Fixed and extended SysML ordered properties example
Browse files Browse the repository at this point in the history
  • Loading branch information
jamsden committed Oct 14, 2024
1 parent 355d56b commit f849c7a
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions specs/sysml/sysml-spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -680,10 +680,12 @@ <h2>Vocabulary Subsets</h2>
<section id="PropertyOrdering">
<h2>Ordering of multi-valued properties</h2>
<p>
SysML specifies ordering of properties with a multiplicity>1 using the UML:isOrdered property. RDF triples are unordered by definition so some pattern needs to be used to capture ordering.
SysML specifies ordering of properties with a multiplicity>1 using the UML:isOrdered property. RDF triples
are unordered by definition so some pattern needs to be used to capture ordering.
</p>
<p>
The REST API uses JSON, which is naturally ordered. This ordering will be used to specify the ordering of the RDF properties when using the API.
The REST API uses JSON, which is naturally ordered. This ordering will be used to specify the ordering of
the RDF properties when using the API.
</p>
<p>
Several patterns were considered:
Expand All @@ -694,26 +696,35 @@ <h2>Ordering of multi-valued properties</h2>
<li>Use of triple reification with an ordering property, this is the pattern chosen</li>
</ul>
<p class="conformance">
SysML servers MUST support a property <code>oslc_sysmlv2:isOrdered</code> that is used to designate
an rdf:Statement reified statement that is ordered.
SysML servers MUST support a property <code>oslc_sysmlv2:order</code> that is used to designate
an rdf:Statement reified statement order.
</p>
<p class="conformance">
SysML servers MUST reify all SysML v2 relationships and apply the <code>oslc_sysmlv2:isOrdered</code>
SysML servers MUST reify all SysML v2 relationships and apply the <code>oslc_sysmlv2:order</code>
with the value <code>true</code>. For example:
</p>
<pre class="example">
:r a oslc_sysmlv2:Reltionship .
:e a oslc_sysmlv2:Element .
#This is the actual triple for the oslc_sysmlv2:source property of a relationship
:f a oslc_sysmlv2:Element .
#These are actual triples for the oslc_sysmlv2:source property of a relationship
:r oslc_sysmlv2:source :e .
:r oslc_sysmlv2:source :f .

# The following reified statement indicates the oslc_sysmlv2:source property is ordered
:s_1 a rdf:Statement ;
rdf:subject :r ;
rdf:predicate oslc_sysmlv2:source ;
rdf:object :e ;
oslc_sysmlv2:isOrdered: 'true' .
</pre>
oslc_sysmlv2:order: 1 .

:s_2 a rdf:Statement ;
rdf:subject :r ;
rdf:predicate oslc_sysmlv2:source ;
rdf:object :f ;
oslc_sysmlv2:order: 2 .

</pre>
<p>Advantages of this pattern include:
</p>
<ul>
Expand All @@ -722,7 +733,7 @@ <h2>Ordering of multi-valued properties</h2>
<li>A read-user of a model may choose to respect or ignore ordering</li>
<li>The pattern is compatible with OSLC and can be implemented for SysML</li>
</ul>

</section>
<section id="capabilities">
<h2>SysML Server Capabilities</h2>

Expand Down

0 comments on commit f849c7a

Please sign in to comment.