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

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

0 votes


Accepted answer

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

1 vote

Comments

Hey,

I'm currently using the Doors NG 6.0.1. It attracted my attention that the 'Artifact Format' is missing for the requirement and requirement collection resources delivered by Doors NG's OSLC services.
Querying the rdf:type for Modules seemed to me as an alternative way getting these.

This seems to be an issue, that the Artifact Format misses for OSLC resources.

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

Permanent link
Hi,
  Does it work if you remove the nav:parent param of the oslc.where param?

0 votes

Comments

I removed the nav:parent in the where-clause.
This makes no difference. I still get 0 matches in my result.

Besides that, I saw the 'Artifact Format' property is no more included in the Instance Shape resource when querying it for a requirement/ requirement collection resource.

I removed the nav:parent in the where-clause.
This makes no difference. I still get 0 matches in my result.

Besides that, I saw the 'Artifact Format' property is no more included in the Instance Shape resource when querying it for a requirement/ requirement collection resource.


Permanent link

 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.


0 votes

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
× 516
× 139

Question asked: Mar 02 '16, 10:26 a.m.

Question was seen: 4,488 times

Last updated: Aug 30 '21, 1:49 a.m.

Confirmation Cancel Confirm