NOTE: This is a early working draft and is subject to change frequently.
The purpose of this page is to define how some common properties such as severity and priority can be represented in OSLC-CM. They have unique characterizations in that they are typically a close choice of a configured set of values. The choices are defined by a system administrator or a specific tool instance. There is a need to be able to query on these property values, standard values and assign based on either value set as well.
Property | Read-only | Value-type | Range | Occurs | Description |
---|---|---|---|---|---|
cm:priority | False | Resource | cm:High, cm:Medium, cm:Low | at-most-one | Priority of this ChangeRequest? |
cm:severity | False | Resource | cm:High, cm:Medium, cm:Low | at-most-one | Severity or criticality of ChangeRequest? |
Option: Simple URIs as value This takes the approach of just use URIs for values (objects) for a standard predicate. Has the nice quality of being very simple. Has the poor quality of not easy to get additional information about the values; either the provider needs to include in the response or acquire through query.
@prefix ex: <http://example.com/bugtracker> . @prefix oslc: <http://open-services.net/ns/core#> . @prefix cm: <http://open-services.net/ns/cm#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix dcterms: <http://purl.org/dc/terms/> . <http://example.com/bugs/2314> a cm:ChangeRequest ; dcterms:identifier " 00002314 " ; oslc:shortTitle "Bug 2314" ; dcterms:title " Invalid installation instructions " ; cm:priority <http://open-services.net/ns/cm#High> ; cm:severity <http://example.com/severity#S1> . <http://open-services.net/ns/cm#High> rdfs:label " High " ; ex:icon <http://example.com/priority/high.gif>. <hhttp://example.com/enums#S1> rdfs:label "Severe - HOT " ; ex:icon <http://example.com/severity/S1.gif>.
Option: Resources for values, using oslc:usage
Like previous simple example but now there is a level of indirection. This works nicely as now providers don't have to send back with each response or client doesn't need to query for additional data about the priority/severity values. These simple "value" resources are very static and highly cacheable. Downside for query is now you need to map each provider's mapping of "usage".
@prefix ex: <http://example.com/bugtracker> . @prefix oslc: <http://open-services.net/ns/core#> . @prefix cm: <http://open-services.net/ns/cm#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix dcterms: <http://purl.org/dc/terms/> . <http://example.com/bugs/2314> a cm:ChangeRequest ; dcterms:identifier " 00002314 " ; oslc:shortTitle "Bug 2314" ; dcterms:title " Invalid installation instructions " ; cm:priority <http://example.com/priority/high> ; cm:severity <http://example.comseverity#S1> . <http://example.com/priority/high> a cm:SeverityPriority ; rdfs:label " High " ; oslc:usage <http://open-services.net/ns/cm#High>; ex:icon <http://example.com/priority/high.gif>. <http://example.com/severity#S1> a cm:SeverityPriority ; rdfs:label "Severe - HOT" ; oslc:usage <http://open-services.net/ns/cm#High>; ex:icon <http://example.com/severity/S1.gif>.
<bugs/2314> cm:priority <#high>; rtc:priority <http://mytool/priority>.
Disbanded this approach as it adds way too much in the way of "meaning" of the various concepts, like a rdf:type of cm-x:PriorityHigh implies a rdfs:Class.
@prefix ex: <http://example.com/bugtracker> . @prefix oslc: <http://open-services.net/ns/core#> . @prefix cm: <http://open-services.net/ns/cm#> . @prefix cm-x: <http://open-services.net/ns/cm-x#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix dcterms: <http://purl.org/dc/terms/> . <http://example.com/bugs/2314> a oslc_cm:ChangeRequest ; dcterms:identifier " 00002314 " ; oslc:shortTitle "Bug 2314" ; dcterms:title " Invalid installation instructions " ; dcterms:type " Defect " ; cm-x:priority <http://example.com/priority/high> ; cm-x:severity <http://example.com/severity/low> . <http://example.com/priority/high> a cm-x:PriorityHigh ; dcterms:title " High " ; ex:icon <http://example.com/priority/high.gif>. <http://example.com/severity/low> a cm-x:SeverityLow ; dcterms:title " Low " ; ex:icon <http://example.com/severity/log.gif>.