How can I list the requirements within a folder in DOORS Next Generation?
Jean-Luc Johnson (81●2●5)
| asked Oct 01 '13, 1:28 p.m.
edited Oct 01 '13, 10:51 p.m. by Geoffrey Clemm (30.1k●3●30●35)
I'm using RM 4.0.3 and a REST plugin to get RDF documents from RM (I assume DOORS Next Generation).
I'm developing a java client for jazz RM 4.0.3 and I would like to build a tree structure of my project area and to access accurately only requirements (or other artifact types) in a given folder. Here is my issue. So far I can get the list of project areas, I can retrieve the list of folders and subfolders. But I realised that the service document (i.e https://servername:9443/rm/discovery/_X07S0iptEeODGMSiZX4rMQ/services.xml) is the same for all the containers and it uses the project area ID (here it would be _X07S0iptEeODGMSiZX4rMQ). In the end I always get a flat list of the requirements. Question: How can I use the query capability service to display only the artifact type requirement resources in a given folder ? Any idea or workaround is welcome. Thanks, Jean-Luc |
5 answers
Hi,
Look at this link for folder support in RM: Folder Support in RRC 4.0 OSLC API As it is the same RM server, support includes DNG 4.0.3 |
Exploring the project folder structure is relatively simple. In the service provider service.xml document, look for the folder service query capability. That is one of the Jazz specific concept. It should like :
<oslc:QueryCapability> <dcterms:title rdf:parseType="Literal">Folder Query Capability</dcterms:title> <oslc:queryBase rdf:resource="https://grarrc.ibm.com:9443/rm/folders?oslc.where=public_rm:parent=https://grarrc.ibm.com:9443/rm/folders/_Or3t4OrtEeGaNr-hWVrMiw" /> </oslc:QueryCapability>Copy the query base https://grarrc.ibm.com:9443/rm/folders?oslc.where=public_rm:parent=https://grarrc.ibm.com:9443/rm/folders/_Or3t4OrtEeGaNr-hWVrMiw then replace with your server. It should work. Regards, Comments
Naveen Tyagi
commented Sep 15 '15, 6:49 a.m.
Thanks Jean!! Finally i am able to get the folder list inside the project. now i have folder name with URi.
&oslc.prefix=oslc=<http://open-services.net/ns/core%23>,\ dcterms=<http://purl.org/dc/terms/>,nav=<http://com.ibm.rdm/navigation%23> |
Hi Bas,
The link you have mentioned takes me back to this web site. An answer could be in the article at https://jazz.net/library/article/1197 I will investigate later on. Many thanks |
I tried the query snippet codes at https://jazz.net/library/article/1197 and it worked.
Here is the answer. First get the query capability service, example: https://grarrc.ibm.com:9443/rm/views?oslc.query=true&projectURL=https://grarrc.ibm.com:9443/jts/process/project-areas/_C7NVcttZEeG_kKBmAlkUvA" To query the requirements in a specific folder, append to the the query capability a query similar to the following one: &oslc.prefix=oslc=<http://open-services.net/ns/core%23>,dcterms=<http://purl.org/dc/terms/>,nav=<http://com.ibm.rdm/navigation%23>&oslc.select=dcterms:title,dcterms:description,oslc:instanceShape&oslc.where=nav:parent=<https://grarrc.ibm.com:9443/rm/folders/_RHCJYN5jEeGb6IIbvOh9Dw> Now I'm able to filter accurately my artifacts. I hope it will help other people. Thanks Comments
Naveen Tyagi
commented Sep 03 '15, 1:44 a.m.
Hi Jean,
I am able to retrieve all the requirement in a project by OSLC/Java but i need to retrieve them folder by folder. you can get my actual problem from the question i have posted yesterday. Thanking in Advance for any help.
Hello Navenn,
Naveen Tyagi
commented Sep 03 '15, 7:22 a.m.
Thanks Jean for quick response.
what it does you can fetch any requirement that contains parent folder URI with help of that parent(folder) URI you can get all the other requirements inside that folder.(i can get root Folder Uri but after firing that folder query i am not getting any requirement).
i want list of the folder and on the name/URI of the folder, i want to pull out all the requirement inside that folder.
|
Hi Jean, I have been struggling quit a long time but still not able to solve this.i have pulled out all the folder with URI's in my projects. could you please add the required parameters in the below code so that i can just the submit the query to get requirements from any folder: lets assume my folder uri i want to pull out requirements from is : https://myserver.com/rm/folders/_uek58k6ZEeSd-tB745kpOQ . Thanking in advance.
OslcQueryParameters queryParams = new OslcQueryParameters(); queryParams.setPrefix("rdf=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>"); queryParams.setWhere("nav=<http://com.ibm.rdm/navigation#>&oslc.where=nav:parent=<https://myserver.com/rm/folders/_uek58k6ZEeSd-tB745kpOQ>"); OslcQuery query = new OslcQuery(client, queryCapability, 5, queryParams); OslcQueryResult result = query.submit(); System.out.println("Result Size: " +result.getMembersUrls().length); |
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.