It's all about the answers!

Ask a question

DNG 6.0 : Fetch requirements from Requirement Collection


Naveen Tyagi (19769152) | asked Sep 27 '15, 11:50 p.m.
I am able to fetch URI of the collection in DNG. i want to get requirements in that collection. I have tried query given in the article (https://jazz.net/library/article/1197) but didn't work. I am using OSLC, Eclipse, java. Thanking in advance.

Comments
1
Donald Nong commented Sep 28 '15, 2:31 a.m.

You'd better clarify what you did and what you got. The word "didn't work" provides no information to work towards a solution.


Naveen Tyagi commented Sep 28 '15, 2:38 a.m.

Hi Donald,
I have tried set the prefix and where in my query but got zero result.
Finally, I am able to do that with different approach.  I have done a GET on collectionURI and parse the value of RequirementURI from "oslc_rm:uses" tag.I am able to retrieve all the Requirements in a collection. just want to conform, is my approach correct  ?.


1
Donald Nong commented Sep 28 '15, 2:47 a.m. | edited Sep 28 '15, 3:11 a.m.

If your goal is get the list of requirements contained in the collection, the easiest way should be just GET the collection URL. Still not exactly sure what you did though.


Naveen Tyagi commented Sep 28 '15, 3:10 a.m.

Thanks for response,
for now i need only list of requirements and as you said GET is also right way so i will go with this since i have already done by this approch.

my requirement was, i wanted to get list of all the requirements in a folder where i have folder URI. i have written query to get the URI of all the requirements(artifacts) in the folder.
I was able to get all the requirements until there is no collection in the folder. if there is one or more collection then i start getting exception since i was treating every URI as requirement in folder.
I have stored all the requirements in List and List of the Collections URI in other List.
then start pulling out the requirements from collection(s) one by one and adding it into the Requirements list. By this way i am able to get all the requirements in a folder and also requirements from the collection in the folder. I don't know if there is other simple way to do this.


1
Donald Nong commented Sep 28 '15, 11:53 p.m.

Since your requirement is very specific, I think that is the best you can do.

Be the first one to answer this question!


Register or 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.