DNG 6.0 : List of requiremnts in a folder
After going trough few thread i got to know that the url would be for this:
&oslc.prefix=oslc=<http://open-services.net/ns/core%23>,dcterms=<http://purl.org/dc/terms/>, nav=<http://com.ibm.rdm/navigation%23>&oslc.select=dcterms:title,dcterms:description,
oslc:instanceShape&oslc.where=nav:parent=<https://grarrc.ibm.com:9443/rm/folders
/_RHCJYN5jEeGb6IIbvOh9Dw>
but not able to understand whether to use "query capability" for this url or need to do a get on this url.
I am using OSLC,Eclipse and Java.Thanking in advance.
One answer
Comments
Thanks Donald,
I managed to this without GET.
i am able to get the requirements from a folder. I was using wrong prefix that only reason i was not getting value.
Here is the correct syntex to retrieve the URI of the artifacts inside a folder :
OslcQueryParameters queryParams = new OslcQueryParameters();
queryParams = new OslcQueryParameters();
queryParams.setPrefix("nav=<http://com.ibm.rdm/navigation#>");
queryParams.setWhere("nav:parent=<"+ folderUri +">");
OslcQuery query =new OslcQuery(client, queryCapability, 100, queryParams);
OslcQueryResult result = query.submit();
System.out.println("Result value : " + result.getMembersUrls().length);
Now, one more challenge i am facing, if i have all the requiremnts inside folder then it is working fine but if there one or more than collection in folder then i am getting exception and it is obvious since i am treating every artifact as requirement. so Collection object assignment in Requirements will be incompatible. now, i am wondering how do retrieve requirements but not other artifacts ?
Use an extra filter in the query. The candidates are oslc:instanceShape and rmTypes:ArtifactFormat.