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

Trying to get all modules in RM using OSLC query

I am using the below query to get all the modules in RM

'oslc.query': 'true',
'projectURL': self.project_uri,
'oslc.prefix': 'rmTypes=<http://www.ibm.com/xmlns/rdm/types/>,dcterms=<http://purl.org/dc/terms/>',
'oslc.where': 'rmTypes:ArtifactFormat=<%s>' Module,

'oslc.select': 'dcterms:title'  

Is the query correct?
I wanted to get a particular Module by name. 
After getting all the modules I am iterating through .//rdfs:member/* and matching dcterms:title with the actual module name. It was working before something happened recently.

0 votes



One answer

Permanent link

Late response I know. These work in 7.0.2 but AFAIK should work in earlier versions too.


Your oslc.where should be:

oslc.where=rmTypes:ArtifactFormat=<http://jazz.net/ns/rm#Module>

Or (the exact same thing done using a prefix)::

oslc.where=rmTypes:ArtifactFormat=jazz_rm:Module

But rather than postprocessing you can make the query also look for a title, e.g.:

oslc.where=rmTypes:ArtifactFormat=jazz_rm:Module and dcterms:title="My Module Title"

or even match any of several titles:

oslc.where=rmTypes:ArtifactFormat=jazz_rm:Module and dcterms:title in ["My Module Title","My Other Module Title"]

Don't forget the oslc.where and oslc.select values must be encoded into the URL

HTH
Ian

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
× 12,015

Question asked: Aug 19 '19, 9:11 a.m.

Question was seen: 2,583 times

Last updated: May 11 '22, 5:21 a.m.

Confirmation Cancel Confirm