[OSLC-RM] Querying requirement module not possible
![]()
Hello,
I'm trying to query all requirement modules from the Doors NG server with the following query: OslcQueryParameters params = new OslcQueryParameters(); params.setPrefix("nav=<" + RmConstants.JAZZ_RM_NAV_NAMESPACE + ">,rdf=<" + OSLCConstants.RDF + ">"); params.setWhere("nav:parent=<" + folder.getUniqueID() + "> and rdf:type=<http://jazz.net/ns/rm#Module>"); OslcQuery query = new OslcQuery(client, url, params); OslcQueryResult result = query.submit(); result.getMembersUrls(); Executing the query returns no member urls, despite having at least one resource defined! Seems like an issue with query engine? Kind regards. |
Accepted answer
![]()
In Gabriel's jazz.net article, a working sample is shown for "rdf:type", of which the value is < http://open-services.net/ns/rm% 23RequirementCollection >. Apparently a different value of < http://jazz.net/ns/rm% 23Module > will not work, because collections and modules are of same "rdf:type" (as in RequirementCollection). To query for modules only, you will need to use the "rmTypes:ArtifactFormat" attribute. The parameters will look like:
& oslc.prefix=rmTypes=< http://www.ibm.com/xmlns/rdm/types/ >& oslc.where=rmTypes:ArtifactFormat=< https://clm:9443/rm/types/_4zgcEcSTEeWUhvpDd3TRcA%23Module > Benjamin Röhl selected this answer as the correct answer
Comments Hey,
I verified this with RGND 6.0.1 before posting. Try adding oslc.select=* in the query to see if it exposes all the attributes.
|
2 other answers
![]()
Hi,
Does it work if you remove the nav:parent param of the oslc.where param? Comments I removed the nav:parent in the where-clause.
I removed the nav:parent in the where-clause.
|
![]() If used in a module/object context returns all of the attributes for the current object. If not used in this context, returns all of the objects in the source. |
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.