It's all about the answers!

Ask a question

DOORS - Folder search with using API

Mustafa Askin (108312) | asked May 21 '15, 7:43 a.m.
Hi everyone,

I am able to create an artifact & folder etc. But I have more than 2000 folders. Before creating an artifact I only know folder name. While creating an artifact I have to know folder URL.

Is there any documentation, any advice that how can I retrieve folder URL (ex:https://jazz:9443/rm/folders/_XqQ3Yf7fEeSTwNmIfiTrTw) by folder name? Otherwise I have to keep each folder url to somewhere(like db) to retrieve folder url.

My folder structure like this:

So if possible, I should be able to search folder "C" under folder "T"

One answer

permanent link
Jean-Luc Johnson (8115) | answered May 21 '15, 7:52 a.m.
This is a recurrent question I think.
There is a very interesting blog post at . Scroll down to the middle of the page to find few examples of folder queries.

I hope it helps.

Best regards,

Naveen Tyagi commented Oct 05 '15, 8:06 a.m.

Hi Jean,
I have looked into the post but didn't find any way to search any perticlur folder, could you please give little bit description, how this will be implemented. Thanking  in advance.

Jean-Luc Johnson commented Oct 06 '15, 5:02 a.m.

Ok, as OSLC is scalable, Folder concepts does not exist in OSLC RM, right? Since DNG was introduced with the new vocabulary "folder", DNG comes with new sets of services like query capability and creation factory for folder.
Please, read again the blog post, go to the section Exploring the project folder structure by using the folder query capability
In the project area service.xml  document, identify the related node. It will look like

        <dcterms:title rdf:parseType="Literal">Folder Query Capability</dcterms:title>
        <oslc:queryBase rdf:resource="" />

  Then send  a GET on the appropriate URI to get the list of folder in your project area.
I hope it helps.

Donald Nong commented Oct 06 '15, 11:08 p.m.

You can't actually "search" a folder, as the folder query capability just gives a way to "locate" the root folder. See below post and the blog for more details.

Jean-Luc Johnson commented Oct 07 '15, 5:52 a.m.

HI Donald,
You are probably right.
Maybe there is no built-in advanced service for query folders.
However, the query capability service gives you all the folders available in a given project area. Then you could easily apply a filter in order to extract only the URI of the one you are interested in.
I wrote this code 2-3 years ago using java Xpath, it is doable!
Find attached the code written by my student.

I hope it helps.

Your answer

Register or to post your answer.