It's all about the answers!

Ask a question

URI for querying rdf:resource using "oslc_cm.query="


Felipe Pontes (131) | asked Aug 01, 4:17 p.m.
I'm sorry if this is a duplicate question, but I couldn't find what I am looking for in the related questions.

I'm trying to query workitems using 2 attributes: identifier and plannedFor. The Identifier is straightforward on how to use it, but I'm having issues with the plannedFor because it has the "rdf:resource" property inside it, which I think is preventing from searching the items.
I would really appreciate it if someone could help me with this or show me what I'm doing wrong.

Here is the URI I'm using:

[..].com/ccm/oslc/contexts/_projectArea/workitems.json?oslc_cm.query=QUERY_STRING

Where the unformatted QUERY_STRING is as shown below:

dc:identifier="ITEM_ID" and rtc_cm:plannedFor rdf:resource="PLANNED_FOR_ID"

Comments
Felipe Pontes commented Aug 01, 4:36 p.m.

 I also tried using 

but I think it doesn't search withi rdf:resource property.

Accepted answer


permanent link
David Honey (9606) | answered Aug 02, 4:11 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Aug 02, 4:11 a.m.
rtc_cm:plannedFor references a URI.
For example:
<https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/542254> rtc_cm:plannedFor <https://jazz.net/jazz/oslc/iterations/_HzKikPeDEeqF0P4H7a2UXQ> ;

Which means that in an olsc.where query expression, you should use a term (unencoded) of rtc_cm:plannedFor=<uri> . See https://docs.oasis-open-projects.org/oslc-op/query/v3.0/os/oslc-query.html for details.

For example, to find work items planned for https://jazz.net/jazz/oslc/iterations/_HzKikPeDEeqF0P4H7a2UXQ the unencoded query expression would be:


The OSLC query request would therefore include:
  oslc.where=rtc_cm%3AplannedFor%3D%3Chttps%3A%2F%2Fjazz.net%2Fjazz%2Foslc%2Fiterations%2F_HzKikPeDEeqF0P4H7a2UXQ%3E .

Felipe Pontes selected this answer as the correct answer

Your answer


Register or to post your answer.