Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Where is the schema or shape defined for non-standard OSLC objects?

I'm playing around with RTC OSLC 2.0 API, and I have retrieved a work item.


This has properties like "oslc_cmx:project", which points to the project area - great.

When I fetch the project area resource, it has a type of "http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/Project".  Seems great.

But where are the properties of a Project resource defined?  That URI just redirects to https://jazz.net/wiki/bin/view/LinkedData/RtcCmVocabulary#Project - and that page is useless.  First, it doesn't actually contain "Project".  Second, the things it does contain, it doesn't give any information on what they look like!

How am I to determine what properties a project area (or any other non-OSLC-core resource) has?  It seems like the only answer I can find for now is trial and error - fetch it and see what it has, which isn't very 

0 votes


Accepted answer

Permanent link

The work item's RDF should include a oslc:resourceShape statement to an OSLC Resource Shape.
Where an OSLC resource has relationships to other resources, the shape should have an OSLC property that describes that relationship. Implementations might specify an oslc:range and/or oslc:valueShape for that property. Looking at a work item resource shape I see it includes:

<https://jazz.net/jazz/oslc/shapes/workitems/_i6im8MhlEeu9RY6EqQ8OtA/property/projectArea>
      a       oslc:Property ;
      oslc:allowedValues <https://jazz.net/jazz/oslc/shapes/workitems/_i6im8MhlEeu9RY6EqQ8OtA/property/projectArea/allowedValues> ;
      oslc:name "project"^^<http://www.w3.org/2001/XMLSchema#string> ;
      oslc:occurs oslc:Zero-or-one ;
      oslc:propertyDefinition
              <http://open-services.net/ns/cm-x#project> ;
      oslc:range <http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/Project> ;
      oslc:readOnly "true"^^<http://www.w3.org/2001/XMLSchema#boolean> ;
      oslc:representation oslc:Either ;
      oslc:valueType oslc:Resource ;
      dcterms:title "Project Area"^^rdf:XMLLiteral .

So that specifies a range. Best practice is to reference a range that is GETtable with an RDF media type, but that doesn't appear to be the case here.

Performing a GET of a project area with Accept=text/turtle shows RDF that does not include a reference to a resource shape. It would be best practice to include a reference to an instance shape. But it is what it is.

You can get the Ontology for a project area (and other process types) by performing a GET with Accept=text/turtle on http://jazz.net/ns/process#.

It's also worth noting that project area is a Jazz concept, not an OSLC defined one. None of the OSLC specifications define project areas or similar containers.

Ross O'Connor selected this answer as the correct answer

0 votes

Comments

 As a tangential comment, I strongly discourage everyone from using the term "project" when referring to an ELM "project area".   Almost every company/team uses the term "project", and they virtually never mean an object that corresponds to "project area".   In particular, if you create a "project area" for each of your projects, it is almost always the wrong thing to do.   In most cases, multiple "projects" will be run inside of a single project area, and in many cases, a "project" will require the use of many project areas.   Calling a "project area" a "process area" is very reasonable (and arguably would have been a significantly better choice than "project area", but it is probably too late to make that change).

1 vote

Thanks a lot David - that seems really helpful.  In particular I hadn't put together that following the shape of the original item could clue you in about related items.


I was aware the project area was a non-OSLC concept, but I figured there'd be a description of it somewhere.  You've certainly provided some pointers where to look.


One other answer

Permanent link
I am only a beginner with OSLC, but I am unsure if you can expect anything for non OSLC resources in an OSLC context. Best you can get is a link to it. The OSLC CM API only supports parts of the metadata. 
All I can try is to provide you with some links.



This shows the scope of the OSLC API: https://jazz.net/wiki/bin/view/Main/WorkItemAPIsForOSLCCM20 which also states which attributes are supported by OSLC.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,952

Question asked: Jun 10 '21, 10:31 a.m.

Question was seen: 1,294 times

Last updated: Jun 11 '21, 2:00 a.m.

Confirmation Cancel Confirm