Consuming Requirement Information in IBM DOORS Next Generation
Accepted answer
https://jazz.net/library/article/1197
If you are still struggling, you need to elaborate how you have tried and how it does not work for you.
Comments
Hello Mr Donald,
Thanks for the quick reply.
I am not able read the particular requirements from a project in DOORS. Say for example I have Project P1 in doors. It has requirements R1 and R2. Now i want to read the requirements contents like description , attributes etc. How i can get these details.
I am able to get the details if i pass the complete URL for the requirement(http link).
Ex:https://myserver.com:9443/rm/resources/_V8bgQZffEeSBXNj_MnKquA
But i would like query the information based on requirement title.
Is there any possibilty of the same.
Thanks in Advance.
Using the resource URI is the right way to get the details of an artifact. So you can actually "read" artifacts, but want to find ways to "search" and "filter" them. It is also mentioned in the article linked above, just take a closer look at the section "Using the query capabilities".
Hello Mr.Donald,
As i could not follow the "Using the query capabilities" completely i tried the below method.
But still i could not get any results.
OslcQueryParameters queryParams = new OslcQueryParameters();
queryParams.setPrefix("oslc_rm=<http://open-services.net/ns/rm#>");
queryParams.setWhere("oslc_rm:implementedBy=<https://myserver.com:9443/rm/web#action=com.ibm.rdm.web.pages.showFoundationProjectDashboard&projectURI=https://myserver.com:9443/rm/process/project-areas/_CkC8Ems5EeSW6JaIEQdsVA>");
queryParams.setSelect("*");
OslcQuery query = new OslcQuery(client, queryCapability, 10, queryParams);
OslcQueryResult result = query.submit();
int resultsSize = result.getMembersUrls().length;
System.out.println("\n------------------------------\n");
System.out.println("Number of Results for SCENARIO 08 = " + resultsSize + "\n");
Where
https://myserver.com:9443/rm/web#action=com.ibm.rdm.web.pages.showFoundationProjectDashboard&projectURI=https://myserver.com:9443/rm/process/project-areas/_CkC8Ems5EeSW6JaIEQdsVA is my project area
Below is the refered link for ths same.
https://jazz.net/library/article/1382#Query
Need support on this.
Thanks in advance.
The below code from org/eclipse/lyo/client/oslc/samples/RRCFormSample.java looks perfect. But what "dcterms" recembels here.
queryParams = new OslcQueryParameters();
queryParams.setPrefix("dcterms=<http://purl.org/dc/terms/>");
queryParams.setWhere("dcterms:title=\"Req04\"");
query = new OslcQuery(client, queryCapability, 10, queryParams);
result = query.submit();
resultsSize = result.getMembersUrls().length;
processAsJavaObjects = false;
processPagedQueryResults(result,client, processAsJavaObjects);
System.out.println("\n------------------------------\n");
System.out.println("Number of Results for SCENARIO 03 = " + resultsSize + "\n")
You need to understand all the attributes mean by studying the RDF+XML presentation when you GET the artifact resource. "dcterms" is the name space prefix for "http://purl.org/dc/terms/", defined just one line above. It's the same as "oslc_rm", which your used without knowing exactly what it was. Also, if you examine the XML presentation of a resource the contains the "implementedBy" link, you will see the the linked resource URI is in a different and basic form, whereas you incorrectly used the project dashboard web link in that place and it would give you no result.
Hello Mr.Donald,
I am able to search a particular requirement in doors by using the sample code in below link by title and id.
http://git.eclipse.org/c/lyo/org.eclipse.lyo.client.git/tree/org.eclipse.lyo.client.java.sample/src/main/java/org/eclipse/lyo/client/oslc/samples/RRCFormSample.java
I changed the url specific to my environment.
Now I could read the basic attributes related to requirement like title,desc, created and created by etc. I want read addittional attributes like Priority, Requirement Type and also some user defined attributes. I could see method getExtendedProperties() in Requirement object. Any idea about this method. Also any idea how i can fetch additional attrbutes.
Thanks in advance.
Sorry I'm not familiar with Eclipse Lyo. The below article should give you an idea of the particular API (at the very bottom of the page).
https://jazz.net/library/content/articles/rrc/4.0/oslc-consumer-eclipse-lyo/