This specification defines the OSLC SysML domain, a RESTful web services interface for the SysML v2 resources and relationships between those and related resources such as product change requests, activities, tasks, requirements or test cases. To support these scenarios, this specification defines a set of HTTP-based RESTful interfaces in terms of HTTP methods: GET, POST, PUT and DELETE, as well as HTTP response codes, content type handling and resource formats.
Object Management group (https://www.omg.org) defines the OMG Systems Modeling Language Version 2.0 commonly referred to as SysML v2 [[!SysML]]. From OMG: "SysML is a general-purpose modeling language for modeling systems that is intended to facilitate a model-based systems engineering (MBSE) approach to engineer systems. It provides the capability to create and visualize models that represent many different aspects of a system.This includes representing the requirements, structure, and behavior of the system, and the specification of analysis cases and verification cases used to analyze and verify the system. The language is intended to support multiple systems engineering methods and practices. The specific methods and practices may impose additional constraints on how the language is used."
SysML v2 plays a key role in Model-Based Systems and Software Engineering which is a major part of lifecycle management by defining a representation of the resources whose lifecycles are to be managed. It is therefore highly desirable to be able to integrate and link SysML resources with OSLC resources such as Requirements, Change Requests, Architecture Resources and test cases. This is accomplished by two OSLC-OP initiatives:
This specification defines the RESTful web services interface for the SysML OSLC domain that is used in the PIM to PSM mapping. This domain addresses the management of Model-Based Systems Engineering (MBSE) artifacts such as models, and relationships with other resources such as requirements, testing resources and change requests, as well as relationships between reusable SysML model elements in a supply chain. To support these scenarios, this specification defines a set of HTTP-based RESTful interfaces in terms of HTTP methods: GET, POST, PUT and DELETE, HTTP response codes, content type handling and resource formats.
The intent of this specification is to define the capabilities needed to support integration scenarios used in typical MBSE methods using SysML v2, and to enable linking SysML model artifacts with other OSLC lifecyle artifacts. This is accomplished by generating the OSLC SysML v2 vocabulary terms and constraints from the SysML Abstract Syntax (XMI), and having http://open-services.net/ns/kerml#Element subclass http://open-services.net/ns/am#Resource [[!OSLCAM]].
This specification is a [[!OSLCCore3]] compliant specification, and as such most of its content are references to [[!OSLCCore3]].
The following sub-sections define the mandatory and optional requirements for an OSLC SysML (OSLC SysML) server.
This specification is based on [[!OSLCCore3]]. OSLC SysML servers MUST be compliant with both the core specification, MUST follow all the mandatory requirements in the normative sections of this specification, and SHOULD follow all the guidelines and recommendations in both these specifications.
An OSLC SysML server MUST implement the domain vocabulary defined in OSLC SysML Version 2.1. Part 2: Vocabulary
The following table summarizes the requirements from OSLC Core Specification as well as some additional requirements specific to the SysML domain. Note that this specification further restricts some of the requirements from the OSLC Core Specification. See the previous sections in this specification or the OSLC Core Specification to get further details on each of these requirements.
Requirement | Meaning |
---|---|
Absolute URIs | SysML Servers MUST use absolute URIs for all references to resources by properties |
Unknown properties and content | SysML Servers MAY ignore unknown content and SysML clients MUST preserve unknown content. SysML Servers MAY discard such properties and continue the POST or PUT operation without warning to the client. |
Resource Operations | SysML Servers MUST support resource operations via standard HTTP operations |
Update and Delete | SysML Servers SHOULD support resource modifications with standard HTTP PUT and DELETE methods. SysML Servers MAY limit modifications |
HTTP If-Match use | SysML Servers supporting update and delete of resources MUST support the standard HTTP If-Match header in PUT and DELETE for concurrency protection of resources. |
Resource Paging | SysML Servers MAY provide paging for resources but only when specifically requested by clients |
Partial Resource Representations | SysML Servers MAY support requests for a subset of a resource's properties via the oslc.properties URL parameter retrieval via HTTP GET |
Partial Update | SysML Servers MAY support partial update of resources via the oslc.properties URL parameter retrieval via HTTP PUT and or using [[LDPPatch]]. |
Discovery | SysML Servers MAY provide a Service Provider Catalog, MUST provide a Service Provider resource, and MAY provide other forms of discovery described in [[!OSLCCore3]]. |
Creation Factories | SysML Servers MAY provide creation factories for resource formats that it supports. SysML Servers MAY support creation factories for OSLC SysML defined resources formatted as application/rdf+xml. SysML Servers MAY support creation factories for other formats, and indicate such creation factories with a non-default identifier in the oslc:usage property of the creation factory definition in the service provider document |
Query Capabilities | SysML Servers MUST provide query capabilities on oslc_am:Resource resources to enable clients to query for resources. SysML Servers SHOULD support a query interface for oslc_am:LinkType resources that support a GET for all LinkType resources. Such a GET does not require any simple query syntax parameters. SysML Servers MAY support the full query syntax for LinkType resources. |
Query Syntax | OSLC query capabilities MUST support the OSLC Core Query Syntax |
Delegated Dialogs | SysML Services SHOULD offer selection delegated dialogs and MAY offer creation delegated dialogs specified via service provider resource |
Resource Preview | SysML Services SHOULD offer resource previews for resources that may be referenced by other resources |
Authentication | SysML Services SHOULD follow the recommendations for Authentication specified in [[!OSLCCore3]] |
Error Responses | SysML Servers SHOULD provide error responses using OSLC Core defined error formats |
RDF/XML Representations | SysML Servers MUST support RDF/XML representations for OSLC Defined Resources |
XML Representations | SysML Servers MUST support XML representations that conform to the OSLC Core Guidelines for XML |
JSON Representations | SysML Servers MAY support JSON representations; those which do MUST conform to the OSLC Core Guidelines for JSON |
HTML Representations | SysML Servers MAY provide HTML representations for GET requests |
This specification follows the specification version guidelines given in [[!OSLCCore3]].
In addition to the namespace URIs and namespace prefixes oslc
, rdf
,
dcterms
and foaf
defined in [[!OSLCCore3]], OSLC SysML defines the namespace URI of
http://open-services.net/ns/sysmlv2#
with a preferred namespace prefix of oslc_sysmlv2
.
In addition to the requirements for resource representations in [[!OSLCCore3]], this section outlines further refinements and restrictions.
For HTTP GET/PUT/POST requests on all OSLC SysML and OSLC Core defined resource types,
application/rdf+xml
. SysML
Clients SHOULD be prepared to deal with any valid RDF/XML document.
application/xml
. The XML
representations MUST follow the guidelines outlined in the
OSLC Core Representations Guidance
to maintain compatibility with [[!OSLCCore2]].
application/json
. The JSON
representations MUST follow the guidelines outlined in the
OSLC Core Representations Guidance
to maintain compatibility with [[!OSLCCore2]].
For compatibility with OSLC 2.0, OSLC SysML Servers MAY accept the OSLC Core Version header (OSLC-Core-Version: 2.0) in any HTTP request as specified in [[!OSLCCore3]], and return an OSLC SysML 2.0 representation (including the OSLC-Core-Version: 2.0 header). If the OSLC Core Version header is absent on a request, or has some undefined value, the OSLC SysML Server MUST return an SysML 2.0 representation.
OSLC SysML Servers MUST support HTTP GET requests on SysML Resources, with an Accept header of
application/rdf+xml
, and return the RDF/XML representation of the resource.
OSLC SysML Servers SHOULD support HTTP GET requests on SysML Resources, with an Accept header of an HTML type
( application/html
, application/xhtml
), and return either an HTML/XHTML
representation of the resource or redirect the client to another URL that can (i.e. 302 Redirect).
OSLC SysML Servers SHOULD support HTTP GET requests for user interface (UI) preview of SysML Resources as defined by [[!OSLCPreview]].
OSLC SysML Servers SHOULD support resource modifications on SysML Resources with standard HTTP PUT and DELETE methods. SysML Servers MAY limit modifications in any way they want. For example a service provider may limit updates to resources to simple link properties of link types already defined in the provider. Modification methods MUST use the If-Match header for concurrency management. Providers MAY discard such properties and continue a PUT operation without warning to the client.
OSLC SysML Servers SHOULD support resource modifications on LinkType Resources (LTR) with standard HTTP PUT and DELETE methods. SysML Servers MAY limit modifications in any way they want. For example a service provider may not support additional properties. Modification methods SHOULD use the If-Match header for concurrency management.
See [[!OSLCCore3]], OSLC SysML puts no additional constraints on authentication.
See [[!OSLCCore3]], OSLC SysML puts no additional constraints on error responses
OSLC SysML Servers SHOULD support pagination of query results and MAY support pagination of a single resource's properties as defined by [[!OSLCCore3]].
An OSLC SysML server MAY support the oslc.properties
URL query parameter on an HTTP GET request
on individual resource request or a collection of resources by query. If the
oslc.properties
query parameter is omitted on the request, then all resource properties MUST be
provided in the response.
An OSLC SysML client MAY request that a subset of a resource's properties be updated by identifying those
properties to be modified using the oslc.properties
URL parameter on a HTTP PUT request.
An OSLC SysML Server MAY support updating a subset of a resource's properties by using the [[LDPPatch]]
PATCH
method.
For compatibility with [[!OSLCCore2]], an SysML Server MAY also support partial update by identifying those
properties to be modified using the oslc.properties
URL parameter on a HTTP PUT request.
If the parameter oslc.properties
contains a valid resource property on the request that is not
provided in the content, the server MUST set the resource's property to a null or empty value. If the
parameter oslc.properties
contains an invalid resource property, then a
409 Conflict
MUST be returned.
OSLC SysML Resources 2.1 Defines the vocabulary terms and constraints for OSLC Change Management resources. These terms and constraints are specified according to [[!OSLCCore3]].
SysML OSLC servers MAY choose to limit the types of SysML resources that can be accessed directly with a URL, or are accessible for resource preview or selection and creation dialogs. This allows servers to simplify the OSLC REST API to those SysML elements that are necessary for their particular purpose. SysML Servers MUST allow direct access to at least Element and Relationship.
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.
Several patterns were considered:
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:order
with the value true
. For example:
:r a oslc_sysmlv2:Reltionship . :e a oslc_sysmlv2:Element . :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: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:
OSLC SysML servers SHOULD support Resource Shapes as defined in [[!OSLCShapes]].
OSLC SysML Servers MUST provide a ServiceProvider Resource that can be retrieved at a implementation dependent URI.
OSLC SysML Servers MUST provide a ServiceProviderCatalog Resource that can be retrieved at a implementation dependent URI.
OSLC SysML Servers MUST provide an oslc:serviceProvider
property for their defined resources that
will be the URI to a ServiceProvider Resource. This does not prevent SysML Servers from providing multiple
servie provider properties with different values, if the service provider supports multiple OSLC domain
specifications, and the resource is applicable to multiple domains.
OSLC SysML Servers MUST supply a value of http://open-services.net/ns/am#
for the property
oslc:domain
on either oslc:ServiceProvider
or
oslc:ServiceProviderCatalog
resources.
OSLC SysML Servers MAY support CreationFactories as defined by [[!OSLCCore3]].
OSLC SysML Servers MAY discard properties it does not recognize and continue the POST operation without warning to the client. The returned resource will contain the accepted properties (and server generated properties like the dcterms:identifer) so clients will be able to confirm if required what was accepted.
If OSLC SysML Servers support the creation of resources from the OSLC defined
oslc_am:Resource
format, there MUST be at least one Creation Factory entry in the Services
definition, and its oslc:usage
property MUST be set to
http://open-services/ns/core#default
. The oslc:resourceType
MUST be set to
http://open-services.net/ns/am#Resource
.
If OSLC SysML Servers support the creation of resources from a resource other than
oslc_am:Resource
, there MUST be a separate creation services definition whose
oslc:usage
property MUST NOT be set to http://open-services/ns/core#default
.
OSLC SysML Servers SHOULD support the Query Capabilities as defined by [[!OSLCCore3]] for both
oslc_am:Resource
and oslc_am:LinkType
resources.
If the service provider supports query capability for oslc_am:Resource
resources, it MUST support
the following query parameters:
oslc.where
oslc.searchTerms
OSLC SysML Servers SHOULD support query capability for oslc_am:LinkType
resources. If supported
then SysML Servers MUST support a simple GET without any query parameters that returns all link type
resources. SysML Servers SHOULD support the full OSLC query syntax.
OSLC SysML Servers SHOULD support the selection of resources by delegated selection dialogs as defined by [[!OSLCCore3]].
OSLC SysML Servers MAY support the creation of resources by delegated creation dialogs as defined by [[!OSLCCore3]].
In oslc:Dialog
elements, the two optional child elements; oslc:hintWidth
and
oslc:hintHeight
specify the suggested size of the dialog or frame to render the HTML content in.
Expected size values are defined by CSS length units.
The following individuals have participated in the creation of this specification and are gratefully acknowledged:
Participants:
James Amsden, IBM (Editor)
Jad El-khoury, KTH