It's all about the answers!

Ask a question

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


Ross O'Connor (131) | asked Jun 10, 10:31 a.m.

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 

Accepted answer


permanent link
David Honey (2256) | answered Jun 10, 11:36 a.m.
JAZZ DEVELOPER

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

Comments
David Honey commented Jun 10, 11:45 a.m. | edited Jun 10, 4:38 p.m.
JAZZ DEVELOPER

1
Geoffrey Clemm commented Jun 10, 4:47 p.m. | edited Jun 10, 4:47 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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


Ross O'Connor commented Jun 11, 2:00 a.m.

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
Ralph Schoon (58.2k23642) | answered Jun 10, 10:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.

Your answer


Register or to post your answer.