Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

DOORS - Folder search with using API

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:
-a
--b
----c
----d
-x
--y
----c
----d
-t
--r
----c
----d

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

1 vote



One answer

Permanent link
Hello,
This is a recurrent question I think.
There is a very interesting blog post at https://jazz.net/library/article/1197 . Scroll down to the middle of the page to find few examples of folder queries.

I hope it helps.

Best regards,
JL

1 vote

Comments

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.

Hello,
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

 <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>

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

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.
https://jazz.net/forum/questions/103026/how-to-query-the-folder-by-its-name-using-oslc
https://rhnaranjo.wordpress.com/2012/06/25/folder-support-added-to-rrc-4-0-oslc-rm-api-implementation/

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 log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,935
× 515
× 478
× 411
× 139
× 14

Question asked: May 21 '15, 7:43 a.m.

Question was seen: 7,316 times

Last updated: Oct 07 '15, 5:52 a.m.

Confirmation Cancel Confirm