How do I fetch all requirements for a folder with OSLC?
5 answers
Hi,
Try following query : " &oslc.prefix=nav=<http://com.ibm.rdm/navigation%23>&oslc.select=*&oslc.where=nav:parent=<YOUR_FOLDER_URL> " Where your folder URL may looks like : "https://grarrc.ibm.com:9443/rm/folders/_RHCJYN5jEeGb6IIbvOh9Dw" NOTE: On the query does not use the beginning and ending " chars |
Hi,
Sorry, but that did not help. So now I wonder if someone can tell me which is the best way to getting all the requirements in a folder using OSLC? I got the folder name and are able to retrieve the uri to the folder. Comments
Gabriel Ruelas
commented Oct 11 '12, 9:51 a.m.
Could you attach the query your are using?
Cecilia Lindgren
commented Oct 11 '12, 10:12 a.m.
https://server:9443/rm/views?oslc.query=true&projectURL=https%3A%2F%2Fserver%3A9443%2Fjts%2Fprocess%2Fproject-areas%2F_xdjJsP2cEeGoOoZWLhSJmQ&oslc.prefix=nav=<http://jazz.net/ns/rm/navigation#>&oslc.where=nav:parent=https://server:9443/rm/folders/_-0W0x_5KEeGoOoZWLhSJmQ&oslc.select=*
Cecilia,
Would this blog post help? http://rhnaranjo.wordpress.com/2012/06/25/folder-support-added-to-rrc-4-0-oslc-rm-api-implementation/
Cecilia Lindgren
commented Nov 21 '12, 6:48 a.m.
Good article, but it does not solve the issue about fetching requirements for a spcific folder.
|
Hi Cecilia,
I encoded the # character in the nav ns using UTF-8 and removed the amp after &. Can you please try this: https://server:9443/rm/views?oslc.query=true&projectURL=https%3A%2F%2Fserver%3A9443%2Fjts%2Fprocess%2Fproject-areas%2F_xdjJsP2cEeGoOoZWLhSJmQ&oslc.prefix=nav=<http://jazz.net/ns/rm/navigation%23>&oslc.where=nav:parent=https://server:9443/rm/folders/_-0W0x_5KEeGoOoZWLhSJmQ&oslc.select=* |
Michael Fiedler (91●1●3)
| answered Nov 19 '12, 1:08 p.m.
JAZZ DEVELOPER edited Nov 19 '12, 1:10 p.m.
After attempting several variations I was (mostly) able to do this. The root problem is that I could find no way to get RRC 4.0.1 to accept an oslc.prefix that used the <http://jazz.net/ns/rm/navigation#> namespace. I think there is a bug here, but wanted to see if anyone sees a better solution.
First, I am putting all URLs/query strings un-encoded in this post for readability in these examples. In reality I was encoding them correctly.
1. Do a GET on a Requirement with OSLC-Core-Version=2.0 and Accept = application/rdf+xml. In part it returns:
snip...
xmlns:nav="http://jazz.net/ns/rm/navigation#"
...snip
<nav:parent rdf:resource="https://server:9443/rm/folders/_jJkdxjJVEeKUCMIZfXk1OA"/>
2. I want to do a query for all requirements in that same folder. This query (properly encoded), does not work
oslc.prefix=nav=<http://jazz.net/ns/rm/navigation#>&oslc.where=nav:parent=<https://server:9443/rm/folders/_jJkdxjJVEeKUCMIZfXk1OA>
There is a SPARQL error and the namespace is not properly escaped with < > in the SPARQL in the RRC log.
3. This query DOES work (note the namespace which does not match the one on the GET in step 1):
oslc.prefix=nav=<http://com.ibm.rdm/navigation#>&oslc.where=nav:parent=<https://server:9443/rm/folders/_jJkdxjJVEeKUCMIZfXk1OA>
This looks like a "legacy" RRC namespace.
The nav namespace on the original GET should be the one I can use on the query, but in this case I could only get it working using the "alternate" namespace. Does anyone have a better approach?
Comments
Gabriel Ruelas
commented Nov 20 '12, 9:34 a.m.
Hi Mike,
|
Hi, i know that this is a very old question, but i have the same problem with this query.
I tried to use both namespaces, but none of them works.
I use the RM in version 5.0.2.
My sample queries (i encode them, because when i paste the address, format was not readable. Please to read use something to decode, for example this page)
https%3A%2F%2F%5Bserwer%5D%3A9443%2Frm%2Fviews%3Foslc.query%3Dtrue%26projectURL%3Dhttps%3A%2F%2F%5Bserwer%5D%3A9443%2Frm%2Fprocess%2Fproject-areas%2F_lSxTMu7LEeW7ncSEDSVoCA%26oslc.prefix%3Dnav%3D%3Chttp%3A%2F%2Fjazz.net%2Fns%2Frm%2Fnavigation%23%3E%26oslc.where%3Dnav%3Aparent%3D%3Chttps%3A%2F%2F%5Bserwer%5D%3A9443%2Frm%2Ffolders%2F_7oeNsfDrEeW7ncSEDSVoCA%3E
https%3A%2F%2F%5Bserwer%5D%3A9443%2Frm%2Fviews%3Foslc.query%3Dtrue%26projectURL%3Dhttps%3A%2F%2F%5Bserwer%5D%3A9443%2Frm%2Fprocess%2Fproject-areas%2F_lSxTMu7LEeW7ncSEDSVoCA%26oslc.prefix%3Dnav%3D%3Chttp%3A%2F%2Fcom.ibm.rdm%2Fnavigation%23%3E%26oslc.where%3Dnav%3Aparent%3D%3Chttps%3A%2F%2F%5Bserwer%5D%3A9443%2Frm%2Ffolders%2F_7oeNsfDrEeW7ncSEDSVoCA%3E
My goal is to display all requirements that are located in the specified folder. Is something has changed between versions 4.0.1 and 6.0.1 with regard to this topic ?
|
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.