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',
'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.
|
One answer
Ian Barnard (2.3k●6●13)
| answered May 11 '22, 5:21 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER 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.prefix=rmTypes=<http://www.ibm.com/xmlns/rdm/types/>,dcterms=<http://purl.org/dc/terms/>,jazz_rm=<http://jazz.net/ns/rm#>
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
|
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.