It's all about the answers!

Ask a question

[closed] OSLC query for getting requirements from a requirement collection


0
1
Carlos Gomez (2759) | asked Jul 01 '15, 12:17 p.m.
closed Jan 31 '23, 4:20 a.m. by David Honey (1.8k17)
Hi,
I'm using DOORS NG (V5.0.2) and I'm trying to get requirements referenced by a RequirementCollection using OSLC.
I tried the query given on:
https://jazz.net/library/article/1197

which is:
&oslc.prefix=oslc_rm=<http://open-services.net/ns/rm%23>,dcterms=<http://purl.org/dc/terms/>&oslc.select=oslc_rm:uses&oslc.where=dcterms:identifier=1
But this query only returns the RequirementCollection itself.
 
So, is the query correct?
PS: Thanks Sudarshan for your answer on DOORS forum. In fact, I put the wrong query.

The question has been closed for the following reason: "The question is answered, right answer was accepted" by davidhoney Jan 31 '23, 4:20 a.m.

Accepted answer


permanent link
Donald Nong (14.5k414) | answered Jul 01 '15, 9:39 p.m.
edited Jul 01 '15, 9:40 p.m.
The result is correct and expected. The parameter "oslc.where=dcterms:identifier=1" dictates that you will get zero or one item in the response. To my knowledge, when using an OSLC query, it does not "expand" the items with more details such as links, and only includes "basic" properties.

In the response, you will get the <oslc_rm:RequirementCollection> attribute (hopefully) which is the OSLC URL to the collection itself. Accessing to the URL will expose the "oslc_rm:uses" attributes that you are looking for.

If you want to get the details of the contained artifacts at the same time, it's better to use the Reportable REST API (not OSLC).
https://<server>:<port>/rm/publish/resources?collectionURI=<collection UUID>
Carlos Gomez selected this answer as the correct answer

Comments
Carlos Gomez commented Jul 02 '15, 5:44 a.m.

Thanks, I implement your proposition and it works. However, I thought it was possible to get the requirement list directly using an OSLC query.  

2 other answers



permanent link
Gabriel Ruelas (1.1k13) | answered Jul 01 '15, 12:53 p.m.
Hi,
      That query should return all artifact URL's that are member of the collection with id = 1. If you ar enot gettign the expected results try by URL encoding the"," char,

Comments
Carlos Gomez commented Jul 02 '15, 5:42 a.m.

 Yes, therefore the query proposed on https://jazz.net/library/article/1197 is wrong.


Davyd Norris commented Oct 27 '19, 8:17 p.m.
I know this is old but adding this comment for others:

The article isn't wrong, you just need to replace the value '1' with your own requirement ID, or use something like oslc.where=dcterms:title="My module name"

permanent link
Philip Gates (216) | answered Jan 30 '23, 5:11 p.m.

 The article 1197 linked above mentions the "query base url"... Where/what is that defined? 


Comments
Ian Barnard commented Jan 31 '23, 3:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 This is a different question - you should create your own question and ask this