[closed] OSLC query for getting requirements from a requirement collection
Carlos Gomez (27●5●9)
| asked Jul 01 '15, 12:17 p.m.
closed Jan 31 '23, 4:20 a.m. by David Honey (1.8k●1●7)
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=1But 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
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
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"
|