How can I list the requirements within a folder in DOORS Next Generation?
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
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
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 :
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,
<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
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
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
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
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);
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);