DNG 6.0 : How to get List of the Folders in a project using OSLC
Naveen Tyagi (197●78●152)
| asked Sep 03 '15, 6:15 a.m.
edited Sep 12 '15, 12:03 a.m. by Geoffrey Clemm (30.1k●3●30●35)
I am using Java, Eclipse Lyo and OSLC. i am able to pull out all the requirements from DNG but i want requirement should be fetched folder by folder, not all once.
1. I need to pass list of the folder in DNG project to a Custom tool where user will select the folder name from drop down list in GUI.
2. Selected folder name will be passed to me as an Input from custom tool.
3. I have to again pull out all the requirement from that folder and send requirement list to the custom tool.
I am not able to get any hint to sort out this issue. I gone through this article ( https://jazz.net/library/article/1197 ) didn't find any way to pull out list of the folder inside a DNG project .
|
Accepted answer
You first need to find the root folder with these two conditions.
1. dcterms:title is "root". 2. oslc:serviceProvider contains the project area's service document services.xml (edited to add, it turns out the the base folder query already contains the root folder, as "public_rm:parent", so there is no need to "find" it). Once you get the root folder, do a GET against the root folder, and check <nav:subfolders>. Follow the link to get all the folders under the root folder. For each folder, follow the link in <nav:subfolders> to get its subfolders. Naveen Tyagi selected this answer as the correct answer
Comments
Naveen Tyagi
commented Oct 05 '15, 8:27 a.m.
Where have you been all my Life!!! Thanks for exact Answer!!!
Naveen Tyagi
commented Mar 07 '16, 2:47 a.m.
Hi Donald,
Donald Nong
commented Mar 07 '16, 7:50 p.m.
I don't have a better approach if you have to get all the folders at once. What I would suggest is to simulate the behavior of RDNG itself - only shows one level of folders at a time, and if you "expand" a folder, the child folders are shown, while "selecting" a folder shows the containing requirement artifacts.
Naveen Tyagi
commented Mar 08 '16, 12:20 a.m.
No, I need all of them without worrying about any order. I am thinking to implement muti-threading, Instead of traversing through all the structure by one thread i will create multiple threads[5-10]. Lets see how it works.
|
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.
Comments
Please tag your questions appropriately. This is clearly a question about DNG ... not about RTC or jazz foundation.