Querying modifications [message #1763804] |
Sat, 20 May 2017 00:28  |
Eclipse User |
|
|
|
Can someone provide an example of querying an OSLC resource for a list of all its modifications? What I'd like is a response of all the resource modifications uri's. That way I can access a specific modification independently. All I need is a sample URI.
Thanks in advance!
|
|
|
Re: Querying modifications [message #1763874 is a reply to message #1763804] |
Mon, 22 May 2017 11:39   |
Eclipse User |
|
|
|
OSLC does not define a specific query or method for getting modifications. There are a couple of approaches you could use. You could do a GET and retain the eTag. Then periodically poll with HEAD to see if the eTag changes, then do another GET and reflect on the properties to see which ones changed. Another approach would be to implement a TRS consumer and have the server (it would have to be a TRS provider) provide the changes in a TRS change log.
|
|
|
Re: Querying modifications [message #1763904 is a reply to message #1763874] |
Mon, 22 May 2017 18:24  |
Eclipse User |
|
|
|
Thanks for that information. I was trying something related. Shouldn't the following Query return all the modifications for a given object?
OslcQueryParameters queryParams = new OslcQueryParameters();
queryParams.setPrefix("rdf=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>,dc=<http://purl.org/dc/terms/>");
queryParams.setSelect("dc:title,dc:modified");
queryParams.setWhere("rdf:type=<http://open-services.net/ns/rm#Requirement>");
queryParams.setWhere("dc:identifier=238 and dc:modified>1971-01-1T00:00:00");
DNG is only returning the latest modification. I tried it this way as well with the same results...
queryParams.setSelect("*");
Should this query be producing what I expect or am I missing something?
Thanks in advance.
|
|
|
Powered by
FUDForum. Page generated in 0.03196 seconds