From e0b4f3c4834f45fde29228b7ccda47f1b8cca4db Mon Sep 17 00:00:00 2001 From: Jim Amsden Date: Mon, 14 Oct 2024 05:55:54 -0400 Subject: [PATCH] Fixed SysML ordered properties example --- specs/sysml/sysml-spec.html | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/specs/sysml/sysml-spec.html b/specs/sysml/sysml-spec.html index 8a58ad0..4aca20f 100644 --- a/specs/sysml/sysml-spec.html +++ b/specs/sysml/sysml-spec.html @@ -680,10 +680,12 @@

Vocabulary Subsets

Ordering of multi-valued properties

- 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.

- 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.

Several patterns were considered: @@ -694,26 +696,35 @@

Ordering of multi-valued properties

  • Use of triple reification with an ordering property, this is the pattern chosen
  • - SysML servers MUST support a property oslc_sysmlv2:isOrdered that is used to designate - an rdf:Statement reified statement that is ordered. + SysML servers MUST support a property oslc_sysmlv2:order that is used to designate + an rdf:Statement reified statement order.

    - SysML servers MUST reify all SysML v2 relationships and apply the oslc_sysmlv2:isOrdered + SysML servers MUST reify all SysML v2 relationships and apply the oslc_sysmlv2:order with the value true. For 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' .
    -      
    + oslc_sysmlv2:order: 1 . + +:s_2 a rdf:Statement ; + rdf:subject :r ; + rdf:predicate oslc_sysmlv2:source ; + rdf:object :f ; + oslc_sysmlv2:order: 2 . + +

    Advantages of this pattern include: