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

How to retrieve CALM links associated with an RDF resource from CCM?

Assuming we are using a uniform request type once authenticated with accept: application/rdf+xml and OSLC-Core-Version: 2.0 for ALL requests.  

From the CCM perspective, if I request:

https://server/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/12

 It returns a valid RDF Description of the resource, but this does not include all the properties defined in the resource shape ? The ones I am interested in specifically are the CALM links which I can see in the resource shape definition, anything special I need to do to get them to return with the workitem?

 I have tried directly selecting them as properties without any luck so far, the query returns but without the attributes I am interested in...

https://server/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/12?oslc.select=dcterms:identifier,oslc_cm:implementsRequirement ,oslc_cm:testedByTestCase  

  -Sean

[edit] Removing code snippets as the forums just keeps eating them

0 votes


Accepted answer

Permanent link
I did the "follow your nose" method to get to the work item URL that was listed as part of the query response, which taking an example is:

 
https://server/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/9

I did as Sean did to fetch, though didn't notice the oslc_cm:testedByTestCase property in this work item. I noticed there wasn't a link, therefore it doesn't exist. I added a link and fetched it again, there was the oslc_cm:testedByTestCase property then. To minimize the amount of properties, I used ?oslc.properties such as:

https://server/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/9?oslc.properties=oslc_cm:testedByTestCase

I haven't looked at the shape support in detail but the shape associated with this work item (instance shape) should show most of these properties as optional (you may not find them). If there are true conflicts with the shape and the work item in hand, ie it doesn't validate right, then it may be a bug. Hope that helps
Sean G Wilbur selected this answer as the correct answer

1 vote

Comments

Thanks Steve, as usual the simple answer prevails. Once I had a workitem with these properties it succeeds. I was expecting the behavior we see in the web OSLC 1.0 where we get a link endpoint to the resource collection regardless and it may be empty.


3 other answers

Permanent link
 Hi Sean,
what about trying to add prefix and using oslc.properties instead of oslc.select such as 
 https://server/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/12?oslc.prefix=dcterms=<http://purl.org/dc/terms/>&oslc.properties=dcterms:identifier,dcterms:title,dcterms:created

add screenshot as the forum display is not correct.

0 votes


Permanent link
Sean, the resource URL (https://server/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/12) does not look like an OSLC-style URL.  An OSLC-syle URL in RTC has the following format:

https://server/ccm/oslc...

0 votes

Comments

The examples above are just a snippet, this is the RDF resource URI returned when you request application/rdf+xml content via a query or from another resources, so I am really just following the chain.


Permanent link
Hi Sean,

as Paul pointed out, try modifying your call to:

https://server/ccm/oslc/workitems/12

Then you can add the query parameters, for example:

https://server/ccm/oslc/workitems/12?oslc.select=calm:relatedTestPlan

Regards,

Jorge.

0 votes

Comments

Either URLs actually return the same thing, only the RDF Resource URL changes to match the query intereface, but as noted above to Paul, when you query via the simple Query interface the return is URLs with the format: https://server/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/ID

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,937
× 479
× 31
× 6

Question asked: Sep 13 '12, 12:21 p.m.

Question was seen: 9,069 times

Last updated: Sep 14 '12, 9:18 a.m.

Confirmation Cancel Confirm