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

DNG-6.0: Retriving folders from DNG project using OSLC

I am retrieving the folders using:

String targetFolder =  webContextUrl+"/folders";

String  getUrl= targetFolder+"?oslc.where=public_rm:parent=";

HttpGet get = new HttpGet(getUrl+folderArgumnet.getFolderURL());

get.addHeader("Accept", "application/xml");

get.addHeader("OSLC-Core-Version", "2.0");

HttpResponse response = HttpUtils.sendGetForSecureDocument(webContextUrl, get, null, null,
client.getHttpClient(), JTS_Server);


response is coming in RDFxml. Which returns first root level folders in the project. Then i have written an recursive parser which is traverse through these folders one by one till last child folder and continue to add the folder[name and URL] object in a list. it is working fine but if project contains more folders[100 or more] then it is taking very much time.
It is obvious because for every folder one sendGetForSecureDocumen will be made to check if it contains child folders, if it contains then again sendGetForSecureDocumen call will be made and so so. if folder doesn't contain any child folder then it will be added to the folder list and same for the other folders in  hierarchy.
 is there any way to get all the folder once. I don't need to maintain any relationship between them which folder is child/parent of which folder. All i want is the list of the folder[at least contain name and URL] objects in a given project.

0 votes


Be the first one to answer this question!

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
× 11,088

Question asked: Mar 07 '16, 1:30 a.m.

Question was seen: 4,387 times

Last updated: Mar 07 '16, 1:30 a.m.

Confirmation Cancel Confirm